This microservice provides links to external resources such as publisher's full text, data links, etc.
$ virtualenv python
$ source python/bin/activate
$ pip install -r requirements.txt
$ pip install -r dev-requirements.txt
$ vim local_config.py # edit, edit
$ alembic upgrade head # initialize database
On your desktop run:
$ py.test
curl -H "Authorization: Bearer <your API token>" -X GET https://api.adsabs.harvard.edu/v1/resolver/<bibcode>
For example to return all links associated with 2017arXiv170909566R, you would do
curl -H "Authorization: Bearer <your API token>" -X GET https://api.adsabs.harvard.edu/v1/resolver/2017arXiv170909566R
curl -H "Authorization: Bearer <your API token>" -X GET https://api.adsabs.harvard.edu/v1/resolver/<bibcode>/<link_type>
For example to return links for all full text sources, you would do
curl -H "Authorization: Bearer <your API token>" -X GET https://api.adsabs.harvard.edu/v1/resolver/2013MNRAS.435.1904M/esource
<link_type>
is one of the following (case-insensitive):
Please note that these links types' endpoints differ slightly from the rest of link types:
curl -H "Authorization: Bearer <your API token>" -X GET https://api.adsabs.harvard.edu/v1/resolver/<bibcode>/<Identification Link Type>:<id>
where Identification Link Types are: doi
or arXiv
and id
is their respective identification. For example
curl -H "Authorization: Bearer <your API token>" -X GET https://dev.adsabs.harvard.edu/v1/resolver/2010ApJ...713L.103B/doi:10.1088/2041-8205/713/2/L103
curl -H "Authorization: Bearer <your API token>" -X GET https://dev.adsabs.harvard.edu/v1/resolver/2018arXiv180303598K/arXiv:1803.03598
curl -H "Authorization: Bearer <your API token>" -X PUT https://api.adsabs.harvard.edu/v1/resolver/update -d @dataLinksRecordList.json -H "Content-Type: application/json"
where dataLinksRecordList.json contains data in the format of protobuf structure DataLinksRecordList.
Golnaz