PHP Class WeiboOAuth

Afficher le fichier Open project: hybridauth/hybridauth Class Usage Examples

Méthodes publiques

Свойство Type Description
$connecttimeout Set connect timeout.
$decode_json Decode returned json data.
$format Response 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.

Méthodes publiques

Méthode Description
__construct ( $consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL ) construct WeiboOAuth object
accessTokenURL ( )
authenticateURL ( )
delete ( $url, $parameters = [] ) : mixed DELTE wrapper for oAuthReqeust.
get ( $url, $parameters = [] ) : mixed GET wrapper for oAuthRequest.
getAccessToken ( $oauth_verifier = FALSE, $oauth_token = false ) : array Exchange the request token and secret for an access token and secret, to sign API calls.
getAuthorizeURL ( $token ) *function getAuthorizeURL($token, $url) { if (is_array($token)) { $token = $token['oauth_token']; }
getHeader ( $ch, $header ) : integer Get the header info to store.
getRequestToken ( $oauth_callback = NULL ) : array Get a request_token from Weibo
http ( $url, $method, $postfields = NULL, $multi = false ) : string Make an HTTP request
lastAPICall ( )
lastStatusCode ( )
oAuthRequest ( $url, $method, $parameters, $multi = false ) : string Format and sign an OAuth / API request
post ( $url, $parameters = [], $multi = false ) : mixed POST wrapper for oAuthRequest.
requestTokenURL ( )
request_with_uid ( $url, $uid_or_name = null, $page = false, $count = false, $cursor = false, $post = false )

Method Details

__construct() public méthode

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

accessTokenURL() public méthode

public accessTokenURL ( )

authenticateURL() public méthode

public authenticateURL ( )

delete() public méthode

DELTE wrapper for oAuthReqeust.
public delete ( $url, $parameters = [] ) : mixed
Résultat mixed

get() public méthode

GET wrapper for oAuthRequest.
public get ( $url, $parameters = [] ) : mixed
Résultat mixed

getAccessToken() public méthode

Exchange the request token and secret for an access token and secret, to sign API calls.
public getAccessToken ( $oauth_verifier = FALSE, $oauth_token = false ) : array
Résultat array array("oauth_token" => the access token, "oauth_token_secret" => the access secret)

getAuthorizeURL() public méthode

return $this->authorizeURL() . "?oauth_token={$token}&oauth_callback=" . urlencode($url); }
public getAuthorizeURL ( $token )

getHeader() public méthode

Get the header info to store.
public getHeader ( $ch, $header ) : integer
Résultat integer

getRequestToken() public méthode

Get a request_token from Weibo
public getRequestToken ( $oauth_callback = NULL ) : array
Résultat array a key/value array containing oauth_token and oauth_token_secret

http() public méthode

Make an HTTP request
public http ( $url, $method, $postfields = NULL, $multi = false ) : string
Résultat string API results

lastAPICall() public méthode

public lastAPICall ( )

lastStatusCode() public méthode

public lastStatusCode ( )

oAuthRequest() public méthode

Format and sign an OAuth / API request
public oAuthRequest ( $url, $method, $parameters, $multi = false ) : string
Résultat string

post() public méthode

POST wrapper for oAuthRequest.
public post ( $url, $parameters = [], $multi = false ) : mixed
Résultat mixed

requestTokenURL() public méthode

public requestTokenURL ( )

request_with_uid() public méthode

public request_with_uid ( $url, $uid_or_name = null, $page = false, $count = false, $cursor = false, $post = false )

Property Details

$connecttimeout public_oe property

Set connect timeout.
public $connecttimeout

$decode_json public_oe property

Decode returned json data.
public $decode_json

$format public_oe property

Response format.
public $format

$host public_oe property

Set up the API root URL.
public $host

$http_code public_oe property

Contains the last HTTP status code returned.
public $http_code

$http_info public_oe property

Contains the last HTTP headers returned.
public $http_info

$ssl_verifypeer public_oe property

Verify SSL Cert.
public $ssl_verifypeer

$timeout public_oe property

Set timeout default.
public $timeout

$url public_oe property

Contains the last API call.
public $url