Skip to main content

gists

Overview

Namegists
TypeResource
Idgithub.gists.gists

Fields

NameDatatypeDescription
idstring
descriptionstring
commentsinteger
created_atstring
filesobject
publicboolean
git_pull_urlstring
fork_ofobjectGist
updated_atstring
forksarray
git_push_urlstring
forks_urlstring
ownerobjectSimple User
comments_urlstring
truncatedboolean
html_urlstring
userstring
commits_urlstring
historyarray
urlstring
node_idstring

Methods

NameAccessible byRequired ParamsDescription
getSELECTgist_id
get_revisionSELECTgist_id, sha
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
updateEXECgist_idAllows 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.