Gists

View, modify your gists.

Operations

MethodEndpointDescription
GET/gistsList gists for the authenticated user
POST/gistsCreate a gist
GET/gists/publicList public gists
GET/gists/starredList starred gists
GET/gists/{gist_id}Get a gist
PATCH/gists/{gist_id}Update a gist
DELETE/gists/{gist_id}Delete a gist
GET/gists/{gist_id}/commentsList gist comments
POST/gists/{gist_id}/commentsCreate a gist comment
GET/gists/{gist_id}/comments/{comment_id}Get a gist comment
PATCH/gists/{gist_id}/comments/{comment_id}Update a gist comment
DELETE/gists/{gist_id}/comments/{comment_id}Delete a gist comment
GET/gists/{gist_id}/commitsList gist commits
GET/gists/{gist_id}/forksList gist forks
POST/gists/{gist_id}/forksFork a gist
GET/gists/{gist_id}/starCheck if a gist is starred
PUT/gists/{gist_id}/starStar a gist
DELETE/gists/{gist_id}/starUnstar a gist
GET/gists/{gist_id}/{sha}Get a gist revision
GET/users/{username}/gistsList gists for a user

Example

List gists for the authenticated user, with the TypeScript SDK:

ts
import { GitHubV3REST } from "github";

const client = new GitHubV3REST({
  baseUrl: "https://api.github.com",
});

const result = await client.gists.list();
console.log(result);
Nine more languages

The same call exists in every SDK. See SDKs for the other nine.