Struct roctogen::endpoints::gists::Gists [−][src]
pub struct Gists<'api> { /* fields omitted */ }
Implementations
pub async fn check_is_starred_async(
&self,
gist_id: &str
) -> Result<(), GistsCheckIsStarredError>
pub async fn check_is_starred_async(
&self,
gist_id: &str
) -> Result<(), GistsCheckIsStarredError>
pub async fn create_async(
&self,
body: PostGistsCreate
) -> Result<GistSimple, GistsCreateError>
pub async fn create_async(
&self,
body: PostGistsCreate
) -> Result<GistSimple, GistsCreateError>
Create a gist
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.
Create a gist
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.
pub async fn create_comment_async(
&self,
gist_id: &str,
body: PostGistsCreateComment
) -> Result<GistComment, GistsCreateCommentError>
pub async fn create_comment_async(
&self,
gist_id: &str,
body: PostGistsCreateComment
) -> Result<GistComment, GistsCreateCommentError>
pub fn create_comment(
&self,
gist_id: &str,
body: PostGistsCreateComment
) -> Result<GistComment, GistsCreateCommentError>
pub fn create_comment(
&self,
gist_id: &str,
body: PostGistsCreateComment
) -> Result<GistComment, GistsCreateCommentError>
pub async fn delete_comment_async(
&self,
gist_id: &str,
comment_id: i32
) -> Result<(), GistsDeleteCommentError>
pub async fn delete_comment_async(
&self,
gist_id: &str,
comment_id: i32
) -> Result<(), GistsDeleteCommentError>
pub fn delete_comment(
&self,
gist_id: &str,
comment_id: i32
) -> Result<(), GistsDeleteCommentError>
pub fn delete_comment(
&self,
gist_id: &str,
comment_id: i32
) -> Result<(), GistsDeleteCommentError>
pub async fn get_comment_async(
&self,
gist_id: &str,
comment_id: i32
) -> Result<GistComment, GistsGetCommentError>
pub async fn get_comment_async(
&self,
gist_id: &str,
comment_id: i32
) -> Result<GistComment, GistsGetCommentError>
pub fn get_comment(
&self,
gist_id: &str,
comment_id: i32
) -> Result<GistComment, GistsGetCommentError>
pub fn get_comment(
&self,
gist_id: &str,
comment_id: i32
) -> Result<GistComment, GistsGetCommentError>
pub async fn get_revision_async(
&self,
gist_id: &str,
sha: &str
) -> Result<GistSimple, GistsGetRevisionError>
pub async fn get_revision_async(
&self,
gist_id: &str,
sha: &str
) -> Result<GistSimple, GistsGetRevisionError>
pub fn get_revision(
&self,
gist_id: &str,
sha: &str
) -> Result<GistSimple, GistsGetRevisionError>
pub fn get_revision(
&self,
gist_id: &str,
sha: &str
) -> Result<GistSimple, GistsGetRevisionError>
pub async fn list_async(
&self,
query_params: Option<impl Into<GistsListParams>>
) -> Result<Vec<BaseGist>, GistsListError>
pub async fn list_async(
&self,
query_params: Option<impl Into<GistsListParams>>
) -> Result<Vec<BaseGist>, GistsListError>
List gists for the authenticated user
Lists the authenticated user’s gists or if called anonymously, this endpoint returns all public gists:
pub fn list(
&self,
query_params: Option<impl Into<GistsListParams>>
) -> Result<Vec<BaseGist>, GistsListError>
pub fn list(
&self,
query_params: Option<impl Into<GistsListParams>>
) -> Result<Vec<BaseGist>, GistsListError>
List gists for the authenticated user
Lists the authenticated user’s gists or if called anonymously, this endpoint returns all public gists:
pub async fn list_comments_async(
&self,
gist_id: &str,
query_params: Option<impl Into<GistsListCommentsParams>>
) -> Result<Vec<GistComment>, GistsListCommentsError>
pub async fn list_comments_async(
&self,
gist_id: &str,
query_params: Option<impl Into<GistsListCommentsParams>>
) -> Result<Vec<GistComment>, GistsListCommentsError>
pub fn list_comments(
&self,
gist_id: &str,
query_params: Option<impl Into<GistsListCommentsParams>>
) -> Result<Vec<GistComment>, GistsListCommentsError>
pub fn list_comments(
&self,
gist_id: &str,
query_params: Option<impl Into<GistsListCommentsParams>>
) -> Result<Vec<GistComment>, GistsListCommentsError>
pub async fn list_commits_async(
&self,
gist_id: &str,
query_params: Option<impl Into<GistsListCommitsParams>>
) -> Result<Vec<GistCommit>, GistsListCommitsError>
pub async fn list_commits_async(
&self,
gist_id: &str,
query_params: Option<impl Into<GistsListCommitsParams>>
) -> Result<Vec<GistCommit>, GistsListCommitsError>
pub fn list_commits(
&self,
gist_id: &str,
query_params: Option<impl Into<GistsListCommitsParams>>
) -> Result<Vec<GistCommit>, GistsListCommitsError>
pub fn list_commits(
&self,
gist_id: &str,
query_params: Option<impl Into<GistsListCommitsParams>>
) -> Result<Vec<GistCommit>, GistsListCommitsError>
pub async fn list_for_user_async(
&self,
username: &str,
query_params: Option<impl Into<GistsListForUserParams>>
) -> Result<Vec<BaseGist>, GistsListForUserError>
pub async fn list_for_user_async(
&self,
username: &str,
query_params: Option<impl Into<GistsListForUserParams>>
) -> Result<Vec<BaseGist>, GistsListForUserError>
pub fn list_for_user(
&self,
username: &str,
query_params: Option<impl Into<GistsListForUserParams>>
) -> Result<Vec<BaseGist>, GistsListForUserError>
pub fn list_for_user(
&self,
username: &str,
query_params: Option<impl Into<GistsListForUserParams>>
) -> Result<Vec<BaseGist>, GistsListForUserError>
pub async fn list_forks_async(
&self,
gist_id: &str,
query_params: Option<impl Into<GistsListForksParams>>
) -> Result<Vec<GistSimple>, GistsListForksError>
pub async fn list_forks_async(
&self,
gist_id: &str,
query_params: Option<impl Into<GistsListForksParams>>
) -> Result<Vec<GistSimple>, GistsListForksError>
pub fn list_forks(
&self,
gist_id: &str,
query_params: Option<impl Into<GistsListForksParams>>
) -> Result<Vec<GistSimple>, GistsListForksError>
pub fn list_forks(
&self,
gist_id: &str,
query_params: Option<impl Into<GistsListForksParams>>
) -> Result<Vec<GistSimple>, GistsListForksError>
pub async fn list_public_async(
&self,
query_params: Option<impl Into<GistsListPublicParams>>
) -> Result<Vec<BaseGist>, GistsListPublicError>
pub async fn list_public_async(
&self,
query_params: Option<impl Into<GistsListPublicParams>>
) -> Result<Vec<BaseGist>, GistsListPublicError>
List public gists
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.
GitHub API docs for list_public
pub fn list_public(
&self,
query_params: Option<impl Into<GistsListPublicParams>>
) -> Result<Vec<BaseGist>, GistsListPublicError>
pub fn list_public(
&self,
query_params: Option<impl Into<GistsListPublicParams>>
) -> Result<Vec<BaseGist>, GistsListPublicError>
List public gists
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.
GitHub API docs for list_public
pub async fn list_starred_async(
&self,
query_params: Option<impl Into<GistsListStarredParams>>
) -> Result<Vec<BaseGist>, GistsListStarredError>
pub async fn list_starred_async(
&self,
query_params: Option<impl Into<GistsListStarredParams>>
) -> Result<Vec<BaseGist>, GistsListStarredError>
pub fn list_starred(
&self,
query_params: Option<impl Into<GistsListStarredParams>>
) -> Result<Vec<BaseGist>, GistsListStarredError>
pub fn list_starred(
&self,
query_params: Option<impl Into<GistsListStarredParams>>
) -> Result<Vec<BaseGist>, GistsListStarredError>
Star a gist
Note that you’ll need to set Content-Length
to zero when calling out to this endpoint. For more information, see “HTTP verbs.”
Star a gist
Note that you’ll need to set Content-Length
to zero when calling out to this endpoint. For more information, see “HTTP verbs.”
pub async fn update_async(
&self,
gist_id: &str,
body: PatchGistsUpdate
) -> Result<GistSimple, GistsUpdateError>
pub async fn update_async(
&self,
gist_id: &str,
body: PatchGistsUpdate
) -> Result<GistSimple, GistsUpdateError>
Update a gist
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.
pub fn update(
&self,
gist_id: &str,
body: PatchGistsUpdate
) -> Result<GistSimple, GistsUpdateError>
pub fn update(
&self,
gist_id: &str,
body: PatchGistsUpdate
) -> Result<GistSimple, GistsUpdateError>
Update a gist
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.