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

support batch requests #30

Merged
merged 2 commits into from
Sep 13, 2022
Merged

support batch requests #30

merged 2 commits into from
Sep 13, 2022

Conversation

ParanoidBat
Copy link
Contributor

Added a function batch_requests(url_array, api_token) to support batch requests.

@linear
Copy link

linear bot commented Sep 13, 2022

Copy link
Contributor

@UmanShahzad UmanShahzad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So one of the key features of batch requests in our SDKs is that we allow inputting an arbitrary number of URLs, not just the max of 1000 which is what the API limits you to.

The SDKs do internal chunking of batches into batches of 1k, and concurrently execute all of them if the language allows. See https://github.com/ipinfo/go/blob/master/ipinfo/batch.go for the golang version or https://github.com/ipinfo/node/blob/master/src/ipinfoWrapper.ts#L359-L485 for the nodejs version.

@UmanShahzad UmanShahzad merged commit d957c7a into master Sep 13, 2022
@UmanShahzad UmanShahzad deleted the be-592 branch September 13, 2022 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants