Skip to main content

gists

Overview

Namegists
TypeResource
Idgithub.gists.gists

Fields

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

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.