pub struct PostMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all methods supported on post 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 `delete(...)`, `get(...)`, `get_by_path(...)`, `insert(...)`, `list(...)`, `patch(...)`, `publish(...)`, `revert(...)`, `search(...)` and `update(...)`
// to build up your call.
let rb = hub.posts();Implementations§
Source§impl<'a, C> PostMethods<'a, C>
impl<'a, C> PostMethods<'a, C>
Sourcepub fn delete(&self, blog_id: &str, post_id: &str) -> PostDeleteCall<'a, C>
pub fn delete(&self, blog_id: &str, post_id: &str) -> PostDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes a post by blog id and post id.
§Arguments
blogId- No description provided.postId- No description provided.
Sourcepub fn get(&self, blog_id: &str, post_id: &str) -> PostGetCall<'a, C>
pub fn get(&self, blog_id: &str, post_id: &str) -> PostGetCall<'a, C>
Create a builder to help you perform the following task:
Gets a post by blog id and post id
§Arguments
blogId- No description provided.postId- No description provided.
Sourcepub fn get_by_path(&self, blog_id: &str, path: &str) -> PostGetByPathCall<'a, C>
pub fn get_by_path(&self, blog_id: &str, path: &str) -> PostGetByPathCall<'a, C>
Create a builder to help you perform the following task:
Gets a post by path.
§Arguments
blogId- No description provided.path- No description provided.
Sourcepub fn insert(&self, request: Post, blog_id: &str) -> PostInsertCall<'a, C>
pub fn insert(&self, request: Post, blog_id: &str) -> PostInsertCall<'a, C>
Create a builder to help you perform the following task:
Inserts a post.
§Arguments
request- No description provided.blogId- No description provided.
Sourcepub fn list(&self, blog_id: &str) -> PostListCall<'a, C>
pub fn list(&self, blog_id: &str) -> PostListCall<'a, C>
Create a builder to help you perform the following task:
Lists posts.
§Arguments
blogId- No description provided.
Sourcepub fn patch(
&self,
request: Post,
blog_id: &str,
post_id: &str,
) -> PostPatchCall<'a, C>
pub fn patch( &self, request: Post, blog_id: &str, post_id: &str, ) -> PostPatchCall<'a, C>
Create a builder to help you perform the following task:
Patches a post.
§Arguments
request- No description provided.blogId- No description provided.postId- No description provided.
Sourcepub fn publish(&self, blog_id: &str, post_id: &str) -> PostPublishCall<'a, C>
pub fn publish(&self, blog_id: &str, post_id: &str) -> PostPublishCall<'a, C>
Create a builder to help you perform the following task:
Publishes a post.
§Arguments
blogId- No description provided.postId- No description provided.
Sourcepub fn revert(&self, blog_id: &str, post_id: &str) -> PostRevertCall<'a, C>
pub fn revert(&self, blog_id: &str, post_id: &str) -> PostRevertCall<'a, C>
Create a builder to help you perform the following task:
Reverts a published or scheduled post to draft state.
§Arguments
blogId- No description provided.postId- No description provided.
Sourcepub fn search(&self, blog_id: &str, q: &str) -> PostSearchCall<'a, C>
pub fn search(&self, blog_id: &str, q: &str) -> PostSearchCall<'a, C>
Create a builder to help you perform the following task:
Searches for posts matching given query terms in the specified blog.
§Arguments
blogId- No description provided.q- No description provided.
Sourcepub fn update(
&self,
request: Post,
blog_id: &str,
post_id: &str,
) -> PostUpdateCall<'a, C>
pub fn update( &self, request: Post, blog_id: &str, post_id: &str, ) -> PostUpdateCall<'a, C>
Create a builder to help you perform the following task:
Updates a post by blog id and post id.
§Arguments
request- No description provided.blogId- No description provided.postId- No description provided.