PHP Class TwitterOAuth, phergie

Show file Open project: phergie/phergie Class Usage Examples

Public Properties

Property Type Description
$connecttimeout * Set connect timeout.
$decode_json * Decode returned json data.
$format * Respons format.
$host * Set up the API root URL.
$http_code * Contains the last HTTP status code returned.
$http_info * Contains the last HTTP headers returned.
$ssl_verifypeer * Verify SSL Cert.
$timeout * Set timeout default.
$url * Contains the last API call.
$useragent * Set the useragnet.

Public Methods

Method Description
__construct ( $consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL ) construct TwitterOAuth object
accessTokenURL ( ) Set API URLS
authenticateURL ( )
authorizeURL ( )
delete ( $url, $parameters = [] ) DELETE wrapper for oAuthReqeust.
get ( $url, $parameters = [] ) GET wrapper for oAuthRequest.
getAccessToken ( $oauth_verifier ) Exchange request token and secret for an access token and secret, to sign API calls.
getAuthorizeURL ( $token, $sign_in_with_twitter = TRUE ) Get the authorize URL
getHeader ( $ch, $header ) Get the header info to store.
getRequestToken ( $oauth_callback ) Get a request_token from Twitter
getXAuthToken ( $username, $password ) One time exchange of username and password for access token and secret.
http ( $url, $method, $postfields = NULL ) : API Make an HTTP request
lastAPICall ( )
lastStatusCode ( ) Debug helpers
oAuthRequest ( $url, $method, $parameters ) Format and sign an OAuth / API request
post ( $url, $parameters = [] ) POST wrapper for oAuthRequest.
requestTokenURL ( )

Method Details

__construct() public method

construct TwitterOAuth object
public __construct ( $consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL )

accessTokenURL() public method

Set API URLS
public accessTokenURL ( )

authenticateURL() public method

public authenticateURL ( )

authorizeURL() public method

public authorizeURL ( )

delete() public method

DELETE wrapper for oAuthReqeust.
public delete ( $url, $parameters = [] )

get() public method

GET wrapper for oAuthRequest.
public get ( $url, $parameters = [] )

getAccessToken() public method

Exchange request token and secret for an access token and secret, to sign API calls.
public getAccessToken ( $oauth_verifier )

getAuthorizeURL() public method

Get the authorize URL
public getAuthorizeURL ( $token, $sign_in_with_twitter = TRUE )

getHeader() public method

Get the header info to store.
public getHeader ( $ch, $header )

getRequestToken() public method

Get a request_token from Twitter
public getRequestToken ( $oauth_callback )

getXAuthToken() public method

One time exchange of username and password for access token and secret.
public getXAuthToken ( $username, $password )

http() public method

Make an HTTP request
public http ( $url, $method, $postfields = NULL ) : API
return API results

lastAPICall() public method

public lastAPICall ( )

lastStatusCode() public method

Debug helpers
public lastStatusCode ( )

oAuthRequest() public method

Format and sign an OAuth / API request
public oAuthRequest ( $url, $method, $parameters )

post() public method

POST wrapper for oAuthRequest.
public post ( $url, $parameters = [] )

requestTokenURL() public method

public requestTokenURL ( )

Property Details

$connecttimeout public property

* Set connect timeout.
public $connecttimeout

$decode_json public property

* Decode returned json data.
public $decode_json

$format public property

* Respons format.
public $format

$host public property

* Set up the API root URL.
public $host

$http_code public property

* Contains the last HTTP status code returned.
public $http_code

$http_info public property

* Contains the last HTTP headers returned.
public $http_info

$ssl_verifypeer public property

* Verify SSL Cert.
public $ssl_verifypeer

$timeout public property

* Set timeout default.
public $timeout

$url public property

* Contains the last API call.
public $url

$useragent public property

* Set the useragnet.
public $useragent