mike-burns/github — Issue #8: As a developer I want to see the rate limit so I don't go over the limit
Author: mike-burns
Created: 2012-01-28 13:31:06+00:00
State: open
Labels: API change, feature

Each response from the underlying JSON API contains rate limiting information: how many requests we've made, and how many remain. It would be good to use this information.

Some proposals:

a) Produce the rate limiting data as part of every response data type, including `Error`.
b) Provide a function that makes a request then produces just the rate limiting data.
c) Track the rate limit internally and automatically slow requests as the limit approaches.

Since this API is rather low level still, it makes sense to provide access to this data. (c) should be in a different library, perhaps named `github-convenience` or so.

In common use I'd think (a) is most useful; otherwise each request would need to be followed by another request immediately.