-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Support unauthenticated rate limited requests #2
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
Conversation
…quests subject to your application's rate limit (as opposed to the lower rate limit for anonymous requests)
whoops, looks like I wasn't watching my own repo, so I didn't get the email notification for your pull request :) This looks great. Yes, please do add tests... the main thing to test for is that, given a properly configured transport, the client_id and client_secret parameters are being appended to the request as expected. Do something similar to TestDo where you setup an http handler on "/", and inside that handler check that the client_id and client_secret request parameters have the expected values (you can see samples of this kind of checking in places like this). The setup() method will create a client for you, but for this particular test, you'll of course need to create a new client with an unauthenticated transport. |
Thanks for the comments. I've fixed the docs and will write some tests soon. |
OK, I pushed a test that checks that the querystring params are set. I believe this addresses all of your comments. Let me know if it needs anything else. Thanks! |
Hmm, Travis CI failed on this error:
I'm unable to repro it locally with or without merging, and it seems unrelated. |
merged in 03fb3ab |
Adding omitempty to base_tree in CreateTree API
This PR adds support for unauthenticated rate limited requests (http://developer.github.com/v3/#unauthenticated-rate-limited-requests), which are subject to the higher rate limit of your OAuth application but are not authenticated with any user's Github credentials.
If you are interested in merging this, let me know what kind of tests would you like to see and I will add them to this PR.
(Credit: I copied cloneRequest from code.google.com/p/goauth2/oauth.)