2017 © Pedro Peláez
 

project orcid-jskos

JSKOS wrapper to the public ORCID API

image

gbv/orcid-jskos

JSKOS wrapper to the public ORCID API

  • Tuesday, September 19, 2017
  • by gbv
  • Repository
  • 4 Watchers
  • 3 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

This repository contains a wrapper written in PHP to access the public ORCID API in JSKOS format via Entity Lookup Microservice API (ELMA)., (*1)

Background

The Open Researcher and Contributor ID (ORCID) is a code to uniquely identify scientific and other academic authors and contributors. ORCID identifiers are a subset of the International Standard Name Identifier (ISNI) consisting of 16 digits in four groups. The final character may also be an X. The identifier is prefixed by http://orcid.org/ to get an URI. For example:, (*2)

0000-0002-2997-7611
http://orcid.org/0000-0002-2997-7611

ORCID organization provides a public API to access and search for ORCID profiles. Access to the API requires credentials in form of a "client id" and a "client secret" as decribed at http://support.orcid.org/knowledgebase/articles/343182., (*3)

Requirements

Requires the jskos-php PHP library., (*4)

You also need client credentials from your ORCID profile to access the ORIC API., (*5)

Installation

composer require gbv/jskos-bartoc

This will automatically create composer.json for your project (unless it already exists) and add orcid-jskos as dependency. Composer also generates vendor/autoload.php to get autoloading of all dependencies., (*6)

Usage

Use as library

The wrapper can be used as instance of class ORCIDService, a subclass of \JSKOS\Service:, (*7)

require 'vendor/autoload.php';

$service = new ORCIDService($client_id, $client_secret);

See jskos-php-examples for an example how to use the wrapper as part of a larger PHP application., (*8)

Local webservice for testing

To use as server you also need an implementation of Http\Message\ResponseFactory, e.g., (*9)

$ composer require php-http/guzzle6-adapter

Locally run the application on port 8080 as following:, (*10)

$ composer install
$ ORCID_CLIENT_ID=... ORCID_CLIENT_SECRET=... php -S localhost:8080

You can also put credentials into credentials.php as described above., (*11)

Given valid credentials, ORCID profiles can be accessed in JSKOS like this:, (*12)

Webservice via Apache webserver

  1. Run composer install to download dependencies into directory vendor, (*13)

  2. Add a file credentials.php with client credentials as following:, (*14)

    <?php
    define('ORCID_CLIENT_ID', '...');
    define('ORCID_CLIENT_SECRET', '...');
    

You may add a rule to disallow direct access to all except index.php:, (*15)

Require all denied
<Files index.php>
    Require all granted
</Files>

Webservice at Heroku

  1. Create an app
  2. Configure the app
  3. Deploy the app

In short:, (*16)

$ heroku create
$ heroku config:set ORCID_CLIENT_ID=...
$ heroku config:set ORCID_CLIENT_SECRET=...
$ git push heroku master

Contributung

Bugs and feature request are tracked on GitHub., (*17)

See CONTRIBUTING.md of repository jskos-php for general guidelines., (*18)

Author and License

Jakob Voß jakob.voss@gbv.de, (*19)

orcid-jskos is licensed under the LGPL license (see LICENSE for details)., (*20)

The Versions

19/09 2017

dev-master

9999999-dev

JSKOS wrapper to the public ORCID API

  Sources   Download

LGPL AGPL

The Requires

 

The Development Requires

by Jakob Voss

orcid jskos

19/09 2017

0.2.0

0.2.0.0

JSKOS wrapper to the public ORCID API

  Sources   Download

LGPL

The Requires

 

The Development Requires

by Jakob Voss

orcid jskos

05/04 2017

0.1.3

0.1.3.0

JSKOS wrapper to the public ORCID API

  Sources   Download

LGPL

The Requires

 

by Jakob Voss

orcid jskos

18/10 2016

0.1.2

0.1.2.0

JSKOS wrapper to the public ORCID API

  Sources   Download

AGPL

The Requires

 

by Jakob Voss

orcid jskos

10/08 2016

0.1.1

0.1.1.0

JSKOS wrapper to the public ORCID API

  Sources   Download

AGPL

The Requires

 

by Jakob Voss

orcid jskos

10/08 2016

0.1.0

0.1.0.0

JSKOS wrapper to the public ORCID API

  Sources   Download

AGPL

The Requires

 

by Jakob Voss

orcid jskos