Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update useGetPubmedIds hook #795

Open
nicoalee opened this issue Jul 23, 2024 · 0 comments
Open

update useGetPubmedIds hook #795

nicoalee opened this issue Jul 23, 2024 · 0 comments
Assignees
Labels

Comments

@nicoalee
Copy link
Collaborator

nicoalee commented Jul 23, 2024

Currently, the useGetPubmedIDs hook assumes that we are only able to submit 1,500 requests at once (500 ids per request, 3 requests per second). I initially foolishly implemented this to just have a max of 1,500. However, we can use the executeHTTPRequestsInBatches function to overwrite this so that we can accept any number of HTTP requests.

In the future, we can also add a Pubmed API key to increase the rate limit to 10 requests per second if our current volume is not enough. I believe we already add a pubmed API key in the sleuth import, so it would be trivial to just do that here too.

Finally, this hooks needs to be turned into a useMutation query, to allow for more granularity and control when it comes to querying for IDs.

@nicoalee nicoalee converted this from a draft issue Jul 23, 2024
@nicoalee nicoalee self-assigned this Jul 23, 2024
@nicoalee nicoalee added enhancement New feature or request low-priority labels Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

1 participant