neptunium_http/endpoints/guild/channels/
list_guild_channels.rs1use bon::Builder;
2use neptunium_model::{
3 channel::Channel,
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 ListGuildChannels {
12 pub guild_id: Id<GuildMarker>,
13}
14
15impl Endpoint for ListGuildChannels {
16 type Response = Vec<Channel>;
17
18 fn into_request(self) -> crate::request::Request {
19 Request::builder()
20 .method(Method::GET)
21 .path(format!("/guilds/{}/channels", self.guild_id))
22 .build()
23 }
24}