Giter VIP home page Giter VIP logo

harbour-service's Introduction

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

harbour-service's People

Contributors

jonnybazookatone avatar marblestation avatar romanchyla avatar

Watchers

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