Package elisa :: Package extern :: Module flickrest :: Class Flickr
[hide private]
[frames] | no frames]

Class Flickr

source code

Instance Methods [hide private]
 
__init__(self, api_key, secret, perms='read') source code
 
__repr__(self) source code
 
__getTokenFile(self)
Get the filename that contains the authentication token for the API key
source code
 
clear_cached(self)
Remove any cached information on disk.
source code
 
__sign(self, kwargs) source code
 
__call(self, method, kwargs) source code
 
__cb(self, data, method) source code
 
__getattr__(self, method) source code
 
upload(self, filename='frontend', imageData='frontend', title='frontend', desc='frontend', tags='frontend') source code
 
authenticate_2(self, state) source code
 
authenticate_1(self)
Attempts to log in to Flickr.
source code
Static Methods [hide private]
 
__encodeForm(inputs)
Takes a dict of inputs and returns a multipart/form-data string containing the utf-8 encoded data.
source code
 
get_photo_url(photo, size=3) source code
Class Variables [hide private]
  endpoint = 'http://api.flickr.com/services/rest/?'
Method Details [hide private]

__encodeForm(inputs)
Static Method

source code 
Takes a dict of inputs and returns a multipart/form-data string containing the utf-8 encoded data. Keys must be strings, values can be either strings or file-like objects.

authenticate_1(self)

source code 
Attempts to log in to Flickr. The return value is a Twisted Deferred object that callbacks when the first part of the authentication is completed. If the result passed to the deferred callback is None, then the required authentication was locally cached and you are authenticated. Otherwise the result is a dictionary, you should open the URL specified by the 'url' key and instruct the user to follow the instructions. Once that is done, pass the state to flickrest.authenticate_2().