public_gists
Creates, updates, deletes, gets or lists a public_gists resource.
Overview
| Name | public_gists |
| Type | Resource |
| Id | github.gists.public_gists |
Fields
The following fields are returned by SELECT queries:
- list_public
Response
| Name | Datatype | Description |
|---|---|---|
id | string | |
node_id | string | |
comments | integer | |
comments_enabled | boolean | |
comments_url | string (uri) | |
commits_url | string (uri) | |
created_at | string (date-time) | |
description | string | |
files | object | |
forks | array | |
forks_url | string (uri) | |
git_pull_url | string (uri) | |
git_push_url | string (uri) | |
history | array | |
html_url | string (uri) | |
owner | object | A GitHub user. (title: Simple User) |
public | boolean | |
truncated | boolean | |
updated_at | string (date-time) | |
url | string (uri) | |
user | object | A GitHub user. (title: Simple User) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_public | select | since, per_page, page | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
since | string (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
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 }}'
;