mangadex_api/v5/manga/id/list/
list_id.rs

1pub mod delete;
2pub mod post;
3
4use crate::HttpClientRef;
5
6use uuid::Uuid;
7
8use delete::RemoveMangaFromCustomListBuilder;
9use post::AddMangaToCustomListBuilder;
10
11#[derive(Debug)]
12pub struct ListIdEndpoint {
13    http_client: HttpClientRef,
14    id: Uuid,
15    list_id: Uuid,
16}
17
18impl ListIdEndpoint {
19    #[doc(hidden)]
20    pub fn new(http_client: HttpClientRef, id: Uuid, list_id: Uuid) -> Self {
21        Self {
22            http_client,
23            id,
24            list_id,
25        }
26    }
27    pub fn delete(&self) -> RemoveMangaFromCustomListBuilder {
28        RemoveMangaFromCustomListBuilder::default()
29            .manga_id(self.id)
30            .list_id(self.list_id)
31            .http_client(self.http_client.clone())
32    }
33    pub fn post(&self) -> AddMangaToCustomListBuilder {
34        AddMangaToCustomListBuilder::default()
35            .manga_id(self.id)
36            .list_id(self.list_id)
37            .http_client(self.http_client.clone())
38    }
39}