mastodon_api\methods\admin/
ip_blocks.rs1use crate::MastodonClient;
2use crate::error::Result;
3
4pub struct AdminIpBlocksHandler<'a> {
6 client: &'a MastodonClient,
7}
8
9impl<'a> AdminIpBlocksHandler<'a> {
10 pub fn new(client: &'a MastodonClient) -> Self {
11 Self { client }
12 }
13
14 pub async fn list(&self) -> Result<serde_json::Value> {
16 let url = format!("{}/api/v1/admin/ip_blocks", self.client.base_url());
17 let req = self.client.http_client().get(&url);
18 self.client.send(req).await
19 }
20}