podio / podio-rb

The official Ruby wrapper for the Podio API used and maintained by the Podio team
https://podio.com
MIT License
66 stars 53 forks source link

Rate limit information #37

Closed dominicsayers closed 8 years ago

dominicsayers commented 8 years ago

I'm currently running into API rate limits during testing of my app. It would be really cool to be able to interrogate the Podio object for information about how many calls are left for a given API endpoint.

I believe this information could be gathered from the response headers as explained here: https://developers.podio.com/index/limits

dominicsayers commented 8 years ago

Bump

dmatteo commented 8 years ago

Hi Dominic,

as you pointed out, you can get the remaining calls from the headers of the last API call you made, but we don't offer any other way of retrieving the remaining API calls left.

Unfortunately we also don't offer a "timer" for when your call limit will be reset (e.g. the hour limit)

dominicsayers commented 8 years ago

My point was: if you are using the gem you don't have access to the raw headers so you can't get at the rate limit usage without making a separate API call outside the gem framework.

So...it would be good if the Podio object exposed it since it has access to the information already.