https://github.com/gbv/viaf-jskos
JSKOS wrapper to Virtual International Authority File (VIAF)
https://github.com/gbv/viaf-jskos
coli-conc jskos library service viaf
Last synced: about 1 year ago
JSON representation
JSKOS wrapper to Virtual International Authority File (VIAF)
- Host: GitHub
- URL: https://github.com/gbv/viaf-jskos
- Owner: gbv
- License: lgpl-3.0
- Archived: true
- Created: 2017-08-14T09:48:14.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-08T09:50:15.000Z (almost 9 years ago)
- Last Synced: 2025-02-24T08:16:51.996Z (over 1 year ago)
- Topics: coli-conc, jskos, library, service, viaf
- Language: PHP
- Size: 8.79 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# viaf-jskos
[](https://packagist.org/packages/gbv/viaf-jskos)
[](LICENSE)
[](https://travis-ci.org/gbv/viaf-jskos)
[](https://coveralls.io/r/gbv/viaf-jskos)
[](https://scrutinizer-ci.com/g/gbv/viaf-jskos)
[](https://packagist.org/packages/gbv/jskos)
This repository contains a wrapper to access the [Virtual International Authority File (VIAF)](http://viaf.org) in [JSKOS format](https://gbv.github.io/jskos/) via [Entity Lookup Microservice API (ELMA)](http://gbv.github.io/elma/).
# Requirements
Requires PHP 7, [jskos-rdf](https://packagist.org/packages/gbv/jskos-rdf) package and a
[HTTP client-implementation](https://packagist.org/packages/php-http/client-implementation) package.
# Installation
Install a HTTP client implementation package, e.g. [curl-client](https://packagist.org/packages/php-http/curl-client) and this package:
~~~bash
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`:
~~~php
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](https://github.com/gbv/viaf-jskos/issues).
See `CONTRIBUTING.md` of repository [jskos-php](https://packagist.org/packages/gbv/jskos) for general guidelines.
# Author and License
Jakob Voß
This package is licensed under the LGPL license (see `LICENSE` for details).