PHP code example of nogrod / tyre24-common-php-sdk
1. Go to this page and download the library: Download nogrod/tyre24-common-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nogrod / tyre24-common-php-sdk example snippets
Configure Bearer (JWT) authorization: OAuthAccessToken
$config = Tyre24\Common\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure API key authorization: X-AUTH-TOKEN
$config = Tyre24\Common\Configuration::getDefaultConfiguration()->setApiKey('X-AUTH-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Tyre24\Common\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-AUTH-TOKEN', 'Bearer');
$apiInstance = new Tyre24\Common\Api\ArticlesApi(
// 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
);
$country = de; // string | country code in ISO 3166-1 alpha-2 (lowercase 2-letter country code).
$filter = array(new \Tyre24\Common\Model\\Tyre24\Common\Model\GetAvailableArticleTypesListFilterParameterInner()); // \Tyre24\Common\Model\GetAvailableArticleTypesListFilterParameterInner[]
$accept_language = de_DE; // string | ISO 639-1 standard language codes. As default, even for invalid values, de_DE will be used!
try {
$result = $apiInstance->getAvailableArticleTypesList($country, $filter, $accept_language);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ArticlesApi->getAvailableArticleTypesList: ', $e->getMessage(), PHP_EOL;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.