RestExtras.FlickrProxy

g GObject.Object GObject.Object Rest.Proxy Rest.Proxy GObject.Object->Rest.Proxy RestExtras.FlickrProxy RestExtras.FlickrProxy Rest.Proxy->RestExtras.FlickrProxy

Subclasses:

None

Methods

Inherited:

Rest.Proxy (6), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

is_successful (root)

class

new (api_key, shared_secret)

class

new_with_token (api_key, shared_secret, token)

build_login_url (frob, perms)

get_api_key ()

get_shared_secret ()

get_token ()

new_upload ()

new_upload_for_file (filename)

set_token (token)

sign (params)

Virtual Methods

Inherited:

Rest.Proxy (2), GObject.Object (7)

Properties

Inherited:

Rest.Proxy (8)

Name

Type

Flags

Short Description

api-key

str

r/w/co

The API key

shared-secret

str

r/w/co

The shared secret

token

str

r/w

The request or access token

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Rest.Proxy

r

Class Details

class RestExtras.FlickrProxy(**kwargs)
Bases:

Rest.Proxy

Abstract:

No

Structure:

RestExtras.FlickrProxyClass

classmethod is_successful(root)
Parameters:

root (Rest.XmlNode) – The root node of a parsed Flickr response

Raises:

GLib.Error

Returns:

True if this response is successful, False otherwise.

Return type:

bool

Examines the Flickr response and if it not a successful reply, set error and return False.

classmethod new(api_key, shared_secret)
Parameters:
  • api_key (str) –

  • shared_secret (str) –

Return type:

Rest.Proxy

classmethod new_with_token(api_key, shared_secret, token)
Parameters:
  • api_key (str) –

  • shared_secret (str) –

  • token (str) –

Return type:

Rest.Proxy

build_login_url(frob, perms)
Parameters:
  • frob (str) –

  • perms (str) –

Return type:

str

get_api_key()
Returns:

the API key. This string is owned by RestExtras.FlickrProxy and should not be freed.

Return type:

str

Get the API key.

get_shared_secret()
Returns:

the shared secret. This string is owned by RestExtras.FlickrProxy and should not be freed.

Return type:

str

Get the shared secret for authentication.

get_token()
Returns:

the token, or None if there is no token yet. This string is owned by RestExtras.FlickrProxy and should not be freed.

Return type:

str

Get the current token.

new_upload()
Returns:

a new RestExtras.FlickrProxyCall

Return type:

RestExtras.FlickrProxyCall

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:

GLib.Error

Returns:

a new RestExtras.FlickrProxyCall

Return type:

RestExtras.FlickrProxyCall

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.

set_token(token)
Parameters:

token (str) – the access token

Set the token.

sign(params)
Parameters:

params ({object: object}) –

Return type:

str

Property Details

RestExtras.FlickrProxy.props.api_key
Name:

api-key

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The API key

RestExtras.FlickrProxy.props.shared_secret
Name:

shared-secret

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The shared secret

RestExtras.FlickrProxy.props.token
Name:

token

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The request or access token