mangadex_api/v5/manga/draft/
id.rs

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