PHP Class CityAds_Api

显示文件 Open project: fubralimited/php-oara Class Usage Examples

Protected Properties

Property Type Description
$accessToken
$format
$host
$resourse

Public Methods

Method Description
get ( $method, $params = [] )
getAccessToken ( )
getAuthorizeUrl ( integer $clientId, string $redirectUri, string $responseType = 'code' ) : string First step - get OAuth authorization url
getFormat ( )
login ( $accessToken = null )
post ( $method, $params = '' )
put ( $method, $params = '' )
requestAccessToken ( integer $clientId, string $secretKey, string $code, string $redirectUri ) : mixed Second step - request an access token by OAuth2 code returned from authorization url
setAccessToken ( $accessToken )
setFormat ( $format )

Private Methods

Method Description
checkedResponse ( $response )
statusProcess ( $data )

Method Details

get() public method

public get ( $method, $params = [] )

getAccessToken() public method

public getAccessToken ( )

getAuthorizeUrl() public method

First step - get OAuth authorization url
public getAuthorizeUrl ( integer $clientId, string $redirectUri, string $responseType = 'code' ) : string
$clientId integer
$redirectUri string
$responseType string
return string

getFormat() public method

public getFormat ( )

login() public method

public login ( $accessToken = null )

post() public method

public post ( $method, $params = '' )

put() public method

public put ( $method, $params = '' )

requestAccessToken() public method

Second step - request an access token by OAuth2 code returned from authorization url
public requestAccessToken ( integer $clientId, string $secretKey, string $code, string $redirectUri ) : mixed
$clientId integer
$secretKey string
$code string
$redirectUri string
return mixed

setAccessToken() public method

public setAccessToken ( $accessToken )

setFormat() public method

public setFormat ( $format )

Property Details

$accessToken protected_oe property

protected $accessToken

$format protected_oe property

protected $format

$host protected_oe property

protected $host

$resourse protected_oe property

protected $resourse