octokit.gists.checkIsStarred({gist_id,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
See also: GitHub Developer Guide documentation.
Allows you to add a new gist with one or more files.
Note: Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.
octokit.gists.create({files,files.*.content})
| name | required | description |
|---|---|---|
| description | no | Description of the gist |
| files | yes | Names and content for the files that make up the gist |
| files.* | no | |
| files.*.content | yes | Content of the file |
| public | no |
See also: GitHub Developer Guide documentation.
octokit.gists.createComment({gist_id,body,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
| body | yes | The comment text. |
See also: GitHub Developer Guide documentation.
octokit.gists.delete({gist_id,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
See also: GitHub Developer Guide documentation.
octokit.gists.deleteComment({gist_id,comment_id,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
| comment_id | yes | comment_id parameter |
See also: GitHub Developer Guide documentation.
Note: This was previously /gists/:gist_id/fork.
octokit.gists.fork({gist_id,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
See also: GitHub Developer Guide documentation.
octokit.gists.get({gist_id,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
See also: GitHub Developer Guide documentation.
octokit.gists.getComment({gist_id,comment_id,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
| comment_id | yes | comment_id parameter |
See also: GitHub Developer Guide documentation.
octokit.gists.getRevision({gist_id,sha,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
| sha | yes |
See also: GitHub Developer Guide documentation.
Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists:
octokit.gists.list();
| name | required | description |
|---|---|---|
| since | no | Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: |
| per_page | no | Results per page (max 100) |
| page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
octokit.gists.listComments({gist_id,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
| per_page | no | Results per page (max 100) |
| page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
octokit.gists.listCommits({gist_id,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
| per_page | no | Results per page (max 100) |
| page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
octokit.gists.listForks({gist_id,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
| per_page | no | Results per page (max 100) |
| page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists public gists for the specified user:
octokit.gists.listForUser({username,});
| name | required | description |
|---|---|---|
| username | yes | |
| since | no | Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: |
| per_page | no | Results per page (max 100) |
| page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
List public gists sorted by most recently updated to least recently updated.
Note: With pagination, you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page.
octokit.gists.listPublic();
| name | required | description |
|---|---|---|
| since | no | Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: |
| per_page | no | Results per page (max 100) |
| page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
List the authenticated user's starred gists:
octokit.gists.listStarred();
| name | required | description |
|---|---|---|
| since | no | Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: |
| per_page | no | Results per page (max 100) |
| page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Note that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP verbs."
octokit.gists.star({gist_id,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
See also: GitHub Developer Guide documentation.
octokit.gists.unstar({gist_id,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
See also: GitHub Developer Guide documentation.
Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged.
octokit.gists.update({gist_id,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
| description | no | Description of the gist |
| files | no | Names of files to be updated |
| files.* | no | |
| files.*.content | no | The new content of the file |
| files.*.filename | no | The new filename for the file |
See also: GitHub Developer Guide documentation.
octokit.gists.updateComment({gist_id,comment_id,body,});
| name | required | description |
|---|---|---|
| gist_id | yes | gist_id parameter |
| comment_id | yes | comment_id parameter |
| body | yes | The comment text. |
See also: GitHub Developer Guide documentation.