gbv / viaf-jskos
JSKOS wrapper to Virtual International Authority File (VIAF)
Requires
- php: >=7.0
- gbv/jskos: ^0.3.4
- gbv/jskos-http: ^0.2.1
- gbv/jskos-rdf: ^0.3
Requires (Dev)
- php-http/curl-client: ^1.0
- phpunit/phpunit: ^6.1
This package is auto-updated.
Last update: 2024-09-11 18:04:01 UTC
README
This repository contains a wrapper to access the Virtual International Authority File (VIAF) in JSKOS format via Entity Lookup Microservice API (ELMA).
Requirements
Requires PHP 7, jskos-rdf package and a HTTP client-implementation package.
Installation
Install a HTTP client implementation package, e.g. curl-client and this package:
composer require php-http/curl-client gbv/viaf-jskos
This will automatically create composer.json
for your project (unless it already exists) and add viaf-jskos as dependency. Composer also generates vendor/autoload.php
to get autoloading of all dependencies.
Usage
The wrapper can be used as instance of class \JSKOS\Service\VIAF
, a subclass of \JSKOS\Service
:
require 'vendor/autoload.php'; $service = new \JSKOS\Service\VIAF(); $jskos = $service->queryURI("http://viaf.org/viaf/102333412"); $jskos = $service->query(["uri" => "http://viaf.org/viaf/102333412"]); $jskos = $service->query(["notation" => "102333412"]);
This repository contains a command line script to query VIAF in JSKOS format:
php examples/viaf2jskos.php http://viaf.org/viaf/102333412
php examples/viaf2jskos.php 102333412
php examples/viaf2jskos.php Jane Austen
Contributung
Bugs and feature request are tracked on GitHub.
See CONTRIBUTING.md
of repository jskos-php for general guidelines.
Author and License
Jakob Voß jakob.voss@gbv.de
This package is licensed under the LGPL license (see LICENSE
for details).