PHP Класс WeiboOAuth

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
__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 )

Описание методов

__construct() публичный Метод

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

accessTokenURL() публичный Метод

public accessTokenURL ( )

authenticateURL() публичный Метод

public authenticateURL ( )

delete() публичный Метод

DELTE wrapper for oAuthReqeust.
public delete ( $url, $parameters = [] ) : mixed
Результат mixed

get() публичный Метод

GET wrapper for oAuthRequest.
public get ( $url, $parameters = [] ) : mixed
Результат mixed

getAccessToken() публичный Метод

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
Результат array array("oauth_token" => the access token, "oauth_token_secret" => the access secret)

getAuthorizeURL() публичный Метод

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

getHeader() публичный Метод

Get the header info to store.
public getHeader ( $ch, $header ) : integer
Результат integer

getRequestToken() публичный Метод

Get a request_token from Weibo
public getRequestToken ( $oauth_callback = NULL ) : array
Результат array a key/value array containing oauth_token and oauth_token_secret

http() публичный Метод

Make an HTTP request
public http ( $url, $method, $postfields = NULL, $multi = false ) : string
Результат string API results

lastAPICall() публичный Метод

public lastAPICall ( )

lastStatusCode() публичный Метод

public lastStatusCode ( )

oAuthRequest() публичный Метод

Format and sign an OAuth / API request
public oAuthRequest ( $url, $method, $parameters, $multi = false ) : string
Результат string

post() публичный Метод

POST wrapper for oAuthRequest.
public post ( $url, $parameters = [], $multi = false ) : mixed
Результат mixed

requestTokenURL() публичный Метод

public requestTokenURL ( )

request_with_uid() публичный Метод

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

Описание свойств

$connecttimeout публичное свойство

Set connect timeout.
public $connecttimeout

$decode_json публичное свойство

Decode returned json data.
public $decode_json

$format публичное свойство

Response format.
public $format

$host публичное свойство

Set up the API root URL.
public $host

$http_code публичное свойство

Contains the last HTTP status code returned.
public $http_code

$http_info публичное свойство

Contains the last HTTP headers returned.
public $http_info

$ssl_verifypeer публичное свойство

Verify SSL Cert.
public $ssl_verifypeer

$timeout публичное свойство

Set timeout default.
public $timeout

$url публичное свойство

Contains the last API call.
public $url