Public Member Functions | |
requestTokenURL () | |
accessTokenURL () | |
authorizeURL () | |
lastStatusCode () | |
lastAPICall () | |
__construct ($consumerkey, $consumerSecret, $oauthToken=NULL, $oauthTokenSecret=NULL) | |
setResponseFormat ($format) | |
getRequestToken ($oauthCallback=NULL) | |
getAuthorizeURL ($token, $sid="", $sessionid="") | |
getAccessToken ($request) | |
getXAuthToken ($username, $password) | |
get ($url, $parameters=array()) | |
post ($url, $parameters=array()) | |
delete ($url, $parameters=array()) | |
oAuthRequest ($url, $method, $parameters) | |
http ($url, $method, $postFields=NULL) | |
getHeader ($ch, $header) | |
Public Attributes | |
$httpCode | |
$url | |
$host | |
$requestTokenUrl | |
$authorizeUrl | |
$accessTokenUrl | |
$timeout = 30 | |
$connectTimeout = 30 | |
$sslVerifyPeer = true | |
$format = "json" | |
$decodeJson = true | |
$httpInfo | |
$httpHeader | |
$userAgent = "CSenseOAuthClient v0.1.4" | |
$token |
This class is based on the Abraham Williams' TwitterOAuth class (the first PHP Library to support OAuth for Twitter's REST API). Abraham Williams (abraham@abrah.am)
CommonsenseOauthClient::__construct | ( | $ | consumerkey, |
$ | consumerSecret, | ||
$ | oauthToken = NULL , |
||
$ | oauthTokenSecret = NULL |
||
) |
construct TwitterOAuth object
string | $consumerkey | |
string | $consumerSecret | |
string | $oauthToken | |
string | $oauthTokenSecret |
CommonsenseOauthClient::delete | ( | $ | url, |
$ | parameters = array() |
||
) |
DELETE wrapper for oAuthRequest.
string | $url | |
array | $parameters |
CommonsenseOauthClient::get | ( | $ | url, |
$ | parameters = array() |
||
) |
GET wrapper for oAuthRequest.
string_type | $url | |
array | $parameters |
CommonsenseOauthClient::getAccessToken | ( | $ | request | ) |
Exchange request token and secret for an access token and secret, to sign API calls.
CommonsenseOauthClient::getAuthorizeURL | ( | $ | token, |
$ | sid = "" , |
||
$ | sessionid = "" |
||
) |
Get the authorize URL
CommonsenseOauthClient::getHeader | ( | $ | ch, |
$ | header | ||
) |
Get the header info to store.
string | $header |
CommonsenseOauthClient::getRequestToken | ( | $ | oauthCallback = NULL | ) |
Get a request_token from Twitter
CommonsenseOauthClient::getXAuthToken | ( | $ | username, |
$ | password | ||
) |
One time exchange of username and password for access token and secret.
CommonsenseOauthClient::http | ( | $ | url, |
$ | method, | ||
$ | postFields = NULL |
||
) |
Debug helpers
CommonsenseOauthClient::oAuthRequest | ( | $ | url, |
$ | method, | ||
$ | parameters | ||
) |
Format and sign an OAuth / API request.
string | $url | |
string | $method | |
array | $parameters |
CommonsenseOauthClient::post | ( | $ | url, |
$ | parameters = array() |
||
) |
POST wrapper for oAuthRequest.
string | $url | |
array | $parameters |
Set API URLS
CommonsenseOauthClient::setResponseFormat | ( | $ | format | ) |
CommonsenseOauthClient::$accessTokenUrl |
CommonsenseOauthClient::$authorizeUrl |
CommonsenseOauthClient::$connectTimeout = 30 |
CommonsenseOauthClient::$decodeJson = true |
CommonsenseOauthClient::$format = "json" |
CommonsenseOauthClient::$host |
CommonsenseOauthClient::$httpCode |
CommonsenseOauthClient::$httpHeader |
CommonsenseOauthClient::$httpInfo |
CommonsenseOauthClient::$requestTokenUrl |
CommonsenseOauthClient::$sslVerifyPeer = true |
CommonsenseOauthClient::$timeout = 30 |
CommonsenseOauthClient::$token |
CommonsenseOauthClient::$url |
CommonsenseOauthClient::$userAgent = "CSenseOAuthClient v0.1.4" |