alchemy_api/api/notify/
team_webhooks.rs

1use super::Webhook;
2use crate::cores::endpoint::Endpoint;
3use http::Method;
4use serde::{Deserialize, Serialize};
5
6/// This endpoint allows you to get all webhooks on your team.
7#[derive(Default, Debug, Clone)]
8pub struct GetAllWebhooks;
9
10impl Endpoint for GetAllWebhooks {
11    fn method(&self) -> http::Method {
12        Method::GET
13    }
14
15    fn endpoint(&self) -> std::borrow::Cow<'static, str> {
16        "api/team-webhooks".into()
17    }
18}
19
20/// List of webhook objects.
21#[derive(Debug, Clone, Serialize, Deserialize)]
22pub struct GetAllWebhooksResponse {
23    data: Vec<Webhook>,
24}
25
26impl GetAllWebhooksResponse {
27    /// List of nft filter objects.
28    pub fn data(&self) -> Vec<Webhook> {
29        self.data.clone()
30    }
31}