Signs API requests and allows interaction via cURL methods.
/**
* Setup
*/
$companyId = 0000;// company id provided by Kobas
$clientId = '';// client id provided by Kobas
$clientSecret = '';// client secret provided by Kobas
$clientScope = ''; // client scope provided by Kobas
$provider = new \Kobas\APIClient\Auth\Provider($companyId, $clientId, $clientSecret, $clientScope);
$client = new \Kobas\APIClient\Client($provider);
/**
* Usage
*/
$response = $client->get('customer/search', ['email' => '[email protected]']);
echo json_encode($response, JSON_PRETTY_PRINT);
Sends a HTTP GET Request to the route provided.
Sends a HTTP POST Request to the route provided.
Sends a HTTP PUT Request to the route provided.
Sends a HTTP DELETE Request to the route provided.
Returns the result of curl_getinfo()
on the last request made as an array.
Allows over-riding the base URL (only really needed for development)
Allows over-riding of the API version. Might be useful in future?