{"id":13601299,"url":"https://github.com/octokit/go-octokit","last_synced_at":"2025-12-30T15:29:36.995Z","repository":{"id":8864077,"uuid":"10575811","full_name":"octokit/go-octokit","owner":"octokit","description":"Simple Go wrapper for the GitHub API","archived":true,"fork":false,"pushed_at":"2022-06-17T14:22:49.000Z","size":2022,"stargazers_count":258,"open_issues_count":12,"forks_count":79,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-08-02T18:40:20.231Z","etag":null,"topics":["octokit-go","sdk"],"latest_commit_sha":null,"homepage":"https://github.com/octokit/go-octokit","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/octokit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2013-06-08T23:50:29.000Z","updated_at":"2024-06-06T11:14:42.000Z","dependencies_parsed_at":"2022-08-29T20:00:50.571Z","dependency_job_id":null,"html_url":"https://github.com/octokit/go-octokit","commit_stats":null,"previous_names":["jingweno/octokat","jingweno/octokit"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octokit%2Fgo-octokit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octokit%2Fgo-octokit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octokit%2Fgo-octokit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octokit%2Fgo-octokit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octokit","download_url":"https://codeload.github.com/octokit/go-octokit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223458228,"owners_count":17148435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["octokit-go","sdk"],"created_at":"2024-08-01T18:01:00.061Z","updated_at":"2025-12-18T11:04:02.746Z","avatar_url":"https://github.com/octokit.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# go-octokit [![Build Status](https://travis-ci.org/octokit/go-octokit.png?branch=master)](https://travis-ci.org/octokit/go-octokit)\n\nGo toolkit for the GitHub API.\n\n## Status\n\nThis project is no longer maintained. If you are looking for a stable, well-maintained client for the GitHub API v3, \nplease consider [google/go-github](https://github.com/google/go-github).  If you're interested in using the \nGraphQL API v4, the recommended library is [shurcooL/githubv4](https://github.com/shurcooL/githubv4).\n\n## Motivation\n\n`go-octokit` is designed to be a hypermedia API client that [wraps](http://wynnnetherland.com/journal/what-makes-a-good-api-wrapper) the [GitHub API](http://developer.github.com/).\n\n## Hypermedia Client\n\n[HAL](http://tools.ietf.org/html/draft-kelly-json-hal) is a simple format that gives a consistent and easy way to hyperlink between resources in web API.\nBeing a client for HAL means it can navigate around the resources by following hyperlinks.\n`go-octokit` is a hypermedia client for the GitHub API that it can traverse links by following the GitHub API conventions.\nUnder the hood, it uses [`go-sawyer`](https://github.com/lostisland/go-sawyer), the Go version of the [Ruby Sawyer](https://github.com/lostisland/sawyer).\n\n### Resource Objects\n\nResources in `go-octokit` contain not only data but hyperlinks:\n\n```go\npackage main\n\nimport \"github.com/octokit/go-octokit/octokit\"\n\nfunc main() {\n    client := octokit.NewClient(nil)\n\n    url, err := octokit.UserURL.Expand(octokit.M{\"user\": \"jingweno\"})\n    if err != nil  {\n      // Handle error\n    }\n\n    user, result := client.Users(url).One()\n    if result.HasError() {\n      // Handle error\n    }\n\n    fmt.Println(user.ReposURL) // https://api.github.com/users/jingweno/repos\n}\n```\n\n### URI templates\n\nMany hypermedia links have variable placeholders. `go-octokit` supports [URI Templates](http://tools.ietf.org/html/rfc6570) for parameterized URI expansion:\n\n```go\npackage main\n\nimport \"github.com/octokit/go-octokit/octokit\"\n\nfunc main() {\n    url, _ := octokit.UserURL.Expand(octokit.M{\"user\": \"jingweno\"})\n    fmt.Println(url) // https://api.github.com/users/jingweno\n}\n```\n\n### API Discoverability\n\nIf you want to use `go-octokit` as a pure hypermedia API client, you can\nstart at the API root and follow hypermedia links which drive the application state transitions:\n\n```go\npackage main\n\nimport \"github.com/octokit/go-octokit/octokit\"\n\nfunc main() {\n  rootURL, _ := client.RootURL.Expand(nil)\n  root, _ := client.Root(rootURL).One()\n\n  userURL, _ := root.UserURL.Expand(octokit.M{\"users\": \"jingweno\"})\n  user, _ := client.Users(userURL).One()\n}\n```\n\n### Pagination\n\n```go\npackage main\n\nimport \"github.com/octokit/go-octokit/octokit\"\n\nfunc main() {\n    url, err := octokit.UserURL.Expand(nil)\n    if err != nil  {\n      // Handle error\n    }\n\n    users, result := client.Users(url).All()\n    if result.HasError() {\n      // Handle error\n    }\n\n    // Do something with users\n\n    // Next page\n    nextPageURL, _ := result.NextPage.Expand(nil)\n    users, result := client.Users(nextPageURL).All()\n    if result.HasError() {\n      // Handle error\n    }\n\n    // Do something with users\n}\n\n```\n\n### Caching\n\nClient-side caching is the #1 thing to do to make a hypermedia client more performant.\nWe plan to support this in the near future.\n\nMore [examples](https://github.com/octokit/go-octokit/blob/master/examples/example.go) are available.\n\n## Release Notes\n\nSee [Releases](https://github.com/octokit/go-octokit/releases).\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## License\n\ngo-octokit is released under the MIT license. See\n[LICENSE](https://github.com/octokit/go-octokit/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctokit%2Fgo-octokit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctokit%2Fgo-octokit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctokit%2Fgo-octokit/lists"}