php-riot-api icon indicating copy to clipboard operation
php-riot-api copied to clipboard

Rate limiting

Open Supericy opened this issue 9 years ago • 3 comments

This pull request implements "proper" rate limiting. Essentially, you can pass in a RateLimitHandler class, which lets you handle being rate limited in whatever way you want (maybe log to a database and die, whatever). The default handler will simply sleep for the duration specified by the Retry-After header, which is provided by riot when you have exceeded your limit.

Supericy avatar Jun 25 '15 01:06 Supericy

@Supericy I'd love to get this merged in, I just haven't had time to really check and go through the code. Thank you so much though for contributing. If anyone else who regularly uses this can test/confirm it works, I'm happy to merge it in.

kevinohashi avatar Jul 02 '15 18:07 kevinohashi

Hi,

It would be great to have production ready rate limiting, more people would use this product. Please take the time to review/implement.

hsdxpro avatar Nov 05 '17 11:11 hsdxpro

@kevinohashi I got this up to date with the new URL's and api stuff, and it works for the most part. One weird thing I noticed is that it doesn't really prevent you from calling too many times, it just notices that you've called too many times, waits, then tries again. I may be wrong though, if @Supericy can explain more I think this would help a lot.

dakotawashok avatar Dec 04 '17 22:12 dakotawashok