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.
List gists for the authenticated user.
This function performs a GET
to the /gists
endpoint.
As opposed to list
, this function returns all the pages of the request at once.
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
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 public gists.
This function performs a GET
to the /gists/public
endpoint.
As opposed to list_public
, this function returns all the pages of the request at once.
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
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.
List starred gists.
This function performs a GET
to the /gists/starred
endpoint.
As opposed to list_starred
, this function returns all the pages of the request at once.
List the authenticated user’s starred gists:
FROM: https://docs.github.com/rest/reference/gists#list-starred-gists
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.
pub async fn list_comments(
&self,
gist_id: &str,
per_page: i64,
page: i64
) -> Result<Vec<GistComment>>
pub async fn list_comments(
&self,
gist_id: &str,
per_page: i64,
page: i64
) -> Result<Vec<GistComment>>
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.
List gist comments.
This function performs a GET
to the /gists/{gist_id}/comments
endpoint.
As opposed to list_comments
, this function returns all the pages of the request at once.
FROM: https://docs.github.com/rest/reference/gists#list-gist-comments
pub async fn create_comment(
&self,
gist_id: &str,
body: &GistsCreateCommentRequest
) -> Result<GistComment>
pub async fn create_comment(
&self,
gist_id: &str,
body: &GistsCreateCommentRequest
) -> Result<GistComment>
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.
pub async fn update_comment(
&self,
gist_id: &str,
comment_id: i64,
body: &GistsCreateCommentRequest
) -> Result<GistComment>
pub async fn update_comment(
&self,
gist_id: &str,
comment_id: i64,
body: &GistsCreateCommentRequest
) -> Result<GistComment>
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.
pub async fn list_commits(
&self,
gist_id: &str,
per_page: i64,
page: i64
) -> Result<Vec<GistCommit>>
pub async fn list_commits(
&self,
gist_id: &str,
per_page: i64,
page: i64
) -> Result<Vec<GistCommit>>
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 commits.
This function performs a GET
to the /gists/{gist_id}/commits
endpoint.
As opposed to list_commits
, this function returns all the pages of the request at once.
FROM: https://docs.github.com/rest/reference/gists#list-gist-commits
pub async fn list_forks(
&self,
gist_id: &str,
per_page: i64,
page: i64
) -> Result<Vec<GistSimple>>
pub async fn list_forks(
&self,
gist_id: &str,
per_page: i64,
page: i64
) -> Result<Vec<GistSimple>>
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.
List gist forks.
This function performs a GET
to the /gists/{gist_id}/forks
endpoint.
As opposed to list_forks
, this function returns all the pages of the request at once.
FROM: https://docs.github.com/rest/reference/gists#list-gist-forks
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.
List gists for a user.
This function performs a GET
to the /users/{username}/gists
endpoint.
As opposed to list_for_user
, this function returns all the pages of the request at once.
Lists public gists for the specified user:
FROM: https://docs.github.com/rest/reference/gists#list-gists-for-a-user
Auto Trait Implementations
impl !RefUnwindSafe for Gists
impl !UnwindSafe for Gists