Open kyleniemeyer opened 8 years ago
Code from @kyleniemeyer to handle this:
dc = habanero.Crossref(base_url='https://api.datacite.org')
res = dc.works(ids = '10.7287/peerj.preprints.2169')
The API shown above is for members only, the API in this post is the public API
Currently the DOI validator (in branch doi-validator, to be merged via PR #4 ) only supports Crossref DOIs. While most journal papers will have these, we also need to support other DOI registration agencies, in particular DataCite, since paper & data repositories such as Figshare and Zenodo provide DataCite DOIs.
Fortunately, there is a Python package for accessing the DataCite API: http://datacite.readthedocs.io/en/latest/.
This should be added to
_validate_isvalid_reference()
inchemked/validation.py
as a fallback option if the Crossref API returns anHTTPError
.