pub struct CommentMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all methods supported on comment resources.
It is not used directly, but through the DriveHub hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_drive3 as drive3;
use drive3::{DriveHub, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let connector = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_only()
.enable_http2()
.build();
let executor = hyper_util::rt::TokioExecutor::new();
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
yup_oauth2::client::CustomHyperClientBuilder::from(
hyper_util::client::legacy::Client::builder(executor).build(connector),
),
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http2()
.build()
);
let mut hub = DriveHub::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `create(...)`, `delete(...)`, `get(...)`, `list(...)` and `update(...)`
// to build up your call.
let rb = hub.comments();Implementations§
Source§impl<'a, C> CommentMethods<'a, C>
impl<'a, C> CommentMethods<'a, C>
Sourcepub fn create(
&self,
request: Comment,
file_id: &str,
) -> CommentCreateCall<'a, C>
pub fn create( &self, request: Comment, file_id: &str, ) -> CommentCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a comment on a file. For more information, see Manage comments and replies. Required: The fields parameter must be set. To return the exact fields you need, see Return specific fields.
§Arguments
request- No description provided.fileId- The ID of the file.
Sourcepub fn delete(
&self,
file_id: &str,
comment_id: &str,
) -> CommentDeleteCall<'a, C>
pub fn delete( &self, file_id: &str, comment_id: &str, ) -> CommentDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes a comment. For more information, see Manage comments and replies.
§Arguments
fileId- The ID of the file.commentId- The ID of the comment.
Sourcepub fn get(&self, file_id: &str, comment_id: &str) -> CommentGetCall<'a, C>
pub fn get(&self, file_id: &str, comment_id: &str) -> CommentGetCall<'a, C>
Create a builder to help you perform the following task:
Gets a comment by ID. For more information, see Manage comments and replies. Required: The fields parameter must be set. To return the exact fields you need, see Return specific fields.
§Arguments
fileId- The ID of the file.commentId- The ID of the comment.
Sourcepub fn list(&self, file_id: &str) -> CommentListCall<'a, C>
pub fn list(&self, file_id: &str) -> CommentListCall<'a, C>
Create a builder to help you perform the following task:
Lists a file’s comments. For more information, see Manage comments and replies. Required: The fields parameter must be set. To return the exact fields you need, see Return specific fields.
§Arguments
fileId- The ID of the file.
Sourcepub fn update(
&self,
request: Comment,
file_id: &str,
comment_id: &str,
) -> CommentUpdateCall<'a, C>
pub fn update( &self, request: Comment, file_id: &str, comment_id: &str, ) -> CommentUpdateCall<'a, C>
Create a builder to help you perform the following task:
Updates a comment with patch semantics. For more information, see Manage comments and replies. Required: The fields parameter must be set. To return the exact fields you need, see Return specific fields.
§Arguments
request- No description provided.fileId- The ID of the file.commentId- The ID of the comment.