adsabs / adsabs-dev-api

Developer API service description and example client code
163 stars 58 forks source link

Typo in document #36

Open acscott opened 6 years ago

acscott commented 6 years ago

Hi, for the example to get specific metrics (https://github.com/adsabs/adsabs-dev-api/blob/master/metrics.md) I tried using "types" delimited by single apostrophe but the server didn't like it: curl -H "Authorization: Bearer " -H "Content-Type: application/json" -X POST -d '{"bibcodes":["1980ApJS...44..137K","1980ApJS...44..489B"],'types':['basic']}' https://api.adsabs.harvard.edu/v1/metrics

So I changed it to be consistent with the bibcodes and use double-quotes and it worked.

Hope this helps someone.

taylorshaulis commented 6 years ago

Thank you for reporting this @acscott

I can confirm this issue

The example documented breaks out of the data (-d) argument string which is enclosed in single quotes