Will Norris
c3f7d49a2d
add comment for RoundTrip
13 years ago
Will Norris
691844fad5
rename url_ to u globally
golint doesn't like the underscore in "url_"
13 years ago
Will Norris
2e68086dfc
more UnauthenticatedRateLimitedTransport tests
add test to check for required fields, as well as test for default vs
custom transport.
13 years ago
Quinn Slack
03fb3ab430
Add UnauthenticatedRateLimitedTransport
This allows for making unauthenticated requests subject to your
application's rate limit (as opposed to the lower rate limit for
anonymous requests)
13 years ago
Will Norris
0a0e29b531
fix lint error with comments
13 years ago
Will Norris
e0df0d1cc4
goauth2 no longer requires Config to be provided
13 years ago
Will Norris
6a500f0a3f
add repo status methods (list and create)
13 years ago
Will Norris
d23819c93d
cleanup tests (no substantive changes)
use temporary variable for expected value to prevent mismatch between
tests and resulting error messages.
13 years ago
Will Norris
0e92a57a35
add functions for listing and creating repo forks
13 years ago
Will Norris
5be2c1f729
test invalid URL on repo creation
Also properly return a 204 response on methods that don't include a
response body. This has no actual effect on current tests, but more
accurately reflects what the GitHub API really returns and might make a
difference in the future.
13 years ago
Will Norris
487d4f8c7a
add functions for managing a team's repositories
13 years ago
Will Norris
e2b94468e8
add last two team membership functions
13 years ago
Will Norris
d3d9655fad
add ListAll and Create methods for repositories
13 years ago
Will Norris
8f5d9b1f80
extract logic for determining boolean API response
13 years ago
Will Norris
7b6dd01f45
add/update docs (no substantive changes)
13 years ago
Will Norris
fccbb9520b
add time fields and rename Users.List method
Users.List renamed to Users.ListAll to align with the forthcoming
Repositories.ListAll method.
13 years ago
Will Norris
8c2a5ff206
cleanup tests (no substantive chnages)
use temporary variable to prevent mismatch between tests and resulting
error messages.
13 years ago
Will Norris
c7c9260f07
add additional team related methods
add methods to get, create, edit, and delete org teams
13 years ago
Will Norris
7409e2ea0f
add tests for URL errors caused by invalid input
13 years ago
Will Norris
7ab719a7d3
add test for internal http client's Do() func
13 years ago
Will Norris
70dcb4084d
drop errors caused from reading error response body
if we have an error reading the body of an API error response, still
return an ErrorResposne with the original response struct. Simply
returning a string stating that we couldn't read the response body
doesn't give the caller anything actionable to work with or attempt to
process.
13 years ago
Will Norris
df13964583
don't use http.Error with empty response bodies
internally, http.Error uses fmt.Fprintln() which will append a newline
to what should be an empty response body. In one of my previous tests,
this was causing spurious errors. I've since rewritten that test, but
still best to avoid it here.
13 years ago
Will Norris
158c7cec39
add test for invalid URL passed to NewRequest
also add specific error type checking for invalid JSON test
13 years ago
Will Norris
7b9456bc0d
move library under 'github' directory
This now aligns with the (pretty strong) golang convention of the
package name matching the path basename
13 years ago