Sign inSign up

adsabs/harbour-service

By adsabs

Updated over 8 years ago

Gateway service to the ADS legacy systems

Image
0

238

adsabs/harbour-service repository overview

Build Status Coverage Status Code Climate Issue Count

harbour-service

Gateway service for all your ADS communication with legacy systems, such as Classic and BEER/2.0

ADS Classic Workflow

  1. User enters their 'email', 'password', and 'mirror' for their ADS credentials
user> curl -X POST 'http://api/v1/harbour/auth/classic' -H 'Authorization: Bearer <TOKEN>'
--data '{"classic_email": "email", "classic_password": "password", "classic_mirror": "mirror"}'

200, {"classic_email": "email", "classic_mirror": "mirror"}
  1. If the user does not know the mirror, they can access a list of available mirrors for the service
user> curl -X GET 'http://api/v1/harbour/mirrors' -H 'Authorization: Bearer <TOKEN>'

200, ['site1', 'site2', ...., 'siteN']
  1. User wants to check the credentials they have stored
user> curl -X GET 'http://api/v1/harbour/user' -H 'Authorization: Bearer <TOKEN>'

200, {"classic_email": "email", "classic_mirror": "mirror", "twopointoh_email": ""}
  1. User imports the libraries from ADS Classic
user> curl -X GET 'http://api/v1/biblib/import/classic' -H 'Authorization: Bearer <TOKEN>'

200, [{"action": "created", "library_id": "fdsfsfsdfdsfds", "name": "Name", "num_added": 4, "description": "Description"}, {"action": "created", "library_id": "dsadsadsadsa", "name": "Name2", "n
um_added": 4, "description": "Description2"}]

ADS 2.0 Workflow

  1. User enters their 'email' and 'password' for their ADS 2.0 credentials
user> curl -X POST 'http://api/v1/harbour/auth/twopointoh' -H 'Authorization: Bearer <TOKEN>'
--data '{"twopointoh_email": "email", "twopointoh_password": "password"}'

200, {"twopointoh_email": "email", "twopointoh_authed": true}
  1. User wants to check the credentials they have stored
user> curl -X GET 'http://api/v1/harbour/user' -H 'Authorization: Bearer <TOKEN>'

200, {"classic_email": "", "classic_mirror": "", "adstwopointoh_email": "email"}
  1. User imports the libraries from ADS 2.0
user> curl -X GET 'http://api/v1/biblib/import/twopointoh' -H 'Authorization: Bearer <TOKEN>'

200, [{"action": "created", "library_id": "fdsfsfsdfdsfds", "name": "Name", "num_added": 4, "description": "Description"}, {"action": "created", "library_id": "dsadsadsadsa", "name": "Name2", "n
um_added": 4, "description": "Description2"}]
  1. User exports their ADS 2.0 libraries for use in Zotero
user> curl -LO -X GET 'http://api/v1/harbour/export/twopointoh/zotero' -H 'Authorization: Bearer <TOKEN>'

Notes The mirror they can use must be in the list defined in config.py.

Development

You can run unit tests in the following way:

nosetests harbour/tests/

A Vagrantfile and puppet manifest are available for development within a virtual machine. To use the vagrant VM defined here you will need to install Vagrant and VirtualBox.

To load and enter the VM: vagrant up && vagrant ssh

Tag summary

Content type

Image

Digest

Size

277.8 MB

Last updated

over 8 years ago

docker pull adsabs/harbour-service