![]() |
![]() |
![]() |
librest Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
LastfmProxy; #define LASTFM_PROXY_ERROR RestProxy * lastfm_proxy_new (const char *api_key
,const char *secret
); RestProxy * lastfm_proxy_new_with_session (const char *api_key
,const char *secret
,const char *session_key
); const char * lastfm_proxy_get_api_key (LastfmProxy *proxy
); const char * lastfm_proxy_get_secret (LastfmProxy *proxy
); const char * lastfm_proxy_get_session_key (LastfmProxy *proxy
); void lastfm_proxy_set_session_key (LastfmProxy *proxy
,const char *session_key
); char * lastfm_proxy_sign (LastfmProxy *proxy
,GHashTable *params
); char * lastfm_proxy_build_login_url (LastfmProxy *proxy
,const char *token
); gboolean lastfm_proxy_is_successful (RestXmlNode *root
,GError **error
);
"api-key" gchar* : Read / Write / Construct Only "secret" gchar* : Read / Write / Construct Only "session-key" gchar* : Read / Write
RestProxy * lastfm_proxy_new_with_session (const char *api_key
,const char *secret
,const char *session_key
);
const char * lastfm_proxy_get_api_key (LastfmProxy *proxy
);
Get the API key.
|
an LastfmProxy |
Returns : |
the API key. This string is owned by LastfmProxy and should not be freed. |
const char * lastfm_proxy_get_secret (LastfmProxy *proxy
);
Get the secret for authentication.
|
an LastfmProxy |
Returns : |
the secret. This string is owned by LastfmProxy and should not be freed. |
const char * lastfm_proxy_get_session_key (LastfmProxy *proxy
);
Get the current session key.
|
an LastfmProxy |
Returns : |
the session key, or NULL if there is no session key yet. This string is owned
by LastfmProxy and should not be freed. |
void lastfm_proxy_set_session_key (LastfmProxy *proxy
,const char *session_key
);
Set the session key.
|
an LastfmProxy |
|
the access session_key |
char * lastfm_proxy_build_login_url (LastfmProxy *proxy
,const char *token
);
gboolean lastfm_proxy_is_successful (RestXmlNode *root
,GError **error
);
Examines the Lastfm response and if it not a successful reply, set error
and
return FALSE.
|
The root node of a parsed Lastfm response |
|
GError to set if the response was an error |
Returns : |
TRUE if this response is successful, FALSE otherwise. |