-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rate limit header #522
Comments
I've already implemented it here, Shopify@266ff05. I needed it for some of Shopify's FB apps. The tests are failing all over the place, though, so, if someone can help with that, I can put a pull request together. |
Something like this would be fantastic! |
Sorry about the late response. This is a great idea. There's already support for getting the whole response object, but that's not really useful in this case. Do you think it's better to expose all the headers or just the rate limiting info? @batasrki, I've fixed the failing tests in master for version 3.0 — if you want to make a PR against that that would be awesome. Thank you! |
@arsduo as soon as I have some time, I'll make a PR and we can discuss what to return. I think returning the headers in full would be good, as well as adding convenience functions to pull certain useful things out of the headers. |
Good news! #589 was merged, which exposes the headers for all GraphCollection objects. For non-GraphCollection objects, you can use If you upgrade to |
According to the rate limit docs, there's now a header that contains rate limiting information. I'd like to add support for this, but can I request some design suggestion from you @arsduo? Would it make sense to add this information to the
GraphCollection
and other result objects? It's not really an error per se, but an indicator that an error might occur soon due to rate limiting, so I think it makes sense to pass this onto the result objects as a hash attr.The text was updated successfully, but these errors were encountered: