Метод | Описание | |
---|---|---|
__construct ( string $consumerKey, string $consumerSecret, string | null $oauthToken = null, string | null $oauthTokenSecret = null ) | Constructor | |
delete ( string $path, array $parameters = [] ) : array | object | Make DELETE requests to the API. | |
get ( string $path, array $parameters = [] ) : array | object | Make GET requests to the API. | |
getLastApiPath ( ) : string | null | ||
getLastBody ( ) : array | object | null | ||
getLastHttpCode ( ) : integer | ||
getLastXHeaders ( ) : array | ||
oauth ( string $path, array $parameters = [] ) : array | Make /oauth/* requests to the API. | |
oauth2 ( string $path, array $parameters = [] ) : array | object | Make /oauth2/* requests to the API. | |
post ( string $path, array $parameters = [] ) : array | object | Make POST requests to the API. | |
put ( string $path, array $parameters = [] ) : array | object | Make PUT requests to the API. | |
resetLastResponse ( ) | Resets the last response cache. | |
setOauthToken ( string $oauthToken, string $oauthTokenSecret ) | ||
upload ( string $path, array $parameters = [], boolean $chunked = false ) : array | object | Upload media to upload.twitter.com. | |
url ( string $path, array $parameters ) : string | Make URLs for user browser navigation. |
Метод | Описание | |
---|---|---|
encodeAppAuthorization ( Abraham\TwitterOAuth\Consumer $consumer ) : string | Encode application authorization header with base64. | |
http ( string $method, string $host, string $path, array $parameters ) : array | object | ||
oAuthRequest ( string $url, string $method, array $parameters ) : string | Format and sign an OAuth / API request | |
parseHeaders ( string $header ) : array | Get the header info to store. | |
pharRunning ( ) : boolean | Is the code running from a Phar module. | |
request ( string $url, string $method, string $authorization, array $postfields ) : string | Make an HTTP request | |
uploadMediaChunked ( string $path, array $parameters ) : array | object | Private method to upload media (chunked) to upload.twitter.com. | |
uploadMediaNotChunked ( string $path, array $parameters ) : array | object | Private method to upload media (not chunked) to upload.twitter.com. |
public __construct ( string $consumerKey, string $consumerSecret, string | null $oauthToken = null, string | null $oauthTokenSecret = null ) | ||
$consumerKey | string | The Application Consumer Key |
$consumerSecret | string | The Application Consumer Secret |
$oauthToken | string | null | The Client Token (optional) |
$oauthTokenSecret | string | null | The Client Token Secret (optional) |
public setOauthToken ( string $oauthToken, string $oauthTokenSecret ) | ||
$oauthToken | string | |
$oauthTokenSecret | string |