RestExtras.LastfmProxy

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

Subclasses:

None

Methods

Inherited:

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

Structs:

GObject.ObjectClass (5)

class

is_successful (root)

class

new (api_key, secret)

class

new_with_session (api_key, secret, session_key)

build_login_url (token)

get_api_key ()

get_secret ()

get_session_key ()

set_session_key (session_key)

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

secret

str

r/w/co

The API key secret

session-key

str

r/w

The session key

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Rest.Proxy

r

Class Details

class RestExtras.LastfmProxy(**kwargs)
Bases:

Rest.Proxy

Abstract:

No

Structure:

RestExtras.LastfmProxyClass

classmethod is_successful(root)
Parameters:

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

Raises:

GLib.Error

Returns:

True if this response is successful, False otherwise.

Return type:

bool

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

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

  • secret (str) –

Return type:

Rest.Proxy

classmethod new_with_session(api_key, secret, session_key)
Parameters:
  • api_key (str) –

  • secret (str) –

  • session_key (str) –

Return type:

Rest.Proxy

build_login_url(token)
Parameters:

token (str) –

Return type:

str

get_api_key()
Returns:

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

Return type:

str

Get the API key.

get_secret()
Returns:

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

Return type:

str

Get the secret for authentication.

get_session_key()
Returns:

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

Return type:

str

Get the current session key.

set_session_key(session_key)
Parameters:

session_key (str) – the access session_key

Set the session key.

sign(params)
Parameters:

params ({object: object}) –

Return type:

str

Property Details

RestExtras.LastfmProxy.props.api_key
Name:

api-key

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The API key

RestExtras.LastfmProxy.props.secret
Name:

secret

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The API key secret

RestExtras.LastfmProxy.props.session_key
Name:

session-key

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The session key