264 captures
09 Dec 2013 - 10 Jan 2026
Feb MAR Apr
23
2015 2016 2017
success
fail

About this capture

COLLECTED BY

Organization: Internet Memory Foundation

Data crawled on behalf of Internet Memory Foundation. This data is currently not publicly accessible.

from Wikipedia:
The Internet Memory Foundation (formerly the European Archive Foundation) is a non profit foundation whose purpose is archiving web content, it supports projects and research which include the preservation and protection of multimedia content. Its archives form a digital library of cultural content.

Collection: Internet Memory Foundation

Data crawled on behalf of Internet Memory Foundation. This data is currently not publicly accessible.

from Wikipedia:
The Internet Memory Foundation (formerly the European Archive Foundation) is a non profit foundation whose purpose is archiving web content, it supports projects and research which include the preservation and protection of multimedia content. Its archives form a digital library of cultural content.

TIMESTAMPS

The Wayback Machine - http://web.archive.org/web/20160323181457/https://github.com/google/go-github
 
Skip to content  

Learn more  
Please note that GitHub no longer supports Internet Explorer versions 7 or 8.

We recommend upgrading to the latest Internet Explorer, Google Chrome, or Firefox.

If you are using IE 11, make sure you turn off "Compatibility View".
 




Sign up  Sign in  












Watch  

Star  

Fork  

/go-github

 

 




Go library for accessing the GitHub API    





442   commits  

1 branch  

0   releases  

82 contributors  




(一) Go 100.0%  






Go



Find file  




Download ZIP  






Switch branches/tags  





Branches  

Tags  





master  

Nothing to show
 




Nothing to show
 







Latest commit   44e82c5   16   @pzurek pzurek  committed with gmlewis   Fixes path escaping for Repositories.GetContents    
Fixes #308.
Fixes #309.

Change-Id: I71d1422c90f32cc6e6834ed428a311a2b2b88778



 
Failed to load latest commit information.
examples add support for HTTP Basic Authentication
github Fixes path escaping for Repositories.GetContents
tests gofmt -s
.gitignore fix .gitignore
.travis.yml bump minimum tested version to go 1.4
AUTHORS add Isao Jonas as contributor
CONTRIBUTING.md CONTRIBUTING: remove paragraph that was rewritten
CONTRIBUTORS add Isao Jonas as contributor
LICENSE include full text of creative commons license
README.md update required go version to 1.4


README.md  

go-github


go-github is a Go client library for accessing the GitHub API.

Documentation: GoDoc Mailing List: go-github@googlegroups.com
Build Status: Build Status Test Coverage: Test Coverage(gocov report)

go-github requires Go version 1.4 or greater.

Usage


import "github.com/google/go-github/github"


Construct a new GitHub client, then use the various services on the client to access different parts of the GitHub API. For example, to list all organizations for user "willnorris":

client := github.NewClient(nil)
orgs, _, err := client.Organizations.List("willnorris", nil)


Some API methods have optional parameters that can be passed. For example, to list public repositories for the "github" organization:

client := github.NewClient(nil)
opt := &github.RepositoryListByOrgOptions{Type: "public"}
repos, _, err := client.Repositories.ListByOrg("github", opt)

Authentication


The go-github library does not directly handle authentication. Instead, when creating a new client, pass an http.Client that can handle authentication for you. The easiest and recommended way to do this is using the oauth2 library, but you can always use any other library that provides an http.Client. If you have an OAuth2 access token (for example, a personal API token), you can use it with oauth2 using:

func main() {
  ts := oauth2.StaticTokenSource(
    &oauth2.Token{AccessToken: "... your access token ..."},
  )
  tc := oauth2.NewClient(oauth2.NoContext, ts)

  client := github.NewClient(tc)

  // list all repositories for the authenticated user
  repos, _, err := client.Repositories.List("", nil)
}


See the oauth2 docs for complete instructions on using that library.

For API methods that require HTTP Basic Authentication, use the BasicAuthTransport.

Pagination


All requests for resource collections (repos, pull requests, issues, etc) support pagination. Pagination options are described in the github.ListOptions struct and passed to the list methods directly or as an embedded type of a more specific list options struct (for example github.PullRequestListOptions). Pages information is available via github.Response struct.

client := github.NewClient(nil)
opt := &github.RepositoryListByOrgOptions{
  Type: "public",
  ListOptions: github.ListOptions{PerPage: 10, Page: 2},
}
repos, resp, err := client.Repositories.ListByOrg("github", opt)
fmt.Println(resp.NextPage) // outputs 3


For complete usage of go-github, see the full package docs.

Integration Tests


You can run the integration tests from from the tests directory with:

GITHUB_AUTH_TOKEN=<your api token>gotest ./...


You can create a token here: https://github.com/settings/tokens

These scopes are needed:


repo

delete_repo

user

admin:public_key

Roadmap


This library is being initially developed for an internal application at Google, so API methods will likely be implemented in the order that they are needed by that application. You can track the status of implementation in this Google spreadsheet. Eventually, I would like to cover the entire GitHub API, so contributions are of course always welcome. The calling pattern is pretty well established, so adding new methods is relatively straightforward.

License


This library is distributed under the BSD-style license found in the LICENSE file.
 










Status

API

Training

Shop

Blog

About
 


© 2016 GitHub, Inc.

Terms

Privacy

Security

Contact

Help
 



Something went wrong with that request. Please try again.  

You signed in with another tab or window. Reload to refresh your session.  You signed out in another tab or window. Reload to refresh your session.