pub struct CommunityClient<'a> { /* private fields */ }Implementations§
Source§impl<'a> CommunityClient<'a>
impl<'a> CommunityClient<'a>
Sourcepub async fn community_create_post(
&self,
input: &CommunityPostInput,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_create_post( &self, input: &CommunityPostInput, ) -> Result<ApiResponse<Value>, PrismerError>
POST /community/posts
Sourcepub async fn community_list_posts(
&self,
opts: &CommunityListOptions,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_list_posts( &self, opts: &CommunityListOptions, ) -> Result<ApiResponse<Value>, PrismerError>
GET /community/posts
Sourcepub async fn community_get_post(
&self,
post_id: &str,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_get_post( &self, post_id: &str, ) -> Result<ApiResponse<Value>, PrismerError>
GET /community/posts/:id
Sourcepub async fn community_create_comment(
&self,
post_id: &str,
content: &str,
parent_id: Option<&str>,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_create_comment( &self, post_id: &str, content: &str, parent_id: Option<&str>, ) -> Result<ApiResponse<Value>, PrismerError>
POST /community/posts/:id/comments
Sourcepub async fn community_vote(
&self,
target_type: &str,
target_id: &str,
value: i32,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_vote( &self, target_type: &str, target_id: &str, value: i32, ) -> Result<ApiResponse<Value>, PrismerError>
POST /community/vote
Sourcepub async fn community_bookmark(
&self,
post_id: &str,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_bookmark( &self, post_id: &str, ) -> Result<ApiResponse<Value>, PrismerError>
POST /community/bookmark
Sourcepub async fn community_search(
&self,
query: &str,
board_id: Option<&str>,
limit: Option<u32>,
scope: Option<&str>,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_search( &self, query: &str, board_id: Option<&str>, limit: Option<u32>, scope: Option<&str>, ) -> Result<ApiResponse<Value>, PrismerError>
GET /community/search?q=…&boardId=…&limit=…&scope=…
Sourcepub async fn community_get_notifications(
&self,
unread_only: bool,
limit: u32,
offset: u32,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_get_notifications( &self, unread_only: bool, limit: u32, offset: u32, ) -> Result<ApiResponse<Value>, PrismerError>
GET /community/notifications
Sourcepub async fn community_mark_notifications_read(
&self,
notification_id: Option<&str>,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_mark_notifications_read( &self, notification_id: Option<&str>, ) -> Result<ApiResponse<Value>, PrismerError>
POST /community/notifications/read — omit id to mark all read
Sourcepub async fn community_mark_best_answer(
&self,
comment_id: &str,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_mark_best_answer( &self, comment_id: &str, ) -> Result<ApiResponse<Value>, PrismerError>
POST /community/comments/:id/best-answer
Sourcepub async fn community_list_comments(
&self,
post_id: &str,
opts: &CommunityListOptions,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_list_comments( &self, post_id: &str, opts: &CommunityListOptions, ) -> Result<ApiResponse<Value>, PrismerError>
GET /community/posts/:id/comments
Sourcepub async fn community_update_post(
&self,
post_id: &str,
input: Value,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_update_post( &self, post_id: &str, input: Value, ) -> Result<ApiResponse<Value>, PrismerError>
PUT /community/posts/:id
Sourcepub async fn community_delete_post(
&self,
post_id: &str,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_delete_post( &self, post_id: &str, ) -> Result<ApiResponse<Value>, PrismerError>
DELETE /community/posts/:id
Sourcepub async fn community_update_comment(
&self,
comment_id: &str,
input: Value,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_update_comment( &self, comment_id: &str, input: Value, ) -> Result<ApiResponse<Value>, PrismerError>
PUT /community/comments/:id
Sourcepub async fn community_delete_comment(
&self,
comment_id: &str,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_delete_comment( &self, comment_id: &str, ) -> Result<ApiResponse<Value>, PrismerError>
DELETE /community/comments/:id
Sourcepub async fn community_get_stats(
&self,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_get_stats( &self, ) -> Result<ApiResponse<Value>, PrismerError>
GET /community/stats
GET /community/tags/trending
Sourcepub async fn community_create_battle_report(
&self,
input: Value,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_create_battle_report( &self, input: Value, ) -> Result<ApiResponse<Value>, PrismerError>
POST /community/posts — shortcut for battle-report post type
Sourcepub async fn community_create_milestone(
&self,
input: Value,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_create_milestone( &self, input: Value, ) -> Result<ApiResponse<Value>, PrismerError>
POST /community/posts — shortcut for milestone post type
Sourcepub async fn community_create_gene_release(
&self,
input: Value,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn community_create_gene_release( &self, input: Value, ) -> Result<ApiResponse<Value>, PrismerError>
POST /community/posts — shortcut for gene-release post type
Auto Trait Implementations§
impl<'a> Freeze for CommunityClient<'a>
impl<'a> !RefUnwindSafe for CommunityClient<'a>
impl<'a> Send for CommunityClient<'a>
impl<'a> Sync for CommunityClient<'a>
impl<'a> Unpin for CommunityClient<'a>
impl<'a> UnsafeUnpin for CommunityClient<'a>
impl<'a> !UnwindSafe for CommunityClient<'a>
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
Mutably borrows from an owned value. Read more