General documentation / cheat sheets for various languages and services

api.github.com

GitHub's API documentation is fantastic. This page simply records some example responses.

I'm not the biggest fan of the huge and redundant responses their API produces (gzipping reduces the size by nearly 5x!), but at least all the information is there.

JSON responses are pretty-printed by default, which is kind of unusual for a JSON API, but actually kind of nice.

GET /repos/:owner/:repo

https://api.github.com/repos/chbrown/flickr-with-uploads:

{ "id": 5358636, "name": "flickr-with-uploads", "full_name": "chbrown/flickr-with-uploads", "owner": { "login": "chbrown", "id": 360279, "avatar_url": "https://avatars.githubusercontent.com/u/360279?v=3", "gravatar_id": "", "url": "https://api.github.com/users/chbrown", "html_url": "https://github.com/chbrown", "followers_url": "https://api.github.com/users/chbrown/followers", "following_url": "https://api.github.com/users/chbrown/following{/other_user}", "gists_url": "https://api.github.com/users/chbrown/gists{/gist_id}", "starred_url": "https://api.github.com/users/chbrown/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chbrown/subscriptions", "organizations_url": "https://api.github.com/users/chbrown/orgs", "repos_url": "https://api.github.com/users/chbrown/repos", "events_url": "https://api.github.com/users/chbrown/events{/privacy}", "received_events_url": "https://api.github.com/users/chbrown/received_events", "type": "User", "site_admin": false }, "private": false, "html_url": "https://github.com/chbrown/flickr-with-uploads", "description": "Flickr API for Node.js using OAuth 1.0a, including upload support and featuring a CLI", "fork": false, "url": "https://api.github.com/repos/chbrown/flickr-with-uploads", "forks_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/forks", "keys_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/keys{/key_id}", "collaborators_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/collaborators{/collaborator}", "teams_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/teams", "hooks_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/hooks", "issue_events_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/issues/events{/number}", "events_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/events", "assignees_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/assignees{/user}", "branches_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/branches{/branch}", "tags_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/tags", "blobs_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/git/blobs{/sha}", "git_tags_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/git/tags{/sha}", "git_refs_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/git/refs{/sha}", "trees_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/git/trees{/sha}", "statuses_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/statuses/{sha}", "languages_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/languages", "stargazers_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/stargazers", "contributors_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/contributors", "subscribers_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/subscribers", "subscription_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/subscription", "commits_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/commits{/sha}", "git_commits_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/git/commits{/sha}", "comments_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/comments{/number}", "issue_comment_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/issues/comments/{number}", "contents_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/contents/{+path}", "compare_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/compare/{base}...{head}", "merges_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/merges", "archive_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/{archive_format}{/ref}", "downloads_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/downloads", "issues_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/issues{/number}", "pulls_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/pulls{/number}", "milestones_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/milestones{/number}", "notifications_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/notifications{?since,all,participating}", "labels_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/labels{/name}", "releases_url": "https://api.github.com/repos/chbrown/flickr-with-uploads/releases{/id}", "created_at": "2012-08-09T17:15:44Z", "updated_at": "2014-10-01T13:38:49Z", "pushed_at": "2014-09-30T14:07:09Z", "git_url": "git://github.com/chbrown/flickr-with-uploads.git", "ssh_url": "git@github.com:chbrown/flickr-with-uploads.git", "clone_url": "https://github.com/chbrown/flickr-with-uploads.git", "svn_url": "https://github.com/chbrown/flickr-with-uploads", "homepage": "", "size": 363, "stargazers_count": 38, "watchers_count": 38, "language": "JavaScript", "has_issues": true, "has_downloads": true, "has_wiki": true, "has_pages": false, "forks_count": 12, "mirror_url": null, "open_issues_count": 1, "forks": 12, "open_issues": 1, "watchers": 38, "default_branch": "master", "network_count": 12, "subscribers_count": 6 }

The following are the distinct counts (many of these fields are redundant):