\TwitterAPIExchange
Twitter-API-PHP : Simple PHP wrapper for the v1.1 API
PHP version 5.3.10
- Author: James Mallison <me@j7mbo.co.uk>
- License: MIT License
Synopsis
class TwitterAPIExchange
{
- // members
- private $oauth_access_token;
- private $oauth_access_token_secret;
- private $consumer_key;
- private $consumer_secret;
- private $postfields;
- private $getfield;
- protected $oauth;
- public $url;
- // methods
- public void __construct()
- public TwitterAPIExchange setPostfields()
- public TwitterAPIExchange setGetfield()
- public string getGetfield()
- public array getPostfields()
- public TwitterAPIExchange buildOauth()
- public string performRequest()
- private string buildBaseString()
- private string buildAuthorizationHeader()
Members
private
- $consumer_key
- $consumer_secret
- $getfield
- $oauth_access_token
- $oauth_access_token_secret
- $postfields
protected
- $oauth
public
- $url
Methods
private
- buildAuthorizationHeader() — Private method to generate authorization header used by cURL
- buildBaseString() — Private method to generate the base string used by cURL
public
- __construct() — Create the API access object. Requires an array of settings:: oauth access token, oauth access token secret, consumer key, consumer secret These are all available by creating your own application on dev.twitter.com Requires the cURL library
- buildOauth() — Build the Oauth object using params set in construct and additionals passed to this method. For v1.1, see: https://dev.twitter.com/docs/api/1.1
- getGetfield() — Get getfield string (simple getter)
- getPostfields() — Get postfields array (simple getter)
- performRequest() — Perform the actual data retrieval from the API
- setGetfield() — Set getfield string, example: '?screen_name=J7mbo'
- setPostfields() — Set postfields array, example: array('screen_name' => 'J7mbo')