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 |
const char* |
The Consumer Key. |
|
The data is owned by the caller of the function. | |
The string is a NUL terminated UTF-8 string. | |
consumer_secret |
const char* |
The Consumer Secret. |
|
The data is owned by the caller of the function. | |
The string is a NUL terminated UTF-8 string. | |
url_format |
const gchar* |
The endpoint URL. |
|
The data is owned by the caller of the function. | |
The string is a NUL terminated UTF-8 string. | |
binding_required |
gboolean |
Whether the URL needs to be bound before calling. |
Return value
Returns: | RestProxy |
A new |
|
The caller of the function takes ownership of the data, and is responsible for freeing it. |