pub struct SuggestionsHandler<'a> { /* private fields */ }Expand description
Handler for suggestion-related API endpoints.
Implementations§
Source§impl<'a> SuggestionsHandler<'a>
impl<'a> SuggestionsHandler<'a>
Sourcepub fn new(client: &'a MastodonClient) -> Self
pub fn new(client: &'a MastodonClient) -> Self
Creates a new SuggestionsHandler for the given client.
Sourcepub async fn list(&self, limit: Option<u32>) -> Result<Vec<Suggestion>>
pub async fn list(&self, limit: Option<u32>) -> Result<Vec<Suggestion>>
Fetches accounts suggested for follow.
Parameters:
limit: Maximum number of results to return.
Returns:
Result<Vec<Suggestion>>: The account suggestions.
Corresponds to GET /api/v1/suggestions.
Sourcepub async fn remove(&self, account_id: &str) -> Result<()>
pub async fn remove(&self, account_id: &str) -> Result<()>
Removes an account from suggestions.
Parameters:
account_id: The ID of the account to remove from suggestions.
Returns:
Result<()>: Success if the account was removed from suggestions.
Corresponds to DELETE /api/v1/suggestions/:account_id.
Auto Trait Implementations§
impl<'a> Freeze for SuggestionsHandler<'a>
impl<'a> !RefUnwindSafe for SuggestionsHandler<'a>
impl<'a> Send for SuggestionsHandler<'a>
impl<'a> Sync for SuggestionsHandler<'a>
impl<'a> Unpin for SuggestionsHandler<'a>
impl<'a> !UnwindSafe for SuggestionsHandler<'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