OAuthClient Class Reference

A simple OAuth client class for making 2 and 3 legged OAuth HTTP requests. More...

List of all members.

Public Member Functions

 OAuthClient ($consumer, $token=NULL, $oauthParamsLocation=OAUTH_PARAMS_IN_HEADERS, $signatureMethod=OAUTH_SIGNATURE_HMAC_SHA1)
 get ($url, $queryParameters=array(), $timeout=NULL)
 delete ($url, $queryParameters=array(), $timeout=NULL)
 put ($url, $contentType, $content, $timeout=NULL)
 post ($url, $contentType="application/x-www-form-urlencoded", $content=array(), $timeout=NULL)


Detailed Description

A simple OAuth client class for making 2 and 3 legged OAuth HTTP requests.


Member Function Documentation

OAuthClient::OAuthClient ( consumer,
token = NULL,
oauthParamsLocation = OAUTH_PARAMS_IN_HEADERS,
signatureMethod = OAUTH_SIGNATURE_HMAC_SHA1 
)

Constructs a new OAuth client.

Parameters:
$consumer The OAuthConsumer object to use for the requests.
$token The OAuthToken to use for the requests. Optional.
$oauthParamsLocation OAUTH_PARAMS_IN_HEADERS or OAUTH_PARAMS_IN_POST_BODY, depending on where you want the OAuth parameters to show up. Optional, defaults to using the headers.
$signatureMethod OAUTH_SIGNATURE_PLAINTEXT or OAUTH_SIGNATURE_HMAC_SHA1, depending on what request signing mechanism to use. Optional, defaults to HMAC SHA1 signatures.

OAuthClient::get ( url,
queryParameters = array(),
timeout = NULL 
)

Executes a properly signed OAuth HTTP GET request.

Parameters:
$url The URL to request.
$queryParameters Any query string parameters to be sent in the request.
$timeout Optional, the number of seconds to wait for the request to return.
Returns:
The response object.

OAuthClient::delete ( url,
queryParameters = array(),
timeout = NULL 
)

Executes a properly signed OAuth HTTP DELETE request.

Parameters:
$url The URL to request.
$queryParameters Any query string parameters to be sent in the request.
$timeout Optional, the number of seconds to wait for the request to return.
Returns:
The response object.

OAuthClient::put ( url,
contentType,
content,
timeout = NULL 
)

Executes a properly signed OAuth HTTP PUT request.

Parameters:
$url The URL to request.
$contentType The Content-Type of the PUT data.
$content The raw content to be PUT.
$timeout Optional, the number of seconds to wait for the request to return.
Returns:
The response object.

OAuthClient::post ( url,
contentType = "application/x-www-form-urlencoded",
content = array(),
timeout = NULL 
)

Executes a properly signed OAuth HTTP POST request.

Parameters:
$url The URL to request.
$contentType The Content-Type of the POST data.
$content The content to be POST.
$timeout Optional, the number of seconds to wait for the request to return.
Returns:
The response object.


The documentation for this class was generated from the following file:
Generated on Thu Nov 20 12:23:17 2008 for Yahoo! OS SDK - PHP by  doxygen 1.5.2