x-rate-limit-limit: the rate limit ceiling for that given endpoint
x-rate-limit-remaining: the number of requests left for the 15 minute window
x-rate-limit-reset: the remaining window before the rate limit resets, in UTC epoch seconds
I’m not sure if -limit and -remaining are very useful to us (we could get fancy and pick an appropriate heartbeat interval automatically based on them – see #2 – but that seems unnecessary), but we could play nice by storing the -limit and just muting any network requests until that time expires, and perhaps also include that in the error message we show to the user (assuming we show that error message at all – see #4).
According to Twitter’s documentation, the following HTTP headers are included in responses:
x-rate-limit-limit
: the rate limit ceiling for that given endpointx-rate-limit-remaining
: the number of requests left for the 15 minute windowx-rate-limit-reset
: the remaining window before the rate limit resets, in UTC epoch secondsI’m not sure if
-limit
and-remaining
are very useful to us (we could get fancy and pick an appropriate heartbeat interval automatically based on them – see #2 – but that seems unnecessary), but we could play nice by storing the-limit
and just muting any network requests until that time expires, and perhaps also include that in the error message we show to the user (assuming we show that error message at all – see #4).