Skip to main content

neptunium_http/endpoints/webhooks/
list_guild_webhooks.rs

1use bon::Builder;
2use neptunium_model::{
3    guild::webhook::Webhook,
4    id::{Id, marker::GuildMarker},
5};
6use reqwest::Method;
7
8use crate::{endpoints::Endpoint, request::Request};
9
10#[derive(Builder, Copy, Clone, Debug)]
11pub struct ListGuildWebhooks {
12    pub guild_id: Id<GuildMarker>,
13}
14
15impl Endpoint for ListGuildWebhooks {
16    type Response = Vec<Webhook>;
17
18    fn into_request(self) -> crate::request::Request {
19        Request::builder()
20            .method(Method::GET)
21            .path(format!("/guilds/{}/webhooks", self.guild_id))
22            .build()
23    }
24}