pub struct CommentClient<'a> { /* private fields */ }Expand description
Comment API client.
Implementations§
Source§impl<'a> CommentClient<'a>
impl<'a> CommentClient<'a>
Sourcepub async fn add(&self, params: CommentAddParams) -> BpiResult<CommentData>
pub async fn add(&self, params: CommentAddParams) -> BpiResult<CommentData>
Publishes a comment and returns the canonical payload result.
Sourcepub async fn like(
&self,
params: CommentActionParams,
) -> BpiResult<Option<Value>>
pub async fn like( &self, params: CommentActionParams, ) -> BpiResult<Option<Value>>
Likes or unlikes a comment and returns the canonical payload result.
Sourcepub async fn dislike(
&self,
params: CommentActionParams,
) -> BpiResult<Option<Value>>
pub async fn dislike( &self, params: CommentActionParams, ) -> BpiResult<Option<Value>>
Dislikes or undislikes a comment and returns the canonical payload result.
Sourcepub async fn delete(
&self,
params: CommentDeleteParams,
) -> BpiResult<Option<Value>>
pub async fn delete( &self, params: CommentDeleteParams, ) -> BpiResult<Option<Value>>
Deletes a comment and returns the canonical payload result.
Source§impl<'a> CommentClient<'a>
impl<'a> CommentClient<'a>
Sourcepub async fn list(
&self,
params: CommentListParams,
) -> BpiResult<CommentListData>
pub async fn list( &self, params: CommentListParams, ) -> BpiResult<CommentListData>
Gets the main comment list for a target comment area.
Sourcepub async fn replies(
&self,
params: CommentRepliesParams,
) -> BpiResult<CommentListData>
pub async fn replies( &self, params: CommentRepliesParams, ) -> BpiResult<CommentListData>
Gets replies under a root comment.
Sourcepub async fn hot(
&self,
params: CommentHotParams,
) -> BpiResult<Option<HotCommentData>>
pub async fn hot( &self, params: CommentHotParams, ) -> BpiResult<Option<HotCommentData>>
Gets hot comments under a root comment when the API returns a payload.
Sourcepub async fn count(&self, params: CommentCountParams) -> BpiResult<CountData>
pub async fn count(&self, params: CommentCountParams) -> BpiResult<CountData>
Gets the total comment count for a target comment area.
Trait Implementations§
Source§impl<'a> Clone for CommentClient<'a>
impl<'a> Clone for CommentClient<'a>
Source§fn clone(&self) -> CommentClient<'a>
fn clone(&self) -> CommentClient<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for CommentClient<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CommentClient<'a>
impl<'a> !UnwindSafe for CommentClient<'a>
impl<'a> Freeze for CommentClient<'a>
impl<'a> Send for CommentClient<'a>
impl<'a> Sync for CommentClient<'a>
impl<'a> Unpin for CommentClient<'a>
impl<'a> UnsafeUnpin for CommentClient<'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