oibackoff | incremental backoff flow-control for any : fn function
kandi X-RAY | oibackoff Summary
kandi X-RAY | oibackoff Summary
Incremental backoff flow-control for any fn(function(err, data) { ... });.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of oibackoff
oibackoff Key Features
oibackoff Examples and Code Snippets
Community Discussions
Trending Discussions on oibackoff
QUESTION
I'm trying to make several requests to the BoardGameGeek (BGG) API and after a certain amount of requests within a certain time frame, I get timed out (status code 429). I've tried a couple of libraries to try and get this to work.
I've tried using the simple-rate-limiter library as below, but this didn't work because BGG seems pretty aggressive with their rate limiting and they don't publish official limits anyways.
...ANSWER
Answered 2020-Jul-29 at 00:14This solution is specifically for the BoardGameGeek API.
So instead of doing a bunch of individual requests such as:
/xmlapi2/thing?stats=1&id=188920
/xmlapi2/thing?stats=1&id=174476
You can batch them all into one request like this:
/xmlapi2/thing?stats=1&id=188920,174476
This means that you're only sending off 1 request and will not get rate limited.
I did find out that this still does fail if you attach over ~1200 game ids though. The server responds with 414 Request-URI Too Large
.
Here's an example of that error.
If you need more then 1200 then you'll probably have to split the game ids and make multiple requests so that you only request 1200 at a time.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install oibackoff
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page