Closed beckyconning closed 4 years ago
Oh I accidentally tied it to one specific endpoint, will fix that.
This is ready for review : )
Anything I can do to move this forwards?
Hi @beckyconning, is a header like the one below accurate to what you'd expect given the request?
Request:
http://api.fda.gov/drug/label.json?skip=100&limit=100
Header:
Link →<http://api.fda.gov/drug/label.json?skip=200&limit=100>; rel="next"
Sorry for the slow reply. Yes thats exactly right if <http://api.fda.gov/drug/label.json?skip=200&limit=100>; rel="next"
is the header value and Link
is the header name.
Other parameters should be passed over as well so for example.
http://api.fda.gov/drug/label.json?skip=100&limit=100&search=original_receive_date:[20040101+TO+20161107]
should return
Link
<http://api.fda.gov/drug/label.json?skip=200&limit=100&search=original_receive_date:[20040101+TO+20161107]>; rel="next"
or equivalent
@beardedfinch let me know if there is anything I can do to help 😀
@beckyconning This is being pushed to Production as we speak; we'll let you know once done. 👍
Fantastic, thank you so much @dkrylovsb et al!
Just a note I think the per_page values in the link header next relation should be set to the max allowed by the service when not specified in the initial request.
we'll let you know once done
Will you let me know here or elsewhere?
@beckyconning Hi Becky, it's in Production.
Fantastic! Seems to work great. One change I'd love to see is if the page size was set to 100 rather than 1 by default. Thanks so much for your work! Where is the code for this? Is it this PR or another PR? I can't see it in the repo. Thanks again!
Additionally api key and other provided query parameters are not shown in the link header next relation.
Closing this as this has been implemented elsewhere since I opened this. Note you will need to provide API key as basic auth username for this to work.
103