You can install this package with composer:
composer require crmcarecloud/api-php-client:^2.0
Usage and the examples are available in folder docs
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = CrmCareCloud\Webservice\RestApi\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
// Configure HTTP bearer authorization: bearerAuth
$config = CrmCareCloud\Webservice\RestApi\Client\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new CrmCareCloud\Webservice\RestApi\Client\Api\CardsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$card_id = "card_id_example"; // string | The unique id for the card
$accept_language = "cs, en-gb;q=0.8"; // string | The unique id of the language code by ISO 639-1
try {
$result = $apiInstance->getCard($card_id, $accept_language);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CardsApi->getCard: ', $e->getMessage(), PHP_EOL;
}
?>