pub struct BlogsService { /* private fields */ }blogs only.Expand description
Typed access to the blogs API v2 surface (7 operations). Obtained via
Ghl::blogs.
Implementations§
Source§impl BlogsService
impl BlogsService
Get all authors
The “Get all authors” Api return the blog authors for a given location ID. Please use “blogs/author.readonly”
GET /blogs/authors
Requires scope: blogs/author.readonly.
Sourcepub async fn get_all_categories(
&self,
params: &GetAllCategoriesParams,
) -> Result<CategoriesResponseDTO>
pub async fn get_all_categories( &self, params: &GetAllCategoriesParams, ) -> Result<CategoriesResponseDTO>
Get all categories
The “Get all categories” Api return the blog categoies for a given location ID. Please use “blogs/category.readonly”
GET /blogs/categories
Requires scope: blogs/category.readonly.
Sourcepub async fn create_blog_post(
&self,
body: &CreateBlogPostParams,
) -> Result<BlogPostCreateResponseWrapperDTO>
pub async fn create_blog_post( &self, body: &CreateBlogPostParams, ) -> Result<BlogPostCreateResponseWrapperDTO>
Create Blog Post
The “Create Blog Post” API allows you create blog post for any given blog site. Please use blogs/post.write
POST /blogs/posts
Requires scope: blogs/post.write.
Sourcepub async fn get_blog_posts_by_blog_id(
&self,
params: &GetBlogPostsByBlogIdParams,
) -> Result<BlogPostGetResponseWrapperDTO>
pub async fn get_blog_posts_by_blog_id( &self, params: &GetBlogPostsByBlogIdParams, ) -> Result<BlogPostGetResponseWrapperDTO>
Get Blog posts by Blog ID
The “Get Blog posts by Blog ID” API allows you get blog posts for any given blog site using blog ID.Please use blogs/posts.readonly
GET /blogs/posts/all
Requires scope: blogs/posts.readonly.
Sourcepub async fn check_url_slug(
&self,
params: &CheckUrlSlugParams,
) -> Result<UrlSlugCheckResponseDTO>
pub async fn check_url_slug( &self, params: &CheckUrlSlugParams, ) -> Result<UrlSlugCheckResponseDTO>
Check url slug
The “Check url slug” API allows check the blog slug validation which is needed before publishing any blog post. Please use blogs/check-slug.readonly. you can find the POST ID from the post edit url.
GET /blogs/posts/url-slug-exists
Requires scope: blogs/check-slug.readonly.
Sourcepub async fn update_blog_post(
&self,
post_id: &str,
body: &UpdateBlogPostParams,
) -> Result<BlogPostUpdateResponseWrapperDTO>
pub async fn update_blog_post( &self, post_id: &str, body: &UpdateBlogPostParams, ) -> Result<BlogPostUpdateResponseWrapperDTO>
Update Blog Post
The “Update Blog Post” API allows you update blog post for any given blog site. Please use blogs/post-update.write
PUT /blogs/posts/{postId}
Requires scope: blogs/post-update.write.
Sourcepub async fn get_blogs_by_location_id(
&self,
params: &GetBlogsByLocationIdParams,
) -> Result<BlogGetResponseWrapperDTO>
pub async fn get_blogs_by_location_id( &self, params: &GetBlogsByLocationIdParams, ) -> Result<BlogGetResponseWrapperDTO>
Get Blogs by Location ID
The “Get Blogs by Location ID” API allows you get blogs using Location ID.Please use blogs/list.readonly
GET /blogs/site/all
Requires scope: blogs/list.readonly.
Trait Implementations§
Source§impl Clone for BlogsService
impl Clone for BlogsService
Source§fn clone(&self) -> BlogsService
fn clone(&self) -> BlogsService
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more