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 Blogger hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_blogger3 as blogger3;
use blogger3::{Blogger, 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 = Blogger::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `approve(...)`, `delete(...)`, `get(...)`, `list(...)`, `list_by_blog(...)`, `mark_as_spam(...)` and `remove_content(...)`
// 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 approve(
&self,
blog_id: &str,
post_id: &str,
comment_id: &str,
) -> CommentApproveCall<'a, C>
pub fn approve( &self, blog_id: &str, post_id: &str, comment_id: &str, ) -> CommentApproveCall<'a, C>
Create a builder to help you perform the following task:
Marks a comment as not spam by blog id, post id and comment id.
§Arguments
blogId- No description provided.postId- No description provided.commentId- No description provided.
Sourcepub fn delete(
&self,
blog_id: &str,
post_id: &str,
comment_id: &str,
) -> CommentDeleteCall<'a, C>
pub fn delete( &self, blog_id: &str, post_id: &str, comment_id: &str, ) -> CommentDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes a comment by blog id, post id and comment id.
§Arguments
blogId- No description provided.postId- No description provided.commentId- No description provided.
Sourcepub fn get(
&self,
blog_id: &str,
post_id: &str,
comment_id: &str,
) -> CommentGetCall<'a, C>
pub fn get( &self, blog_id: &str, post_id: &str, comment_id: &str, ) -> CommentGetCall<'a, C>
Create a builder to help you perform the following task:
Gets a comment by id.
§Arguments
blogId- No description provided.postId- No description provided.commentId- No description provided.
Sourcepub fn list(&self, blog_id: &str, post_id: &str) -> CommentListCall<'a, C>
pub fn list(&self, blog_id: &str, post_id: &str) -> CommentListCall<'a, C>
Create a builder to help you perform the following task:
Lists comments.
§Arguments
blogId- No description provided.postId- No description provided.
Sourcepub fn list_by_blog(&self, blog_id: &str) -> CommentListByBlogCall<'a, C>
pub fn list_by_blog(&self, blog_id: &str) -> CommentListByBlogCall<'a, C>
Create a builder to help you perform the following task:
Lists comments by blog.
§Arguments
blogId- No description provided.
Sourcepub fn mark_as_spam(
&self,
blog_id: &str,
post_id: &str,
comment_id: &str,
) -> CommentMarkAsSpamCall<'a, C>
pub fn mark_as_spam( &self, blog_id: &str, post_id: &str, comment_id: &str, ) -> CommentMarkAsSpamCall<'a, C>
Create a builder to help you perform the following task:
Marks a comment as spam by blog id, post id and comment id.
§Arguments
blogId- No description provided.postId- No description provided.commentId- No description provided.
Sourcepub fn remove_content(
&self,
blog_id: &str,
post_id: &str,
comment_id: &str,
) -> CommentRemoveContentCall<'a, C>
pub fn remove_content( &self, blog_id: &str, post_id: &str, comment_id: &str, ) -> CommentRemoveContentCall<'a, C>
Create a builder to help you perform the following task:
Removes the content of a comment by blog id, post id and comment id.
§Arguments
blogId- No description provided.postId- No description provided.commentId- No description provided.