Class OAuthClient

Description

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

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

Located in /Yahoo.inc (line 1633)


	
			
Variable Summary
Method Summary
 OAuthClient OAuthClient ($consumer $consumer, [$token $token = NULL], [$oauthParamsLocation $oauthParamsLocation = OAUTH_PARAMS_IN_HEADERS], [$signatureMethod $signatureMethod = OAUTH_SIGNATURE_HMAC_SHA1])
 void checkExpired ( $code,  $headerParser)
 The delete ($url $url, [$queryParameters $queryParameters = array()], [$timeout $timeout = NULL])
 The get ($url $url, [$queryParameters $queryParameters = array()], [$timeout $timeout = NULL])
 The post ($url $url, [$contentType $contentType = "application/x-www-form-urlencoded"], [$content $content = array()], [$timeout $timeout = NULL])
 The put ($url $url, $contentType $contentType, $content $content, [$timeout $timeout = NULL])
 void request ( $request)
Variables
mixed $accepts = "application/json" (line 1662)
  • private:
mixed $consumer = NULL (line 1637)
  • private:
mixed $defaultTimeout = 3 (line 1647)
  • private:
mixed $oauthParamsLocation = NULL (line 1652)
  • private:
mixed $signatureMethod = NULL (line 1657)
  • private:
mixed $token = NULL (line 1642)
  • private:
Methods
Constructor OAuthClient (line 1672)

Constructs a new OAuth client.

Constructs a new OAuth client.

OAuthClient OAuthClient ($consumer $consumer, [$token $token = NULL], [$oauthParamsLocation $oauthParamsLocation = OAUTH_PARAMS_IN_HEADERS], [$signatureMethod $signatureMethod = OAUTH_SIGNATURE_HMAC_SHA1])
  • $consumer $consumer: The OAuthConsumer object to use for the requests.
  • $token $token: The OAuthToken to use for the requests. Optional.
  • $oauthParamsLocation $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 $signatureMethod: OAUTH_SIGNATURE_PLAINTEXT or OAUTH_SIGNATURE_HMAC_SHA1, depending on what request signing mechanism to use. Optional, defaults to HMAC SHA1 signatures.
checkExpired (line 1877)

Checks to see if the code and headers indicate an expired OAuth token.

Checks to see if the code and headers indicate an expired OAuth token. If so, requests a new one.

  • private:
void checkExpired ( $code,  $headerParser)
  • $code
  • $headerParser
delete (line 1717)

Executes a properly signed OAuth HTTP DELETE request.

Executes a properly signed OAuth HTTP DELETE request.

  • return: response object.
The delete ($url $url, [$queryParameters $queryParameters = array()], [$timeout $timeout = NULL])
  • $url $url: The URL to request.
  • $queryParameters $queryParameters: Any query string parameters to be sent in the request.
  • $timeout $timeout: Optional, the number of seconds to wait for the request to return.
get (line 1696)

Executes a properly signed OAuth HTTP GET request.

Executes a properly signed OAuth HTTP GET request.

  • return: response object.
The get ($url $url, [$queryParameters $queryParameters = array()], [$timeout $timeout = NULL])
  • $url $url: The URL to request.
  • $queryParameters $queryParameters: Any query string parameters to be sent in the request.
  • $timeout $timeout: Optional, the number of seconds to wait for the request to return.
post (line 1757)

Executes a properly signed OAuth HTTP POST request.

Executes a properly signed OAuth HTTP POST request.

  • return: response object.
The post ($url $url, [$contentType $contentType = "application/x-www-form-urlencoded"], [$content $content = array()], [$timeout $timeout = NULL])
  • $url $url: The URL to request.
  • $contentType $contentType: The Content-Type of the POST data.
  • $content $content: The content to be POST.
  • $timeout $timeout: Optional, the number of seconds to wait for the request to return.
put (line 1739)

Executes a properly signed OAuth HTTP PUT request.

Executes a properly signed OAuth HTTP PUT request.

  • return: response object.
The put ($url $url, $contentType $contentType, $content $content, [$timeout $timeout = NULL])
  • $url $url: The URL to request.
  • $contentType $contentType: The Content-Type of the PUT data.
  • $content $content: The raw content to be PUT.
  • $timeout $timeout: Optional, the number of seconds to wait for the request to return.
request (line 1770)
  • private:
void request ( $request)
  • $request

Documentation generated on Thu, 22 Oct 2009 12:54:52 -0700 by phpDocumentor 1.4.3