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