Hub-o-Matic
Hub-o-Matic is a Node wrapper for the GitHub V3 API.
Usage
var HubOMatic = ;var client = ;
Or, if you need to be fancy
var HubOMatic = ;var client = ;
Callbacks
All callbacks receive three arugments.
{}
body
is the response payload.
pagination
has four attributes; first
, previous
, next
and last
You can call any of these, assuming they are present, to page to the next set of records.
paginationnext {};
GETs
In all the docs below, get requests look like
client;
while a PUT would be something like
client;
if you'd like to be consistent with the syntax, you can write the GET as
client;
Request methods
On any chain, you can end it with get
, post
, put
, patch
, delete
or head
.
You can pass data, callback
, just callback
, just data
, or nothing at all.
Events
// GET /eventsclient; // GET /repos/:owner/:repo/eventsclient; // GET /repos/:owner/:repo/issues/eventsclient; // GET /networks/:owner/:repo/eventsclient; // GET /orgs/:org/eventsclient; // GET /users/:username/received_eventsclient; // GET /users/:username/received_events/publicclient; // GET /users/:username/eventsclient; // GET /users/:username/events/publicclient; // GET /users/:username/events/orgs/:orgclient;
Feeds
// GET /feedsclient;
Notifications
// GET /notificationsclient; // GET /repos/:owner/:repo/notificationsclient; // PUT /notificationsclient; // PUT /repos/:owner/:repo/notificationsclient; // GET /notifications/threads/:idclient; // PATCH /notifications/threads/:idclient; // GET /notifications/threads/:id/subscriptionclient; // PUT /notifications/threads/:id/subscriptionclient; // DELETE /notifications/threads/:id/subscriptionclient;
Starring
// GET /repos/:owner/:repo/stargazersclient; // GET /users/:username/starredclient; // GET /user/starredclient; // GET /user/starred/:owner/:repoclient; // PUT /user/starred/:owner/:repoclient; // DELETE /user/starred/:owner/:repoclient;
Watching
// GET /repos/:owner/:repo/subscribersclient; // GET /users/:username/subscriptionsclient; // GET /user/subscriptionsclient; // GET /repos/:owner/:repo/subscriptionclient; // PUT /repos/:owner/:repo/subscriptionclientsubscription; // DELETE /repos/:owner/:repo/subscriptionclientsubscription; // GET /user/subscriptions/:owner/:repoclient; // PUT /user/subscriptions/:owner/:repoclient;
Gists
// GET /users/:username/gistsclient; // GET /gistsclient; // GET /gists/publicclientgists; // GET /gists/starredclientgists; // GET /gists/:idclient; // GET /gists/:id/:shaclient; // POST /gistsclient; // PATCH /gists/:idclient; // GET /gists/:id/commitsclient; // PUT /gists/:id/starclient; // DELETE /gists/:id/starclient; // GET /gists/:id/starclient; // POST /gists/:id/forksclient; // GET /gists/:id/forksclient; // DELETE /gists/:idclient;
Comments
// GET /gists/:gist_id/commentsclient; // GET /gists/:gist_id/comments/:idclient; // POST /gists/:gist_id/commentsclient; // PATCH /gists/:gist_id/comments/:idclient; // DELETE /gists/:gist_id/comments/:idclient;
Blobs
// GET /repos/:owner/:repo/git/blobs/:shaclient; // POST /repos/:owner/:repo/git/blobsclient;
Commits
// GET /repos/:owner/:repo/git/commits/:shaclient; // POST /repos/:owner/:repo/git/commitsclient;
References
// GET /repos/:owner/:repo/git/refs/:refclient; // GET /repos/:owner/:repo/git/refsclient; // GET /repos/:owner/:repo/git/refs/tagsclienttagscallback; // POST /repos/:owner/:repo/git/refsclient; // PATCH /repos/:owner/:repo/git/refs/:refclient; // DELETE /repos/:owner/:repo/git/refs/:refclient; // DELETE /repos/:owner/:repo/git/refs/tags/:idclienttags862438;
Tags
// GET /repos/:owner/:repo/git/tags/:shaclienttags; // POST /repos/:owner/:repo/git/tagsclienttags;
Trees
// GET /repos/:owner/:repo/git/trees/:shaclient; // GET /repos/:owner/:repo/git/trees/:sha?recursive=1client; // POST /repos/:owner/:repo/git/treesclient;
Issues
// GET /issuesclient; // GET /user/issuesclient; // GET /orgs/:org/issuesclient; // GET /repos/:owner/:repo/issuesclient; // GET /repos/:owner/:repo/issues/:numberclient; // POST /repos/:owner/:repo/issuesclient; // PATCH /repos/:owner/:repo/issues/:numberclient;
Assignees
// GET /repos/:owner/:repo/assigneesclient; // GET /repos/:owner/:repo/assignees/:assigneeclient;
Comments
// GET /repos/:owner/:repo/issues/:number/commentsclient; // GET /repos/:owner/:repo/issues/commentsclient; // GET /repos/:owner/:repo/issues/comments/:idclient; // POST /repos/:owner/:repo/issues/:number/commentsclient; // PATCH /repos/:owner/:repo/issues/comments/:idclient; // DELETE /repos/:owner/:repo/issues/comments/:idclient;
Events
// GET /repos/:owner/:repo/issues/:issue_number/eventsclient; // GET /repos/:owner/:repo/issues/eventsclient; // GET /repos/:owner/:repo/issues/events/:idclient;
Labels
// GET /repos/:owner/:repo/labelsclient; // GET /repos/:owner/:repo/labels/:nameclient; // POST /repos/:owner/:repo/labelsclient; // PATCH /repos/:owner/:repo/labels/:nameclient; // DELETE /repos/:owner/:repo/labels/:nameclient; // GET /repos/:owner/:repo/issues/:number/labelsclient; // POST /repos/:owner/:repo/issues/:number/labelsclient; // DELETE /repos/:owner/:repo/issues/:number/labels/:nameclient; // PUT /repos/:owner/:repo/issues/:number/labelsclient; // DELETE /repos/:owner/:repo/issues/:number/labelsclient; // GET /repos/:owner/:repo/milestones/:number/labelsclient;
Milestones
// GET /repos/:owner/:repo/milestonesclient; // GET /repos/:owner/:repo/milestones/:numberclient; // POST /repos/:owner/:repo/milestonesclient; // PATCH /repos/:owner/:repo/milestones/:numberclient; // DELETE /repos/:owner/:repo/milestones/:numberclient;
Emojis
// GET /emojisclient;
Gitignore
// GET /gitignore/templatesclient; // GET /gitignore/templates/Cclient;
Licenses
// GET /licensesclient; // GET /licenses/mitclient; // GET /repos/:owner/:repoclient;
Markdown
// POST /markdownclient; // POST /markdown/rawclient;
Meta
// GET /metaclient;
Rate Limit
// GET /rate_limitclient;
Organizations
// GET /user/orgsclient; // GET /users/:username/orgsclient; // GET /orgs/:orgclient; // PATCH /orgs/:orgclient;
Members
// GET /orgs/:org/membersclient; // GET /orgs/:org/members/:usernameclient; // DELETE /orgs/:org/members/:usernameclient; // GET /orgs/:org/public_membersclient; // GET /orgs/:org/public_members/:usernameclient; // PUT /orgs/:org/public_members/:usernameclient; // DELETE /orgs/:org/public_members/:usernameclient; // GET /orgs/:org/memberships/:usernameclient; // PUT /orgs/:org/memberships/:usernameclient; // DELETE /orgs/:org/memberships/:usernameclient; // GET /user/memberships/orgsclient; // GET /user/memberships/orgs/:orgclient; // PATCH /user/memberships/orgs/:orgclient;
Teams
// GET /orgs/:org/teamsclient; // GET /teams/:idclient; // POST /orgs/:org/teamsclient; // PATCH /teams/:idclient; // DELETE /teams/:idclient; // GET /teams/:id/membersclient; // GET /teams/:id/members/:usernameclient; // PUT /teams/:id/members/:usernameclient; // DELETE /teams/:id/members/:usernameclient; // PUT /teams/:id/memberships/:usernameclient; // DELETE /teams/:id/memberships/:usernameclient; // GET /teams/:id/reposclient; // GET /teams/:id/repos/:owner/:repoclient; // PUT /teams/:id/repos/:org/:repoclient; // DELETE /teams/:id/repos/:owner/:repoclient; // GET /user/teamsclient;
Webhooks
// GET /orgs/:org/hooksclient; // GET /orgs/:org/hooks/:idclient; // POST /orgs/:org/hooksclient; // PATCH /orgs/:org/hooks/:idclient; // POST /orgs/:org/hooks/:id/pingsclient; // DELETE /orgs/:org/hooks/:idclient;
Pull Requests
// GET /repos/:owner/:repo/pullsclient; // GET /repos/:owner/:repo/pulls/:numberclient; // POST /repos/:owner/:repo/pullsclient; // PATCH /repos/:owner/:repo/pulls/:numberclient; // GET /repos/:owner/:repo/pulls/:number/commitsclient; // GET /repos/:owner/:repo/pulls/:number/filesclient; // GET /repos/:owner/:repo/pulls/:number/mergeclient; // PUT /repos/:owner/:repo/pulls/:number/mergeclient;
Review Comments
// GET /repos/:owner/:repo/pulls/:number/commentsclient; // GET /repos/:owner/:repo/pulls/commentsclient; // GET /repos/:owner/:repo/pulls/comments/:numberclient; // POST /repos/:owner/:repo/pulls/:number/commentsclient; // PATCH /repos/:owner/:repo/pulls/comments/:numberclient; // DELETE /repos/:owner/:repo/pulls/comments/:numberclient;
Repositories
// GET /user/reposclient; // GET /users/:username/reposclient; // GET /orgs/:org/reposclient; // GET /repositoriesclient; // POST /user/reposclient; // POST /orgs/:org/reposclient; // GET /repos/:owner/:repoclient; // PATCH /repos/:owner/:repoclient; // GET /repos/:owner/:repo/contributorsclient; // GET /repos/:owner/:repo/languagesclient; // GET /repos/:owner/:repo/teamsclient; // GET /repos/:owner/:repo/tagsclienttagscallback; // GET /repos/:owner/:repo/branchesclient; // GET /repos/:owner/:repo/branches/:branchclient; // DELETE /repos/:owner/:repoclient;
Collaborators
// GET /repos/:owner/:repo/collaboratorsclient; // GET /repos/:owner/:repo/collaborators/:usernameclient; // PUT /repos/:owner/:repo/collaborators/:usernameclient; // DELETE /repos/:owner/:repo/collaborators/:usernameclient;
Comments
// GET /repos/:owner/:repo/commentsclient; // GET /repos/:owner/:repo/commits/:ref/commentsclient; // POST /repos/:owner/:repo/commits/:sha/commentsclient; // GET /repos/:owner/:repo/comments/:idclient; // PATCH /repos/:owner/:repo/comments/:idclient; // DELETE /repos/:owner/:repo/comments/:idclient;
Commits
// GET /repos/:owner/:repo/commitsclient; // GET /repos/:owner/:repo/commits/:shaclient; // GET /repos/:owner/:repo/compare/:base...:headclient;
Contents
// GET /repos/:owner/:repo/readmeclient; // GET /repos/:owner/:repo/contents/:pathclient; // PUT /repos/:owner/:repo/contents/:pathclient; // PUT /repos/:owner/:repo/contents/:pathclient; // DELETE /repos/:owner/:repo/contents/:pathclient; // GET /repos/:owner/:repo/:archive_format/:refclient;
Deploy Keys
// GET /repos/:owner/:repo/keysclient; // GET /repos/:owner/:repo/keys/:idclient; // POST /repos/:owner/:repo/keysclient; // DELETE /repos/:owner/:repo/keys/:idclient;
Deployments
// GET /repos/:owner/:repo/deploymentsclient; // POST /repos/:owner/:repo/deploymentsclient; // GET /repos/:owner/:repo/deployments/:id/statusesclient; // POST /repos/:owner/:repo/deployments/:id/statusesclient;
Downloads
// GET /repos/:owner/:repo/downloadsclient; // GET /repos/:owner/:repo/downloads/:idclient; // DELETE /repos/:owner/:repo/downloads/:idclient;
Forks
// GET /repos/:owner/:repo/forksclient; // POST /repos/:owner/:repo/forksclient;
Merging
// POST /repos/:owner/:repo/mergesclient;
Pages
// GET /repos/:owner/:repo/pagesclient; // GET /repos/:owner/:repo/pages/buildsclient; // GET /repos/:owner/:repo/pages/builds/latestclient;
Releases
// GET /repos/:owner/:repo/releasesclient; // GET /repos/:owner/:repo/releases/:idclient; // GET /repos/:owner/:repo/releases/latestclient; // GET /repos/:owner/:repo/releases/tags/:tagclienttags'v1.2.16' callback; // POST /repos/:owner/:repo/releasesclient; // PATCH /repos/:owner/:repo/releases/:idclient; // DELETE /repos/:owner/:repo/releases/:idclient; // GET /repos/:owner/:repo/releases/:id/assetsclient; // GET /repos/:owner/:repo/releases/assets/:idclient; // PATCH /repos/:owner/:repo/releases/assets/:idclient; // DELETE /repos/:owner/:repo/releases/assets/:idclient;
Statistics
// GET /repos/:owner/:repo/stats/contributorsclient; // GET /repos/:owner/:repo/stats/commit_activityclient; // GET /repos/:owner/:repo/stats/code_frequencyclient; // GET /repos/:owner/:repo/stats/participationclient; // GET /repos/:owner/:repo/stats/punch_cardclient;
Statuses
// POST /repos/:owner/:repo/statuses/:shaclient; // GET /repos/:owner/:repo/commits/:ref/statusesclient; // GET /repos/:owner/:repo/commits/:ref/statusclientstatuscallback;
Search
// GET /search/repositoriesclient; // GET /search/codeclient; // GET /search/issuesclient; // GET /search/usersclient;
Legacy Search
// GET /legacy/issues/search/:owner/:repository/:state/:keywordclient; // GET /legacy/repos/search/:keywordclient; // GET /legacy/user/search/:keywordclient; // GET /legacy/user/email/:emailclient;
Users
// GET /users/:usernameclient; // GET /userclient; // PATCH /userclient; // GET /usersclient;
Emails
// GET /user/emailsclient; // POST /user/emailsclient; // DELETE /user/emailsclient;
Followers
// GET /users/:username/followersclient; // GET /user/followersclient; // GET /users/:username/followingclient; // GET /user/followingclient; // GET /user/following/:usernameclient; // GET /users/:username/following/:target_userclient; // PUT /user/following/:usernameclient; // DELETE /user/following/:usernameclient;
Public Keys
// GET /users/:username/keysclient; // GET /user/keysclient; // GET /user/keys/:idclient; // POST /user/keysclient; // DELETE /user/keys/:idclient;
Administration (Enterprise)
// PUT /users/:username/site_adminclient; // DELETE /users/:username/site_adminclient; // PUT /users/:username/suspendedclient; // DELETE /users/:username/suspendedclient;
Admin Stats (Enterprise 2.1)
// GET /enterprise/stats/:typeclient;
LDAP (Enterprise 2.1)
// PATCH /admin/ldap/user/:username/mappingclient; // POST /admin/ldap/user/:user_id/syncclient; // PATCH /admin/ldap/teams/:team_id/mappingclient; // POST /admin/ldap/user/:team_id/syncclient;
License (Enterprise 2.1)
// GET /enterprise/settings/licenseclient;
Management Console (Enterprise 2.1)
// POST /setup/api/startclient; // POST /setup/api/upgradeclient; // GET /setup/api/configcheckclient; // POST /setup/api/configureclient; // GET /setup/api/settingsclient; // PUT /setup/api/settingsclient; // GET /setup/api/maintenanceclient; // POST /setup/api/maintenanceclient; // GET /setup/api/settings/authorized-keysclient; // POST /setup/api/settings/authorized-keysclient; // DELETE /setup/api/settings/authorized-keysclient;
Search Indexing (Enterprise 2.1)
// POST /staff/indexing_jobsclient;