Closed JamesChevalier closed 5 years ago
Nice and easy.
You might still want to do #11 ;)
🤔 Do you think it's worth mentioning details about how to access the data in the README?
For example...
accessing the current usage:
quarterly_usage, daily_usage = e.headers["x-ratelimit-usage"].split(',').map(&:to_i)
and accessing the current limits:
quarterly_limits, daily_limits = e.headers["x-ratelimit-limit"].split(',').map(&:to_i)
👍 Yeah, I still want to get these details into each response. I don't have a lot of confidence in how I'll approach that, so that pull request probably won't be a quick merge like this. 😄
Definitely useful for a README, can't hurt.
You could wrap headers
into a class and expose an additional method called x_rate_limit
and expose limit
and usage
as first class objects, too.
Why:
x-ratelimit-limit
andx-ratelimit-usage
How:
message
anderrors
CHANGELOG.md
file, as requestedREADME.md
file to include the existence ofe.headers
, and include a truncated example of its valueRelevant Links: