Giter Club home page Giter Club logo

europeana's Introduction

Europeana API library

Latest Version Software License Build Status Total Downloads

A PHP client library for the Europeana Portal

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.

What is Europeana?

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.

Install

Via Composer

$ composer require colada/europeana

Usage

API Key

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.

Basic example

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
}

Features

  • 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.

Documentation

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.

Testing

$ phpunit

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related, please email [email protected] instead of using the issue tracker.

Credits

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.

License

The MIT License (MIT). Please see License File for more information.

europeana's People

Contributors

netsensei avatar chrisvdd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.