A Gist can retrieve and modify gists.
Create a Gist.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
id | string | the id of the gist (not required when creating a gist) | ||
auth | Requestable.auth | <optional> | information required to authenticate to Github | |
apiBase | string | <optional> | https://api.github.com | the base Github API URL |
Create a new gist.
| Name | Type | Attributes | Description |
|---|---|---|---|
gist | Object | the data for the new gist | |
cb | Requestable.callback | <optional> | will receive the new gist upon creation |
Comment on a gist
| Name | Type | Attributes | Description |
|---|---|---|---|
comment | string | the comment to add | |
cb | Requestable.callback | <optional> | the function that receives the API result |
Delete a gist.
| Name | Type | Attributes | Description |
|---|---|---|---|
cb | Requestable.callback | <optional> | will receive true if the request succeeds |
Delete a comment on the gist.
| Name | Type | Attributes | Description |
|---|---|---|---|
comment | number | the id of the comment | |
cb | Requestable.callback | <optional> | will receive true if the request succeeds |
Edit a comment on the gist
| Name | Type | Attributes | Description |
|---|---|---|---|
comment | number | the id of the comment | |
body | string | the new comment | |
cb | Requestable.callback | <optional> | will receive the modified comment |
Fork a gist.
| Name | Type | Attributes | Description |
|---|---|---|---|
cb | Requestable.callback | <optional> | the function that will receive the gist |
Fetch one of the gist's comments
| Name | Type | Attributes | Description |
|---|---|---|---|
comment | number | the id of the comment | |
cb | Requestable.callback | <optional> | will receive the comment |
Fetch one of the gist's revision.
| Name | Type | Attributes | Description |
|---|---|---|---|
revision | string | the id of the revision | |
cb | Requestable.callback | <optional> | will receive the revision |
Check if a gist is starred by the user.
| Name | Type | Attributes | Description |
|---|---|---|---|
cb | Requestable.callback | <optional> | will receive true if the gist is starred and false if the gist is not starred |
List the gist's comments
| Name | Type | Attributes | Description |
|---|---|---|---|
cb | Requestable.callback | <optional> | will receive the array of comments |
List the gist's commits
| Name | Type | Attributes | Description |
|---|---|---|---|
cb | Requestable.callback | <optional> | will receive the array of commits |
Fetch a gist.
| Name | Type | Attributes | Description |
|---|---|---|---|
cb | Requestable.callback | <optional> | will receive the gist |
Star a gist.
| Name | Type | Attributes | Description |
|---|---|---|---|
cb | Requestable.callback | <optional> | will receive true if the request is successful |
Unstar a gist.
| Name | Type | Attributes | Description |
|---|---|---|---|
cb | Requestable.callback | <optional> | will receive true if the request is successful |
Update a gist.
| Name | Type | Attributes | Description |
|---|---|---|---|
gist | Object | the new data for the gist | |
cb | Requestable.callback | <optional> | the function that receives the API result |