This PHP library provides a highly abstract client implementation of the Europeana REST API. It allows your PHP application to query and retrieve the Europeana datasets which are published via the main Europeana Portal in a highly abstracted, developer friendly fashion.
Europeana is an internet portal that acts as an interface to books, paintings, films, museum objects and archival records that have been digitised throughout Europe. More then 2.000 institutions across Europe have contributed. These range from large names such as the Rijksmuseum, the British Library or the Louvre to regional archives and local museums.
Via Composer
$ composer require colada/europeana
You will need an API key before you can connect to the API endpoint. You can register an account an obtain a key at the Europeana Labs website.
Perform a basic search query:
$apiKey = "myRegisteredKey";
$payload = new Colada\Europeana\Payload\SearchPayload();
$payload->addQuery("Mona Lisa");
try
{
$client = new Guzzle\Client()
$apiClient = new Colada\Europeana\Transport\ApiClient($apiKey, $client);
$payloadResponse = $apiClient->send($payload);
$items = $payloadResponse->getItems();
foreach ($items as $item) {
$item->getTitle();
$item->getType();
}
} catch (new Colada\Europeana\Exception\EuropeanaException $e) {
// Process the exception
}
- API calls are modelled as a Payload -> Transport -> Response class representation.
- The response is deserialized using the JMS Serializer library into first class citizen PHP objects.
- Highly abstracted, loose coupled components for easy reuse in your own applications.
Currently these API calls are entirely of partially implemented:
Action | API call | Status |
---|---|---|
Search | search.json | Incomplete |
Record | record.json | Incomplete |
Dataset | dataset/[datasetId].json | Complete |
Provider | provider/[providerId].json | Complete |
Suggestions | suggestions.json | Complete |
Dataset (by provider) | provider/[providerId]/datasets.json | Complete |
If you have any particular questions regarding the operation of the API, please refer to the Europeana API Google Group.
$ phpunit
Please see CONTRIBUTING for details.
If you discover any security related, please email [email protected] instead of using the issue tracker.
This package is heavily inspired upon the Slack API library by Cas Leentfaar. Parts of the Slack API code where reused and adapted under the MIT License terms.
The MIT License (MIT). Please see License File for more information.