pub struct Comments {
pub client: Client,
}Fields§
§client: ClientImplementations§
Source§impl Comments
impl Comments
Sourcepub async fn list(
&self,
file_id: &str,
include_deleted: bool,
page_size: i64,
page_token: &str,
start_modified_time: &str,
) -> Result<Response<Vec<Comment>>, ClientError>
pub async fn list( &self, file_id: &str, include_deleted: bool, page_size: i64, page_token: &str, start_modified_time: &str, ) -> Result<Response<Vec<Comment>>, ClientError>
This function performs a GET to the /files/{fileId}/comments endpoint.
Lists a file’s comments.
Parameters:
file_id: &str– A link to this theme’s background image.include_deleted: bool– Whether to include deleted comments. Deleted comments will not include their original content.page_size: i64– A map of maximum import sizes by MIME type, in bytes.page_token: &str– The token for continuing a previous list request on the next page. This should be set to the value of ‘nextPageToken’ from the previous response.start_modified_time: &str– The minimum value of ‘modifiedTime’ for the result comments (RFC 3339 date-time).
Sourcepub async fn list_all(
&self,
file_id: &str,
include_deleted: bool,
start_modified_time: &str,
) -> Result<Response<Vec<Comment>>, ClientError>
pub async fn list_all( &self, file_id: &str, include_deleted: bool, start_modified_time: &str, ) -> Result<Response<Vec<Comment>>, ClientError>
This function performs a GET to the /files/{fileId}/comments endpoint.
As opposed to list, this function returns all the pages of the request at once.
Lists a file’s comments.
Sourcepub async fn create(
&self,
file_id: &str,
body: &Comment,
) -> Result<Response<Comment>, ClientError>
pub async fn create( &self, file_id: &str, body: &Comment, ) -> Result<Response<Comment>, ClientError>
This function performs a POST to the /files/{fileId}/comments endpoint.
Creates a new comment on a file.
Parameters:
file_id: &str– A link to this theme’s background image.
Sourcepub async fn get(
&self,
file_id: &str,
comment_id: &str,
include_deleted: bool,
) -> Result<Response<Comment>, ClientError>
pub async fn get( &self, file_id: &str, comment_id: &str, include_deleted: bool, ) -> Result<Response<Comment>, ClientError>
This function performs a GET to the /files/{fileId}/comments/{commentId} endpoint.
Gets a comment by ID.
Parameters:
file_id: &str– A link to this theme’s background image.comment_id: &str– A link to this theme’s background image.include_deleted: bool– Whether to return deleted comments. Deleted comments will not include their original content.
Sourcepub async fn delete(
&self,
file_id: &str,
comment_id: &str,
) -> Result<Response<()>, ClientError>
pub async fn delete( &self, file_id: &str, comment_id: &str, ) -> Result<Response<()>, ClientError>
This function performs a DELETE to the /files/{fileId}/comments/{commentId} endpoint.
Deletes a comment.
Parameters:
file_id: &str– A link to this theme’s background image.comment_id: &str– A link to this theme’s background image.
Sourcepub async fn update(
&self,
file_id: &str,
comment_id: &str,
body: &Comment,
) -> Result<Response<Comment>, ClientError>
pub async fn update( &self, file_id: &str, comment_id: &str, body: &Comment, ) -> Result<Response<Comment>, ClientError>
This function performs a PATCH to the /files/{fileId}/comments/{commentId} endpoint.
Updates a comment with patch semantics.
Parameters:
file_id: &str– A link to this theme’s background image.comment_id: &str– A link to this theme’s background image.
Auto Trait Implementations§
impl Freeze for Comments
impl !RefUnwindSafe for Comments
impl Send for Comments
impl Sync for Comments
impl Unpin for Comments
impl !UnwindSafe for Comments
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more