Struct octorust::gists::Gists[][src]

pub struct Gists { /* fields omitted */ }

Implementations

List gists for the authenticated user.

This function performs a GET to the /gists endpoint.

Lists the authenticated user’s gists or if called anonymously, this endpoint returns all public gists:

FROM: https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user

Parameters:

  • since: chrono::DateTime<chrono::Utc> – Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
  • per_page: i64 – Results per page (max 100).
  • page: i64 – Page number of the results to fetch.

Create a gist.

This function performs a POST to the /gists endpoint.

Allows 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.

FROM: https://docs.github.com/rest/reference/gists#create-a-gist

List public gists.

This function performs a GET to the /gists/public endpoint.

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.

FROM: https://docs.github.com/rest/reference/gists#list-public-gists

Parameters:

  • since: chrono::DateTime<chrono::Utc> – Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
  • per_page: i64 – Results per page (max 100).
  • page: i64 – Page number of the results to fetch.

List starred gists.

This function performs a GET to the /gists/starred endpoint.

List the authenticated user’s starred gists:

FROM: https://docs.github.com/rest/reference/gists#list-starred-gists

Parameters:

  • since: chrono::DateTime<chrono::Utc> – Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
  • per_page: i64 – Results per page (max 100).
  • page: i64 – Page number of the results to fetch.

Get a gist.

This function performs a GET to the /gists/{gist_id} endpoint.

FROM: https://docs.github.com/rest/reference/gists#get-a-gist

Parameters:

  • gist_id: &str – gist_id parameter.

Delete a gist.

This function performs a DELETE to the /gists/{gist_id} endpoint.

FROM: https://docs.github.com/rest/reference/gists#delete-a-gist

Parameters:

  • gist_id: &str – gist_id parameter.

Update a gist.

This function performs a PATCH to the /gists/{gist_id} endpoint.

Allows 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.

FROM: https://docs.github.com/rest/reference/gists/#update-a-gist

Parameters:

  • gist_id: &str – gist_id parameter.

List gist comments.

This function performs a GET to the /gists/{gist_id}/comments endpoint.

FROM: https://docs.github.com/rest/reference/gists#list-gist-comments

Parameters:

  • gist_id: &str – gist_id parameter.
  • per_page: i64 – Results per page (max 100).
  • page: i64 – Page number of the results to fetch.

Create a gist comment.

This function performs a POST to the /gists/{gist_id}/comments endpoint.

FROM: https://docs.github.com/rest/reference/gists#create-a-gist-comment

Parameters:

  • gist_id: &str – gist_id parameter.

Get a gist comment.

This function performs a GET to the /gists/{gist_id}/comments/{comment_id} endpoint.

FROM: https://docs.github.com/rest/reference/gists#get-a-gist-comment

Parameters:

  • gist_id: &str – gist_id parameter.
  • comment_id: i64 – comment_id parameter.

Delete a gist comment.

This function performs a DELETE to the /gists/{gist_id}/comments/{comment_id} endpoint.

FROM: https://docs.github.com/rest/reference/gists#delete-a-gist-comment

Parameters:

  • gist_id: &str – gist_id parameter.
  • comment_id: i64 – comment_id parameter.

Update a gist comment.

This function performs a PATCH to the /gists/{gist_id}/comments/{comment_id} endpoint.

FROM: https://docs.github.com/rest/reference/gists#update-a-gist-comment

Parameters:

  • gist_id: &str – gist_id parameter.
  • comment_id: i64 – comment_id parameter.

List gist commits.

This function performs a GET to the /gists/{gist_id}/commits endpoint.

FROM: https://docs.github.com/rest/reference/gists#list-gist-commits

Parameters:

  • gist_id: &str – gist_id parameter.
  • per_page: i64 – Results per page (max 100).
  • page: i64 – Page number of the results to fetch.

List gist forks.

This function performs a GET to the /gists/{gist_id}/forks endpoint.

FROM: https://docs.github.com/rest/reference/gists#list-gist-forks

Parameters:

  • gist_id: &str – gist_id parameter.
  • per_page: i64 – Results per page (max 100).
  • page: i64 – Page number of the results to fetch.

Fork a gist.

This function performs a POST to the /gists/{gist_id}/forks endpoint.

Note: This was previously /gists/:gist_id/fork.

FROM: https://docs.github.com/rest/reference/gists#fork-a-gist

Parameters:

  • gist_id: &str – gist_id parameter.

Check if a gist is starred.

This function performs a GET to the /gists/{gist_id}/star endpoint.

FROM: https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred

Parameters:

  • gist_id: &str – gist_id parameter.

Star a gist.

This function performs a PUT to the /gists/{gist_id}/star endpoint.

Note that you’ll need to set Content-Length to zero when calling out to this endpoint. For more information, see “HTTP verbs.”

FROM: https://docs.github.com/rest/reference/gists#star-a-gist

Parameters:

  • gist_id: &str – gist_id parameter.

Unstar a gist.

This function performs a DELETE to the /gists/{gist_id}/star endpoint.

FROM: https://docs.github.com/rest/reference/gists#unstar-a-gist

Parameters:

  • gist_id: &str – gist_id parameter.

Get a gist revision.

This function performs a GET to the /gists/{gist_id}/{sha} endpoint.

FROM: https://docs.github.com/rest/reference/gists#get-a-gist-revision

Parameters:

  • gist_id: &str – gist_id parameter.
  • sha: &str

List gists for a user.

This function performs a GET to the /users/{username}/gists endpoint.

Lists public gists for the specified user:

FROM: https://docs.github.com/rest/reference/gists#list-gists-for-a-user

Parameters:

  • username: &str
  • since: chrono::DateTime<chrono::Utc> – Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
  • per_page: i64 – Results per page (max 100).
  • page: i64 – Page number of the results to fetch.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.