Constructor
RestOAuthProxynew
Declaration [src]
RestProxy*
oauth_proxy_new (
const char* consumer_key,
const char* consumer_secret,
const gchar* url_format,
gboolean binding_required
)
Description [src]
Create a new OAuthProxy for the specified endpoint url_format, using the
specified API key and secret.
This proxy won’t have the Token or Token Secret set so as such will be
unauthorised. If the tokens are unknown then oauth_proxy_request_token() and
oauth_proxy_access_token() should be called to do the OAuth authorisation, or
the tokens should be set using oauth_proxy_set_token() and oauth_proxy_set_token_secret().
Set binding_required to TRUE if the URL contains string formatting
operations (for example “http://foo.com/%s”. These must be expanded
using rest_proxy_bind() before invoking the proxy.
Parameters
consumer_key-
Type:
const char*The Consumer Key.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. consumer_secret-
Type:
const char*The Consumer Secret.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. url_format-
Type:
const gchar*The endpoint URL.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. binding_required-
Type:
gbooleanWhether the URL needs to be bound before calling.
Return value
Type: RestProxy
A new OAuthProxy.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |