You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why don't we have the HypixelAPI instance offer an enableRateLimiter(boolean), which would query the key method of the API and extract the limit member. And have all requests to the API be put inside some sort of queue that would ensure that it only processes (limit) requests per minute. For example, say my limit is 120, the default, I attempt to run a bulk operation consisting of more than 120 requests every once in a while. Instead of having the overflow requests send me an error response, the rate limiter interface between the endpoint and the client library would simply lock my pending requests until the minute is over, and the next minute begins. Many client APIs follow this convention. This would absolutely ensure that I get all the data I need, without any losses.
This discussion was converted from issue #316 on December 15, 2020 01:26.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Why don't we have the
HypixelAPI
instance offer anenableRateLimiter(boolean)
, which would query thekey
method of the API and extract thelimit
member. And have all requests to the API be put inside some sort of queue that would ensure that it only processes (limit) requests per minute. For example, say my limit is 120, the default, I attempt to run a bulk operation consisting of more than 120 requests every once in a while. Instead of having the overflow requests send me an error response, the rate limiter interface between the endpoint and the client library would simply lock my pending requests until the minute is over, and the next minute begins. Many client APIs follow this convention. This would absolutely ensure that I get all the data I need, without any losses.EDIT: Working on this in PR #327
Beta Was this translation helpful? Give feedback.
All reactions