Skip to content

yml/octokat

 
 

Repository files navigation

Octokat Build Status

Simple Go wrapper for the GitHub API. It's extracted from my other project. The API is inspired by octokit.rb.

GoDoc

http://godoc.org/github.com/jingweno/octokat

Example

Show a user

package main

import "github.com/jingweno/octokat"

func main() {
    client := octokat.NewClient()
    user, err := client.User("jingweno")
    // Do something with user
}

List authorizations

package main

import "github.com/jingweno/octokat"

func main() {
    client := octokat.NewClient().WithLogin("LOGIN", "PASSWORD")
    authorizations, err := client.Authorizations()
    // Do something with authorizations
}

Create a pull request

package main

import "github.com/jingweno/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"}
    pullRequest, err := client.CreatePullRequest(repo, params)
    // Do something with pullRequest
}

Release Notes

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

octokat is released under the MIT license. See LICENSE.md.

About

Simple Go wrapper for the GitHub API

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Go 100.0%