{"id":15048309,"url":"https://github.com/github/github-1","last_synced_at":"2025-10-04T08:31:55.999Z","repository":{"id":65974840,"uuid":"75178884","full_name":"github/github-1","owner":"github","description":"A higher-level wrapper around the Github API. Intended for the browser.","archived":true,"fork":true,"pushed_at":"2022-03-17T20:56:08.000Z","size":3177,"stargazers_count":15,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-30T00:23:26.568Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"github-tools/github","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-30T11:01:37.000Z","updated_at":"2024-07-31T03:16:01.000Z","dependencies_parsed_at":"2023-02-19T18:01:22.558Z","dependency_job_id":null,"html_url":"https://github.com/github/github-1","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgithub-1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgithub-1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgithub-1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgithub-1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/github-1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235232824,"owners_count":18957058,"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":[],"created_at":"2024-09-24T21:10:37.837Z","updated_at":"2025-10-04T08:31:55.629Z","avatar_url":"https://github.com/github.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Github.js\n\n[![Downloads per month](https://img.shields.io/npm/dm/github-api.svg?maxAge=2592000)][npm-package]\n[![Latest version](https://img.shields.io/npm/v/github-api.svg?maxAge=3600)][npm-package]\n[![Gitter](https://img.shields.io/gitter/room/michael/github.js.svg?maxAge=2592000)][gitter]\n[![Travis](https://img.shields.io/travis/michael/github.svg?maxAge=60)][travis-ci]\n\u003c!-- [![Codecov](https://img.shields.io/codecov/c/github/michael/github.svg?maxAge=2592000)][codecov] --\u003e\n\nGithub.js provides a minimal higher-level wrapper around Github's API. It was concieved in the context of\n[Prose][prose], a content editor for GitHub.\n\n## [Read the docs][docs]\n\n## Installation\nGithub.js is available from `npm` or [unpkg][unpkg].\n\n```shell\nnpm install github-api\n```\n\n```html\n\u003c!-- just github-api source (5.3kb) --\u003e\n\u003cscript src=\"https://unpkg.com/github-api/dist/GitHub.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- standalone (20.3kb) --\u003e\n\u003cscript src=\"https://unpkg.com/github-api/dist/GitHub.bundle.min.js\"\u003e\u003c/script\u003e\n```\n\n## Compatibility\nGithub.js is tested on Node:\n* 6.x\n* 5.x\n* 4.x\n* 0.12\n\n## GitHub Tools\n\nThe team behind Github.js has created a whole organization, called [GitHub Tools](https://github.com/github-tools),\ndedicated to GitHub and its API. In the near future this repository could be moved under the GitHub Tools organization\nas well. In the meantime, we recommend you to take a look at other projects of the organization.\n\n## Samples\n\n```javascript\n/*\n   Data can be retrieved from the API either using callbacks (as in versions \u003c 1.0)\n   or using a new promise-based API. For now the promise-based API just returns the\n   raw HTTP request promise; this might change in the next version.\n */\nimport GitHub from 'github-api';\n\n// unauthenticated client\nconst gh = new GitHub();\nlet gist = gh.getGist(); // not a gist yet\ngist.create({\n   public: true,\n   description: 'My first gist',\n   files: {\n      \"file1.txt\": {\n         content: \"Aren't gists great!\"\n      }\n   }\n}).then(function({data}) {\n   // Promises!\n   let gistJson = data;\n   gist.read(function(err, gist, xhr) {\n      // if no error occurred then err == null\n\n      // gistJson === httpResponse.data\n\n      // xhr === httpResponse\n   });\n});\n```\n\n```javascript\nimport GitHub from 'github-api';\n\n// basic auth\nconst gh = new GitHub({\n   username: 'FOO',\n   password: 'NotFoo'\n});\n\nconst me = gh.getUser();\nme.listNotifications(function(err, notifications) {\n   // do some stuff\n});\n\nconst clayreimann = gh.getUser('clayreimann');\nclayreimann.listStarredRepos()\n   .then(function({data: reposJson}) {\n      // do stuff with reposJson\n   });\n```\n\n```javascript\nvar GitHub = require('github-api');\n\n// token auth\nvar gh = new GitHub({\n   token: 'MY_OAUTH_TOKEN'\n});\n\nvar yahoo = gh.getOrganization('yahoo');\nyahoo.listRepos(function(err, repos) {\n   // look at all the repos!\n})\n```\n\n[codecov]: https://codecov.io/github/michael/github?branch=master\n[docs]: http://github-tools.github.io/github/\n[gitter]: https://gitter.im/michael/github\n[npm-package]: https://www.npmjs.com/package/github-api/\n[unpkg]: https://unpkg.com/github-api/\n[prose]: http://prose.io\n[travis-ci]: https://travis-ci.org/michael/github\n[xhr-link]: http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fgithub-1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fgithub-1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fgithub-1/lists"}