Closed sverhoeven closed 2 years ago
The citation of a DOI can be requested using content negotiation. See https://citation.crosscite.org/docs.html
For example
curl -LH "Accept: application/vnd.citationstyles.csl+json, application/rdf+xml" https://doi.org/10.1038/s41589-020-00724-z |jq .author[1] { "ORCID": "http://orcid.org/0000-0002-5821-2060", "authenticated-orcid": false, "given": "Stefan", "family": "Verhoeven", "sequence": "additional", "affiliation": [] }
In JS it would be
(await (await fetch('https://doi.org/10.1038/s41589-020-00724-z', {headers: new Headers([ ['Accept', 'application/vnd.citationstyles.csl+json'] ])})).json())['author'][0]
if not for CORS problerms
Closing this until we have a better idea of what #466 looks like.
The citation of a DOI can be requested using content negotiation. See https://citation.crosscite.org/docs.html
For example
In JS it would be
if not for CORS problerms