Skip to content
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

Get Rate Limit By Calling it's API #1737

Closed
mirsaeedi opened this issue Jan 10, 2018 · 3 comments
Closed

Get Rate Limit By Calling it's API #1737

mirsaeedi opened this issue Jan 10, 2018 · 3 comments

Comments

@mirsaeedi
Copy link
Contributor

Currently, we need to call GetLastApiInfo() to get the status of our usage. This API uses the information from the last request it has sent. The problem with this approach is that in some cases we need to fetch this data from Github and the information which we have from the previous call is stale and not sufficient. What's the reasoning behind your implementation? If my argument is valid, can I send a pull request?

@ryangribble
Copy link
Contributor

Hi @mirsaeedi the reasoning is simply that the remaining API rate limit is returned in the response headers of all calls, so we may as well provide a mechanism to access that information :)

It would be awesome if you wanted to send a PR to implement the actual Rate Limit API though, then users can choose the method that is more appropriate for them 👍

@mirsaeedi
Copy link
Contributor Author

mirsaeedi commented Jan 20, 2018

@ryangribble Actually, I found that Rate Limit API has been implemented before. I will update the documentation.

gitHubeclient.Miscellaneous.GetRateLimits();

@ryangribble
Copy link
Contributor

Fixed by #1742

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants