PHP Class CityAds_Api

Afficher le fichier Open project: fubralimited/php-oara Class Usage Examples

Protected Properties

Свойство Type Description
$accessToken
$format
$host
$resourse

Méthodes publiques

Méthode 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

Méthode Description
checkedResponse ( $response )
statusProcess ( $data )

Method Details

get() public méthode

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

getAccessToken() public méthode

public getAccessToken ( )

getAuthorizeUrl() public méthode

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

getFormat() public méthode

public getFormat ( )

login() public méthode

public login ( $accessToken = null )

post() public méthode

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

put() public méthode

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

requestAccessToken() public méthode

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
Résultat mixed

setAccessToken() public méthode

public setAccessToken ( $accessToken )

setFormat() public méthode

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