mastodon_api\methods/
endorsements.rs1use crate::MastodonClient;
2use crate::error::Result;
3use crate::models::Account;
4
5pub struct EndorsementsHandler<'a> {
7 client: &'a MastodonClient,
8}
9
10impl<'a> EndorsementsHandler<'a> {
11 pub fn new(client: &'a MastodonClient) -> Self {
13 Self { client }
14 }
15
16 pub async fn list(&self) -> Result<Vec<Account>> {
23 let url = format!("{}/api/v1/endorsements", self.client.base_url());
24 let req = self.client.http_client().get(&url);
25 self.client.send(req).await
26 }
27}