dolejska-daniel/riot-api

Rate limiting caching

Opened this issue · 7 comments

Does rate limiting caching only prevents you to do more requests while you are not able to? Or waits until you have permission to make more requests and keeps going with the script?

Hello, rate limiting as currently implemented raises exception when unable to send request. But I can see usage when this could be inappropriate.

Are you thinking on implementing s system where instead of raising an exception, it stays in standby until the key is able to send requests again?

It could be done..

I will need this feature, if you didn't start anything I guess I will work on it :)

We should be able to set variables when initializing the API with :

x request(s) per x seconds
exemple : LeagueAPI::SET_KEY_LIMIT_1 => 20_1 for 20 request(s) per 1 second

AND

x request(s) per x minutes
exemple : LeagueAPI::SET_KEY_LIMIT_1 => 20_1 for 100 request(s) per 2 minutes

depending on the given api key limitations.

@elreco why set limits during initialization? Key limits for each resource can be loaded after their first request.

@dolejska-daniel you are right