Konrad Malawski
2cbe6d9d3e
Implementation and tests for Trees API
13 years ago
Will Norris
5f92f5d07f
add support for GitHub's new rate reset
Because the reset date is expressed as a Unix timestamp (rather than an
ISO 8601 timstamp), we can't directly unmarshal the JSON response.
Instead we have to do a little weird indirection to unmarshal it as an
int first, and then convert it into a proper Time object.
13 years ago
Will Norris
44e3fbe7b2
gofmt gist tests
13 years ago
Will Norris
5430af271d
update CONTRIBUTING to mention issue assignment
13 years ago
Will Norris
f30551d6e3
add note about go versions
13 years ago
Will Norris
f09961721b
use go 1.1 for travis-ci
13 years ago
Akeda Bagus
51442f25ff
Add GistsService that handles GitHub's Gists API.
fixes #18
13 years ago
Will Norris
650ab2c129
move AUTHORS and CONTRIBUTORS to root directory
13 years ago
Will Norris
b3242a387e
update copyright notice in LICENSE file
13 years ago
Will Norris
82cbe9ba19
Update boilerplate to reflect shared copyright
Since the library has received external contributions, Google is no
longer the sole copyright holder. Update the boilerplate at the top of
each file to reflect that, and add AUTHORS and CONTRIBUTORS files to
track this information.
13 years ago
Will Norris
af26438124
pass and return user emails as slices
there's no real need to use pointers here
13 years ago
Will Norris
ee53839965
add Rate to github.Client
update Do() to update client.Rate on every API call. Fixes #12
13 years ago
Will Norris
4a55603d10
remove note about squashing commits
Squashing is a little advanced, and easy to screw up with github pull
reqeusts. If needed, I generally squash them myself anyway.
13 years ago
Will Norris
2b3bfdadcd
recommend that contributors run golint
13 years ago
Akeda Bagus
9f96faa2c2
Add ListEmails, AddEmails, and DeleteEmails for Users service.
This includes tests for relevant methods. Fixes #14 .
13 years ago
Will Norris
ef0630af69
fix typo in IssueComment and return more API error data
13 years ago
Will Norris
76aa5bccb6
first pass at pull request methods
This includes most API methods on pull requests (with the exception of
listing commits and the merge functions), as well as all of the methods
for pull request comments. (Fixes #13 )
This also fixes a few oversights in the issues API.
13 years ago
Will Norris
fb261cac8d
update LICENSE to include GitHub CC-BY license
fixes #11
13 years ago
Will Norris
65fa4d43e9
add docs for issue options
13 years ago
Will Norris
b42c62fdb2
Add basic issues related methods
This adds basic methods for working with issues, assignees, and issue
comments. Issue events, labels, and milestones are not included in this
commit. (Fixes #7 )
13 years ago
Will Norris
5afbb4a7c9
add test helper methods
add methods for testing request method, request form values, and URL
parse error
13 years ago
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
f8b0ffedae
mention gocov and gocov-html for test coverage
13 years ago
Will Norris
c8dcb726ab
expand contribution guide a little
13 years ago
Will Norris
e0df0d1cc4
goauth2 no longer requires Config to be provided
13 years ago
Will Norris
7ff439cf84
fix code example in README
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
d7d20b76d3
fix .gitignore
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
Will Norris
57131f1513
simplify golden value in test case
13 years ago