Part of elisa.plugins.flickr.resource_provider View In Hierarchy
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 73 | Method | initialize | Initialize the component. |
| 99 | Method | clean | Close all the open HTTP connections. |
| 116 | Method | login | Login to the Flickr webservice using the given credentials. |
| 183 | Method | logout | Remove any reference to the current Flickr authentication |
| 197 | Method | get | GET request to the Flickr servers. |
| 500 | Method | post | POST request to the Flickr servers. |
| 466 | Method | __encodeForm | Encode arguments and a file's contents in a multipart/form-data string. |
Inherited from ResourceProvider:
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 107 | Method | put | Put one resource into another. Both resources are identified with URIs. |
| 129 | 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 |
Initialize the component.
This method is called byComponent.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
) | |
Encode arguments and a file's contents in a multipart/form-data string.
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
) | |