PHP Class DirkGroenen\Pinterest\Transport\Request

显示文件 Open project: dirkgroenen/pinterest-api-php Class Usage Examples

Protected Properties

Property Type Description
$access_token string Access token

Public Methods

Method Description
__construct ( DirkGroenen\Pinterest\Utils\CurlBuilder $curlbuilder ) Constructor
delete ( string $endpoint, array $parameters = [] ) : DirkGroenen\Pinterest\Transport\Response Make a delete request to the given endpoint
execute ( string $method, string $apiCall, array $parameters = [], array $headers = [] ) : DirkGroenen\Pinterest\Transport\Response Execute the http request
get ( string $endpoint, array $parameters = [] ) : DirkGroenen\Pinterest\Transport\Response Make a get request to the given endpoint
getHeaders ( ) : array Return the headers from the last request
post ( string $endpoint, array $parameters = [] ) : DirkGroenen\Pinterest\Transport\Response Make a post request to the given endpoint
setAccessToken ( string $token ) : void Set the access token
update ( string $endpoint, array $parameters = [], array $queryparameters = [] ) : DirkGroenen\Pinterest\Transport\Response Make an update request to the given endpoint

Method Details

__construct() public method

Constructor
public __construct ( DirkGroenen\Pinterest\Utils\CurlBuilder $curlbuilder )
$curlbuilder DirkGroenen\Pinterest\Utils\CurlBuilder

delete() public method

Make a delete request to the given endpoint
public delete ( string $endpoint, array $parameters = [] ) : DirkGroenen\Pinterest\Transport\Response
$endpoint string
$parameters array
return DirkGroenen\Pinterest\Transport\Response

execute() public method

Execute the http request
public execute ( string $method, string $apiCall, array $parameters = [], array $headers = [] ) : DirkGroenen\Pinterest\Transport\Response
$method string
$apiCall string
$parameters array
$headers array
return DirkGroenen\Pinterest\Transport\Response

get() public method

Make a get request to the given endpoint
public get ( string $endpoint, array $parameters = [] ) : DirkGroenen\Pinterest\Transport\Response
$endpoint string
$parameters array
return DirkGroenen\Pinterest\Transport\Response

getHeaders() public method

Return the headers from the last request
public getHeaders ( ) : array
return array

post() public method

Make a post request to the given endpoint
public post ( string $endpoint, array $parameters = [] ) : DirkGroenen\Pinterest\Transport\Response
$endpoint string
$parameters array
return DirkGroenen\Pinterest\Transport\Response

setAccessToken() public method

Set the access token
public setAccessToken ( string $token ) : void
$token string
return void

update() public method

Make an update request to the given endpoint
public update ( string $endpoint, array $parameters = [], array $queryparameters = [] ) : DirkGroenen\Pinterest\Transport\Response
$endpoint string
$parameters array
$queryparameters array
return DirkGroenen\Pinterest\Transport\Response

Property Details

$access_token protected_oe property

Access token
protected string $access_token
return string