revisions
Creates, updates, deletes, gets or lists a revisions resource.
Overview
| Name | revisions |
| Type | Resource |
| Id | github.gists.revisions |
Fields
The following fields are returned by SELECT queries:
- get_revision
Response
| Name | Datatype | Description |
|---|---|---|
id | string | |
node_id | string | |
comments | integer | |
comments_enabled | boolean | |
comments_url | string | |
commits_url | string | |
created_at | string | |
description | string | |
files | object | |
fork_of | object | Gist (title: Gist) |
forks | array | |
forks_url | string | |
git_pull_url | string | |
git_push_url | string | |
history | array | |
html_url | string | |
owner | object | A GitHub user. (title: Simple User) |
public | boolean | |
truncated | boolean | |
updated_at | string | |
url | string | |
user | string |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_revision | select | gist_id, sha | Gets a specified gist revision. This endpoint supports the following custom media types. For more information, see "Media types." - application/vnd.github.raw+json: Returns the raw markdown. This is the default if you do not pass any specific media type. |
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 |
|---|---|---|
gist_id | string | The unique identifier of the gist. |
sha | string |
SELECT examples
- get_revision
Gets a specified gist revision.
This endpoint supports the following custom media types. For more information, see "Media types."
- application/vnd.github.raw+json: Returns the raw markdown. This is the default if you do not pass any specific media type.
SELECT
id,
node_id,
comments,
comments_enabled,
comments_url,
commits_url,
created_at,
description,
files,
fork_of,
forks,
forks_url,
git_pull_url,
git_push_url,
history,
html_url,
owner,
public,
truncated,
updated_at,
url,
user
FROM github.gists.revisions
WHERE gist_id = '{{ gist_id }}' -- required
AND sha = '{{ sha }}' -- required
;