Part of elisa.plugins.flickr.resource_provider View In Hierarchy
Line # | Kind | Name | Docs |
---|---|---|---|
73 | Method | initialize | Initialize the component. |
104 | Method | clean | Close all the open HTTP connections. |
125 | Method | login | Login to the Flickr webservice using the given credentials. |
192 | Method | logout | Remove any reference to the current Flickr authentication |
206 | Method | get | GET request to the Flickr servers. |
509 | Method | post | POST request to the Flickr servers. |
475 | Method | __encodeForm | Encode arguments and a file's contents in a multipart/form-data string. |
Inherited from ResourceProvider:
Line # | Kind | Name | Docs |
---|---|---|---|
116 | Method | put | Put one resource into another. Both resources are identified with URIs. |
138 | Method | delete | Delete a Resource represented by a URI. |
Inherited from Component (via ResourceProvider):
Line # | Kind | Name | Docs |
---|---|---|---|
85 | Class | PathDescriptor | Undocumented |
97 | Class Method | create | Create and initialize the component. |
Inherited from Loggable (via ResourceProvider, Component):
Line # | Kind | Name | Docs |
---|---|---|---|
81 | Method | __init__ | Undocumented |
This method is called by Component.create
to finish the
initialization of a component.
Returns | a deferred called when a component is fully initialized
(type: twisted.internet.defer.Deferred
) |
Parameters | username | login of the user (type: string ) |
password | password of the user (type: string ) | |
Returns | (type: twisted.internet.defer.Deferred
) |
GET request to the Flickr servers.
The request URI can be of one of the following forms:
http://api.flickr.com/services/rest/?.* http://farm{farm_id}.static.flickr.com/.*\.jpg
Parameters | uri | URI pointing to the resource
(type: elisa.core.media_uri.MediaUri
) |
context_model | [not used]
(type: None
) | |
Returns | a new model and a deferred fired when the model is filled with the
requested resource's data
(type: tuple of elisa.core.components.model.Model
elisa.core.utils.defer.Deferred
) |
This code is largely inspired by Ross Burton's flickrpc (see http://burtonini.com/bzr/flickrpc/).
POST request to the Flickr servers.
The request URI can be of one of the following forms:
http://api.flickr.com/services/upload/ http://api.flickr.com/services/replace/
Parameters | uri | URI pointing to the resource
(type: elisa.core.media_uri.MediaUri
) |
arguments | the arguments (including authentication and signing)
(type: dict of str
) | |
filename | the name of a local photo file
(type: str
) | |
Returns | a deferred fired with the id of the photo uploaded/replaced when the
operation is complete
(type: elisa.core.utils.defer.Deferred
) |