Skip to main content

gists

Overview

Namegists
TypeResource
Idgithub.gists.gists

Fields

NameDatatypeDescription
idstring
descriptionstring
commentsinteger
comments_urlstring
commits_urlstring
created_atstring
filesobject
forksarray
forks_urlstring
git_pull_urlstring
git_push_urlstring
historyarray
html_urlstring
node_idstring
ownerobjectA GitHub user.
publicboolean
truncatedboolean
updated_atstring
urlstring
userobjectA GitHub user.

Methods

NameAccessible byRequired ParamsDescription
listSELECTLists the authenticated user's gists or if called anonymously, this endpoint returns all public gists:
list_for_userSELECTusernameLists public gists for the specified user:
createINSERTdata__filesAllows 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.
deleteDELETEgist_id
check_is_starredEXECgist_id
forkEXECgist_id
starEXECgist_idNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP verbs."
unstarEXECgist_id
updateEXECgist_idAllows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged.
At least one of description or files is required.