PHP Class TwitterOAuth\Auth\AuthAbstract

Afficher le fichier Open project: ricardoper/twitteroauth Class Usage Examples

Protected Properties

Свойство Type Description
$call
$credentials
$curl
$getParams
$headers
$method
$postParams
$serializer
$withMedia

Méthodes publiques

Méthode Description
__construct ( array $credentials, TwitterOAuth\Serializer\SerializerInterface $serializer ) Authentication Base
get ( string $call, array $getParams = null ) : mixed Send a GET call to Twitter API via OAuth
getConsumerKey ( ) : null | string Gets the Twitter API key
getConsumerSecret ( ) : null | string Gets the Twitter API secret
getCurl ( ) Get cURL Instance
getHeaders ( null $key = null ) : array | string | false Get response headers
getSerializer ( ) : null | TwitterOAuth\Serializer\SerializerInterface Gets Serializer

Méthodes protégées

Méthode Description
buildMultipart ( string $mimeBoundary, string $filename ) : string Build a multipart message
findExceptions ( array $response ) : string Processing Twitter Exceptions in case of error
getBinaryFile ( string $filename ) : string Get binary data of a file
getResponse ( ) : array Returns raw response body
getUrl ( ) : string Getting full URL from a Twitter resource
resetCallState ( ) Reset Call State
supportedMimes ( string $mime ) : mixed Twitter supported MIME types for media upload
validateCredentials ( $credentials ) Validate Credentials Array

Method Details

__construct() public méthode

Authentication Base
public __construct ( array $credentials, TwitterOAuth\Serializer\SerializerInterface $serializer )
$credentials array Credentials Array
$serializer TwitterOAuth\Serializer\SerializerInterface Output Serializer

buildMultipart() protected méthode

Build a multipart message
protected buildMultipart ( string $mimeBoundary, string $filename ) : string
$mimeBoundary string MIME boundary ID
$filename string File location
Résultat string Multipart message

findExceptions() protected méthode

Processing Twitter Exceptions in case of error
protected findExceptions ( array $response ) : string
$response array Raw response
Résultat string

get() public méthode

Send a GET call to Twitter API via OAuth
public get ( string $call, array $getParams = null ) : mixed
$call string Twitter resource string
$getParams array GET parameters to send
Résultat mixed Output with selected format

getBinaryFile() protected méthode

Get binary data of a file
protected getBinaryFile ( string $filename ) : string
$filename string File location
Résultat string

getConsumerKey() public méthode

Gets the Twitter API key
public getConsumerKey ( ) : null | string
Résultat null | string

getConsumerSecret() public méthode

Gets the Twitter API secret
public getConsumerSecret ( ) : null | string
Résultat null | string

getCurl() public méthode

Get cURL Instance
public getCurl ( )

getHeaders() public méthode

Get response headers
public getHeaders ( null $key = null ) : array | string | false
$key null
Résultat array | string | false

getResponse() protected méthode

Returns raw response body
protected getResponse ( ) : array
Résultat array

getSerializer() public méthode

Gets Serializer
public getSerializer ( ) : null | TwitterOAuth\Serializer\SerializerInterface
Résultat null | TwitterOAuth\Serializer\SerializerInterface

getUrl() protected méthode

Getting full URL from a Twitter resource
protected getUrl ( ) : string
Résultat string Full URL

resetCallState() protected méthode

Reset Call State
protected resetCallState ( )

supportedMimes() protected méthode

Twitter supported MIME types for media upload
protected supportedMimes ( string $mime ) : mixed
$mime string File extension
Résultat mixed MIME type

validateCredentials() protected méthode

Validate Credentials Array
protected validateCredentials ( $credentials )
$credentials

Property Details

$call protected_oe property

protected $call

$credentials protected_oe property

protected $credentials

$curl protected_oe property

protected $curl

$getParams protected_oe property

protected $getParams

$headers protected_oe property

protected $headers

$method protected_oe property

protected $method

$postParams protected_oe property

protected $postParams

$serializer protected_oe property

protected $serializer

$withMedia protected_oe property

protected $withMedia