Closed yaauie closed 12 years ago
bump :)
Hey guys, It's been a while since I've worked on grackle as you can no doubt tell. I'm doing some work on it this week though and I plan to do something like this pull request. I'm not sure if it'll be a straight merge or not. I'll let you know.
Hey guys, we went a slightly different direction with this but I think we achieved the same goal. Now, after a request, you can do the following:
client.response.headers["X-Ratelimit-Remaining"]
This will give you the header value you're looking for. I've tried to avoid hard-coding in any specific things into Grackle since my goal is for it to be very flexible as Twitter makes changes. That's why I chose to give back a more generic response object instead of hard-coding a rate_limit method.
This will be in version 0.2.0 which will be out on rubygems shortly.
after each request,
client.rate_limit
contains a hash representing the available rate limit information, pulled from the headers.