PHP 클래스 Abraham\TwitterOAuth\TwitterOAuth

저자: Abraham Williams ([email protected])
상속: extends Abraham\TwitterOAuth\Config
파일 보기 프로젝트 열기: abraham/twitteroauth 1 사용 예제들

공개 메소드들

메소드 설명
__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.

메소드 상세

__construct() 공개 메소드

Constructor
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)

delete() 공개 메소드

Make DELETE requests to the API.
public delete ( string $path, array $parameters = [] ) : array | object
$path string
$parameters array
리턴 array | object

get() 공개 메소드

Make GET requests to the API.
public get ( string $path, array $parameters = [] ) : array | object
$path string
$parameters array
리턴 array | object

getLastApiPath() 공개 메소드

public getLastApiPath ( ) : string | null
리턴 string | null

getLastBody() 공개 메소드

public getLastBody ( ) : array | object | null
리턴 array | object | null

getLastHttpCode() 공개 메소드

public getLastHttpCode ( ) : integer
리턴 integer

getLastXHeaders() 공개 메소드

public getLastXHeaders ( ) : array
리턴 array

oauth() 공개 메소드

Make /oauth/* requests to the API.
public oauth ( string $path, array $parameters = [] ) : array
$path string
$parameters array
리턴 array

oauth2() 공개 메소드

Make /oauth2/* requests to the API.
public oauth2 ( string $path, array $parameters = [] ) : array | object
$path string
$parameters array
리턴 array | object

post() 공개 메소드

Make POST requests to the API.
public post ( string $path, array $parameters = [] ) : array | object
$path string
$parameters array
리턴 array | object

put() 공개 메소드

Make PUT requests to the API.
public put ( string $path, array $parameters = [] ) : array | object
$path string
$parameters array
리턴 array | object

resetLastResponse() 공개 메소드

Resets the last response cache.
public resetLastResponse ( )

setOauthToken() 공개 메소드

public setOauthToken ( string $oauthToken, string $oauthTokenSecret )
$oauthToken string
$oauthTokenSecret string

upload() 공개 메소드

Upload media to upload.twitter.com.
public upload ( string $path, array $parameters = [], boolean $chunked = false ) : array | object
$path string
$parameters array
$chunked boolean
리턴 array | object

url() 공개 메소드

Make URLs for user browser navigation.
public url ( string $path, array $parameters ) : string
$path string
$parameters array
리턴 string