Affects Version/s: 2.2.3
Fix Version/s: None
Component/s: Webservice & Networking
Some servers return rate limit information in the server headers (Apiseeds does this now, but also MB services do it).
If should adapt our rate limiting code to adapt to this and respect the limiting reported by the service. There are some variations in this, though.
MB reports the rate limit like:
Apiseed will respond with something like:
The have a limit of 100 requests, once those are exhausted x-ratelimit-remaining will be 0 and x-retry-after gives a wait time in seconds.
For an implementation handling the MB rate limit see https://github.com/phw/rhythmbox-plugin-listenbrainz/blob/master/listenbrainz/client.py#L150
I think we could incorporate this in the existing rate limiting code.