Simple Go wrapper for the GitHub API. It's extracted from my other project. The API is inspired by octokit.rb.
https://godoc.org/github.com/crosbymichael/octokat
package main
import "github.com/crosbymichael/octokat"
func main() {
client := octokat.NewClient()
user, err := client.User("jingweno", nil)
// Do something with user
}
package main
import "github.com/crosbymichael/octokat"
func main() {
client := octokat.NewClient().WithLogin("LOGIN", "PASSWORD")
authorizations, err := client.Authorizations(nil)
// Do something with authorizations
}
package main
import "github.com/crosbymichael/octokat"
func main() {
client := octokat.NewClient().WithToken("OAUTH_TOKEN")
repo := octokat.Repo{Name: "octokat", UserName: "jingweno"}
params := octokat.PullRequestParams{Base: "master", Head: "feature", Title: "A pull request", Body: "A body"}
options := octokat.Options{Params: params}
pullRequest, err := client.CreatePullRequest(repo, &options)
// Do something with pullRequest
}
See Releases.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
octokat is released under the MIT license. See LICENSE.md.