프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$apiHost | string | ||
$apiVersion | string | The version of the API to use. | |
$httpClient | Http\Client\HttpClient | ||
$sslEnabled | boolean | If we should use SSL or not. |
메소드 | 설명 | |
---|---|---|
__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 ) : |
메소드 | 설명 | |
---|---|---|
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 |
메소드 | 설명 | |
---|---|---|
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 | ||
리턴 | Http\Client\HttpClient |
protected getResponseExceptionMessage ( Psr\Http\Message\ResponseInterface $responseObj ) : string | ||
$responseObj | Psr\Http\Message\ResponseInterface | |
리턴 | string |
public responseHandler ( Psr\Http\Message\ResponseInterface $responseObj ) : stdClass | ||
$responseObj | Psr\Http\Message\ResponseInterface | |
리턴 | stdClass |
public setApiVersion ( string $apiVersion ) : |
||
$apiVersion | string | |
리턴 |
public setSslEnabled ( boolean $sslEnabled ) : |
||
$sslEnabled | boolean | |
리턴 |