psychonautwiki / bifrost

The PsychonautWiki API.
MIT License
48 stars 10 forks source link

Documentation for how to use the API via CURL, query variables #10

Closed ctrlzcomplacency closed 5 years ago

ctrlzcomplacency commented 5 years ago

Hello

I know that the GraphQL is preferred as noted in #7 I also think it is good you are taking steps to make sure that this API is controlled in some way it is a very valuable resource. I also think you should be mindful of people who wish to use the API for apps as who knows what their real intentions might be I am having difficulty understanding how the API works from the api.psychonautwiki.org If I access the API by CURL curl -i -H 'Content-Type: application/json' https://api.psychonautwiki.org/ -X POST -d '{"query": "query {substances {name}}"}' I am returned {"data":{"substances":[{"name":"1,4-Butanediol"},{"name":"1B-LSD"},{"name":"1P-ETH-LAD"},{"name":"1P-LSD"},{"name":"2-Aminoindane"},{"name":"2-FA"},{"name":"2-FEA"},{"name":"2-FMA"},{"name":"2-Fluorodeschloroketamine"},{"name":"25B-NBOH"}]}} is this a default array that is returned? Is it possible to query more of the API by CURL? Thank you in advance for your time

Screenshot 2019-05-08 at 23 06 29

19h commented 5 years ago

Take a look at https://github.com/psychonautwiki/bifrost/issues/11#issuecomment-491093934.