![]() |
![]() |
![]() |
librest Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
FlickrProxy; #define FLICKR_PROXY_ERROR RestProxy * flickr_proxy_new (const char *api_key
,const char *shared_secret
); RestProxy * flickr_proxy_new_with_token (const char *api_key
,const char *shared_secret
,const char *token
); const char * flickr_proxy_get_api_key (FlickrProxy *proxy
); const char * flickr_proxy_get_shared_secret (FlickrProxy *proxy
); const char * flickr_proxy_get_token (FlickrProxy *proxy
); void flickr_proxy_set_token (FlickrProxy *proxy
,const char *token
); char * flickr_proxy_sign (FlickrProxy *proxy
,GHashTable *params
); char * flickr_proxy_build_login_url (FlickrProxy *proxy
,const char *frob
,const char *perms
); gboolean flickr_proxy_is_successful (RestXmlNode *root
,GError **error
); RestProxyCall * flickr_proxy_new_upload (FlickrProxy *proxy
); RestProxyCall * flickr_proxy_new_upload_for_file (FlickrProxy *proxy
,const char *filename
,GError **error
);
"api-key" gchar* : Read / Write / Construct Only "shared-secret" gchar* : Read / Write / Construct Only "token" gchar* : Read / Write
RestProxy * flickr_proxy_new_with_token (const char *api_key
,const char *shared_secret
,const char *token
);
const char * flickr_proxy_get_api_key (FlickrProxy *proxy
);
Get the API key.
|
an FlickrProxy |
Returns : |
the API key. This string is owned by FlickrProxy and should not be freed. |
const char * flickr_proxy_get_shared_secret (FlickrProxy *proxy
);
Get the shared secret for authentication.
|
an FlickrProxy |
Returns : |
the shared secret. This string is owned by FlickrProxy and should not be freed. |
const char * flickr_proxy_get_token (FlickrProxy *proxy
);
Get the current token.
|
an FlickrProxy |
Returns : |
the token, or NULL if there is no token yet. This string is owned
by FlickrProxy and should not be freed. |
void flickr_proxy_set_token (FlickrProxy *proxy
,const char *token
);
Set the token.
|
an FlickrProxy |
|
the access token |
char * flickr_proxy_build_login_url (FlickrProxy *proxy
,const char *frob
,const char *perms
);
gboolean flickr_proxy_is_successful (RestXmlNode *root
,GError **error
);
Examines the Flickr response and if it not a successful reply, set error
and
return FALSE.
|
The root node of a parsed Flickr response |
|
GError to set if the response was an error |
Returns : |
TRUE if this response is successful, FALSE otherwise. |
RestProxyCall * flickr_proxy_new_upload (FlickrProxy *proxy
);
Create a new RestProxyCall that can be used for uploading.
See http://www.flickr.com/services/api/upload.api.html for details on uploading to Flickr.
|
a valid FlickrProxy |
Returns : |
a new FlickrProxyCall. [type FlickrProxyCall][transfer full] |
RestProxyCall * flickr_proxy_new_upload_for_file (FlickrProxy *proxy
,const char *filename
,GError **error
);
Create a new RestProxyCall 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.
|
a valid FlickrProxy |
|
the file to upload |
|
GError to set on error |
Returns : |
a new FlickrProxyCall. [type FlickrProxyCall][transfer full] |