FlickrProxy

## FlickrProxy FlickrProxy |

## Synopsis

                        FlickrProxyPrivate;
                        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);
    gboolean            flickr_proxy_is_successful          (RestXmlNode *root,
                                                             GError **error);

## Object Hierarchy

      GObject
       +----RestProxy
             +----FlickrProxy

## Properties

      "api-key"                  gchar*                : Read / Write / Construct Only
      "shared-secret"            gchar*                : Read / Write / Construct Only
      "token"                    gchar*                : Read / Write

## Description

## Details

### FlickrProxyPrivate

    typedef struct {
      char *api_key;
      char *shared_secret;
      char *token;
    } FlickrProxyPrivate;

### FlickrProxy

    typedef struct _FlickrProxy FlickrProxy;

FlickrProxy has no publicly available members.

### FLICKR_PROXY_ERROR

    #define FLICKR_PROXY_ERROR flickr_proxy_error_quark()

### flickr_proxy_new ()

    RestProxy*          flickr_proxy_new                    (const char *api_key,
                                                             const char *shared_secret);

### flickr_proxy_new_with_token ()

    RestProxy*          flickr_proxy_new_with_token         (const char *api_key,
                                                             const char *shared_secret,
                                                             const char *token);

### flickr_proxy_get_api_key ()

    const char *        flickr_proxy_get_api_key            (FlickrProxy *proxy);

Get the API key.

`proxy` : | an FlickrProxy
Returns : | the API key. This string is owned by FlickrProxy and should not be freed.

### flickr_proxy_get_shared_secret ()

    const char *        flickr_proxy_get_shared_secret      (FlickrProxy *proxy);

Get the shared secret for authentication.

`proxy` : | an FlickrProxy
Returns : | the shared secret. This string is owned by FlickrProxy and should not be freed.

### flickr_proxy_get_token ()

    const char *        flickr_proxy_get_token              (FlickrProxy *proxy);

Get the current token.

`proxy` : | an FlickrProxy
Returns : | the token, or `NULL` if there is no token yet. This string is owned by FlickrProxy and should not be freed.

### flickr_proxy_set_token ()

    void                flickr_proxy_set_token              (FlickrProxy *proxy,
                                                             const char *token);

Set the token.

`proxy` : | an FlickrProxy
`token` : | the access token

### flickr_proxy_sign ()

    char *              flickr_proxy_sign                   (FlickrProxy *proxy,
                                                             GHashTable *params);

### flickr_proxy_build_login_url ()

    char *              flickr_proxy_build_login_url        (FlickrProxy *proxy,
                                                             const char *frob);

### flickr_proxy_is_successful ()

    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.

`root` : | The root node of a parsed Flickr response
`error` : | GError to set if the response was an error
Returns : | `TRUE` if this response is successful, `FALSE` otherwise.

## Property Details

### The `"api-key"` property

      "api-key"                  gchar*                : Read / Write / Construct Only

The API key.

Default value: NULL

### The `"shared-secret"` property

      "shared-secret"            gchar*                : Read / Write / Construct Only

The shared secret.

Default value: NULL

### The `"token"` property

      "token"                    gchar*                : Read / Write

The request or access token.

Default value: NULL