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
rodrigo moraes
708054d61e
Merge pull request #5 from DmitryBochkarev/GetOk
GetOk(r, key) (value, ok)
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
Dmitry Bochkarev
989863b11f
fix doc.go
13 years ago
Dmitry Bochkarev
3968bf33e7
GetOk(r, key) (value, ok)
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
Will Norris
facf5a78f4
add additional organization related methods
adds CheckMemberhsip, CheckPublicMembership, and RemoveMember
13 years ago
Will Norris
01e915341c
properly handle API errors with no response body
this is particularly important for methods like
Organizations.CheckMembership which return a 404 to indicate a
successful response of "false".
13 years ago
Will Norris
1329391b03
pass ListOptions to Organizations.List
also minor doc cleanup
13 years ago
Will Norris
7a48428682
gofmt
13 years ago
Will Norris
d67731f509
add support for basic User methods
includes Users.Get, Users.Edit, Users.List
13 years ago
Will Norris
83d5c799b3
minor cleanup
- standardize on "url_" for internal vars rather than "urls" or "url"
- move var definition closer to first use in several tests
- add .gitignore for test binary
13 years ago
Will Norris
d703e213f3
fix typo in README link
13 years ago
Will Norris
7abdd30732
add build status to README
13 years ago
Will Norris
86eb4da7b4
add minimal travis-ci config
13 years ago
Will Norris
c9d2c133aa
fill out readme and other docs a bit more
13 years ago
Will Norris
aa0a125b89
initial checkin of go-github code
This commit adds the core library funcationality and establishes the
general calling style and testing structure. Only a few GitHub API
methods related to organizations and repositories are included in this
first commit, mainly to cement the calling style.
13 years ago