toptal / disqus_api

Disqus API for ruby
MIT License
23 stars 9 forks source link

Automatically Detect Rate Limiting #9

Closed sfsekaran closed 9 years ago

sfsekaran commented 9 years ago

It would be highly convenient if this gem had the ability to automatically detect rate limiting and be configured to either stop or wait until API calls will be usable again.

andrusha commented 9 years ago

Rate limiting is not a responsibility of API-wrapper. There are many ways to solve it and the right one depends on your use-case.

As a simple solution you could use something like https://github.com/kamui/retriable to retry with carefully crafted timeouts until API is available again.