--
You received this message because you are subscribed to the Google Groups "doaj-public-api" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doaj-public-a...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/doaj-public-api/c9ff7c83-356b-4c9b-a04c-56c76cc0fb16n%40googlegroups.com.
Hi Trent,
Thanks for pointing this out, it's a little misleading on our documentation page - as Richard points out, the query string is on the URL path rather than a URL parameter. Just minor changes needed to your snippet:
import requests from urllib.parse import quote, urljoin base_url = 'https://doaj.org/api/search/articles/' search_string = quote('title:micro-tensile test') url_params = { 'page': 0, 'pageSize': 100 } api_return = requests.get(urljoin(base_url, search_string), params=url_params) print(api_return.request.url) print(api_return.json().get('results', []))
has the following (truncated) result
https://doaj.org/api/search/articles/title%3Amicro-tensile%20test?page=0&pageSize=100 [{'last_updated': '2021-03-30T23:01:40Z', 'bibjson': {'identifier': [{'id': '10.3390/polym13071093', 'type': 'doi'}, ...
Our API currently works only via path and parameters in the URL - we don't currently support loading those from the request body, since a GET with a payload is a bit anomalous. In any case, HTTPS ensures the path and parameters are encrypted.
Cheers,
Steve
To view this discussion on the web, visit https://groups.google.com/d/msgid/doaj-public-api/CAJaHguqi0Nu-AiRPi0E_VR6q5zJysPFw8u9sA0N_3yF%3DSYfCqg%40mail.gmail.com.
-- Steven Eardley Partner, Cottage Labs https://cottagelabs.com https://technoantics.com