<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
danskernesdigitalebibliotek / ddb-cover-service-php-client example snippets
onfigure OAuth2 access token for authorization: oauth
$config = CoverService\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new CoverService\Api\CoverApi(
// 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
);
$type = "type_example"; // string | The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn'
$identifiers = array("identifiers_example"); // string[] | A list of identifiers of {type}. Maximum number os identifiers per reqeust is 200
$sizes = array("sizes_example"); // string[] | A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive.
try {
$result = $apiInstance->getCoverCollection($type, $identifiers, $sizes);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CoverApi->getCoverCollection: ', $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.