mangadex_api/v5/custom_list/id/
batch_manga.rs

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