Метод | Описание | |
---|---|---|
__construct ( $consumerKey, $consumerSecret = '' ) | ||
get ( $accessTokenKey, $accessTokenSecret, $url, array $getData = [] ) | Call API with a GET request. Returns either false on failure or an HttpResponse object. | |
getAccessToken ( $accessTokenURL, $requestToken, $httpMethod = 'POST', array $parameters = [] ) | ||
getFullResponse ( ) | Returns an HttpResponse object for the previous request, or null, if there was no request. | |
getRequestToken ( $requestTokenURL, $callback = 'oob', $httpMethod = 'POST', array $parameters = [] ) | ||
post ( $accessTokenKey, $accessTokenSecret, $url, array $postData = [] ) | Call API with a POST request. Returns either false on failure or an HttpResponse object. | |
postMultipartFormData ( $accessTokenKey, $accessTokenSecret, $url, array $paths, array $postData = [] ) | Call API with a POST request, the content type set to multipart/form-data. |
Метод | Описание | |
---|---|---|
createOAuthToken ( array $response ) |
Метод | Описание | |
---|---|---|
createConsumer ( ) | ||
createRequest ( $httpMethod, $url, $token, array $parameters ) | ||
doGet ( $url ) | ||
doPost ( $url, $data ) | ||
doPostMultipartFormData ( $url, $authorization, $paths, $data ) | ||
getToken ( $request ) |
public getAccessToken ( $accessTokenURL, $requestToken, $httpMethod = 'POST', array $parameters = [] ) | ||
$parameters | array |
public getFullResponse ( ) |
public getRequestToken ( $requestTokenURL, $callback = 'oob', $httpMethod = 'POST', array $parameters = [] ) | ||
$requestTokenURL | ||
$callback | An absolute URL to which the server will redirect the resource owner back when the Resource Owner Authorization step is completed. If the client is unable to receive callbacks or a callback URL has been established via other means, the parameter value MUST be set to oob (case sensitive), to indicate an out-of-band configuration. Section 2.1 from http://tools.ietf.org/html/rfc5849 | |
$httpMethod | 'POST' or 'GET' | |
$parameters | array |
public postMultipartFormData ( $accessTokenKey, $accessTokenSecret, $url, array $paths, array $postData = [] ) | ||
$paths | array | |
$postData | array |