Property | Type | Description | |
---|---|---|---|
$apiHost | string | ||
$apiVersion | string | The version of the API to use. | |
$httpClient | Http\Client\HttpClient | ||
$sslEnabled | boolean | If we should use SSL or not. |
Method | Description | |
---|---|---|
__construct ( string $apiKey, string $apiHost, Http\Client\HttpClient $httpClient = null ) | ||
delete ( string $endpointUrl ) : stdClass | ||
get ( string $endpointUrl, array $queryString = [] ) : stdClass | ||
post ( string $endpointUrl, array $postData = [], array $files = [] ) : stdClass | ||
put ( string $endpointUrl, mixed $putData ) : stdClass | ||
responseHandler ( Psr\Http\Message\ResponseInterface $responseObj ) : stdClass | ||
setApiVersion ( string $apiVersion ) : |
||
setSslEnabled ( boolean $sslEnabled ) : |
Method | Description | |
---|---|---|
getHttpClient ( ) : Http\Client\HttpClient | ||
getResponseExceptionMessage ( Psr\Http\Message\ResponseInterface $responseObj ) : string | ||
prepareFile ( string $fieldName, string | array $filePath, integer $fileIndex ) : array | Prepare a file for the postBody. | |
send ( string $method, string $uri, mixed $body = null, array $files = [], array $headers = [] ) : stdClass |
Method | Description | |
---|---|---|
generateEndpoint ( string $apiEndpoint, string $apiVersion, boolean $ssl ) : string | ||
getApiUrl ( $uri ) : string |
public __construct ( string $apiKey, string $apiHost, Http\Client\HttpClient $httpClient = null ) | ||
$apiKey | string | |
$apiHost | string | |
$httpClient | Http\Client\HttpClient |
protected getHttpClient ( ) : Http\Client\HttpClient | ||
return | Http\Client\HttpClient |
protected getResponseExceptionMessage ( Psr\Http\Message\ResponseInterface $responseObj ) : string | ||
$responseObj | Psr\Http\Message\ResponseInterface | |
return | string |
public responseHandler ( Psr\Http\Message\ResponseInterface $responseObj ) : stdClass | ||
$responseObj | Psr\Http\Message\ResponseInterface | |
return | stdClass |
public setApiVersion ( string $apiVersion ) : |
||
$apiVersion | string | |
return |
public setSslEnabled ( boolean $sslEnabled ) : |
||
$sslEnabled | boolean | |
return |
protected string $apiVersion | ||
return | string |
protected HttpClient,Http\Client $httpClient | ||
return | Http\Client\HttpClient |
protected bool $sslEnabled | ||
return | boolean |