Skip to main content

public_gists

Creates, updates, deletes, gets or lists a public_gists resource.

Overview

Namepublic_gists
TypeResource
Idgithub.gists.public_gists

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idstring
node_idstring
commentsinteger
comments_enabledboolean
comments_urlstring (uri)
commits_urlstring (uri)
created_atstring (date-time)
descriptionstring
filesobject
forksarray
forks_urlstring (uri)
git_pull_urlstring (uri)
git_push_urlstring (uri)
historyarray
html_urlstring (uri)
ownerobjectA GitHub user. (title: Simple User)
publicboolean
truncatedboolean
updated_atstring (date-time)
urlstring (uri)
userobjectA GitHub user. (title: Simple User)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_publicselectsince, per_page, pageList 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
sincestring (date-time)Only show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

SELECT examples

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.

SELECT
id,
node_id,
comments,
comments_enabled,
comments_url,
commits_url,
created_at,
description,
files,
forks,
forks_url,
git_pull_url,
git_push_url,
history,
html_url,
owner,
public,
truncated,
updated_at,
url,
user
FROM github.gists.public_gists
WHERE since = '{{ since }}'
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;