alchemy_api/api/notify/
team_webhooks.rs1use super::Webhook;
2use crate::cores::endpoint::Endpoint;
3use http::Method;
4use serde::{Deserialize, Serialize};
5
6#[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#[derive(Debug, Clone, Serialize, Deserialize)]
22pub struct GetAllWebhooksResponse {
23 data: Vec<Webhook>,
24}
25
26impl GetAllWebhooksResponse {
27 pub fn data(&self) -> Vec<Webhook> {
29 self.data.clone()
30 }
31}