pub struct FollowRequestsHandler<'a> { /* private fields */ }Expand description
Handler for follow request-related API endpoints.
Implementations§
Source§impl<'a> FollowRequestsHandler<'a>
impl<'a> FollowRequestsHandler<'a>
Sourcepub fn new(client: &'a MastodonClient) -> Self
pub fn new(client: &'a MastodonClient) -> Self
Creates a new FollowRequestsHandler for the given client.
Sourcepub async fn list(&self) -> Result<Vec<Account>>
pub async fn list(&self) -> Result<Vec<Account>>
Fetches pending follow requests.
Returns:
Result<Vec<Account>>: The pending follow requests.
Corresponds to GET /api/v1/follow_requests.
Sourcepub fn list_paged(&self) -> PagedRequest<'a, Account>
pub fn list_paged(&self) -> PagedRequest<'a, Account>
Returns a paged request for fetching pending follow requests.
Accepts a follow request from the given account.
Parameters:
id: The ID of the account whose follow request should be accepted.
Returns:
Result<Relationship>: The relationship with the accepted account.
Corresponds to POST /api/v1/follow_requests/:id/authorize.
Sourcepub async fn reject(&self, id: &str) -> Result<Relationship>
pub async fn reject(&self, id: &str) -> Result<Relationship>
Rejects a follow request from the given account.
Parameters:
id: The ID of the account whose follow request should be rejected.
Returns:
Result<Relationship>: The relationship with the rejected account.
Corresponds to POST /api/v1/follow_requests/:id/reject.
Auto Trait Implementations§
impl<'a> Freeze for FollowRequestsHandler<'a>
impl<'a> !RefUnwindSafe for FollowRequestsHandler<'a>
impl<'a> Send for FollowRequestsHandler<'a>
impl<'a> Sync for FollowRequestsHandler<'a>
impl<'a> Unpin for FollowRequestsHandler<'a>
impl<'a> !UnwindSafe for FollowRequestsHandler<'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