RestExtras.FlickrProxy¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The API key |
||
r/w/co |
The shared secret |
||
r/w |
The request or access token |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class RestExtras.FlickrProxy(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod is_successful(root)¶
- Parameters:
root (
Rest.XmlNode
) – The root node of a parsed Flickr response- Raises:
- Returns:
- Return type:
Examines the Flickr response and if it not a successful reply, set error and return
False
.
- classmethod new(api_key, shared_secret)¶
- Parameters:
- Return type:
- classmethod new_with_token(api_key, shared_secret, token)¶
- Parameters:
- Return type:
- get_api_key()¶
- Returns:
the API key. This string is owned by
RestExtras.FlickrProxy
and should not be freed.- Return type:
Get the API key.
- Returns:
the shared secret. This string is owned by
RestExtras.FlickrProxy
and should not be freed.- Return type:
Get the shared secret for authentication.
- get_token()¶
- Returns:
the token, or
None
if there is no token yet. This string is owned byRestExtras.FlickrProxy
and should not be freed.- Return type:
Get the current token.
- new_upload()¶
- Returns:
- Return type:
Create a new
Rest.ProxyCall
that can be used for uploading.See http://www.flickr.com/services/api/upload.api.html for details on uploading to Flickr.
- new_upload_for_file(filename)¶
- Parameters:
filename (
str
) – the file to upload- Raises:
- Returns:
- Return type:
Create a new
Rest.ProxyCall
that can be used for uploading. filename will be set as the “photo” parameter for you, avoiding you from having to open the file and determine the MIME type.Note that this function can in theory block.
See http://www.flickr.com/services/api/upload.api.html for details on uploading to Flickr.
Property Details¶
- RestExtras.FlickrProxy.props.api_key¶
- Name:
api-key
- Type:
- Default Value:
- Flags:
The API key
- Name:
shared-secret
- Type:
- Default Value:
- Flags:
The shared secret