mangadex_api/v5/manga/
id.rs1pub mod aggregate;
2pub mod delete;
3pub mod feed;
4pub mod follow;
5pub mod get;
6pub mod list;
7pub mod put;
8pub mod read;
9pub mod status;
10
11use crate::HttpClientRef;
12
13use uuid::Uuid;
14
15use aggregate::AggregateEndpoint;
16use delete::DeleteMangaBuilder;
17use feed::FeedEndpoint;
18use follow::FollowEndpoint;
19use get::GetMangaBuilder;
20use list::ListEndpoint;
21use put::UpdateMangaBuilder;
22use read::ReadEndpoint;
23use status::StatusEndpoint;
24
25#[derive(Debug)]
26pub struct IdEndpoint {
27 http_client: HttpClientRef,
28 id: Uuid,
29}
30
31impl IdEndpoint {
32 #[doc(hidden)]
33 pub fn new(http_client: HttpClientRef, id: Uuid) -> Self {
34 Self { http_client, id }
35 }
36 pub fn aggregate(&self) -> AggregateEndpoint {
37 AggregateEndpoint::new(self.http_client.clone(), self.id)
38 }
39 pub fn delete(&self) -> DeleteMangaBuilder {
40 DeleteMangaBuilder::default()
41 .manga_id(self.id)
42 .http_client(self.http_client.clone())
43 }
44 pub fn feed(&self) -> FeedEndpoint {
45 FeedEndpoint::new(self.http_client.clone(), self.id)
46 }
47 pub fn follow(&self) -> FollowEndpoint {
48 FollowEndpoint::new(self.http_client.clone(), self.id)
49 }
50 pub fn get(&self) -> GetMangaBuilder {
51 GetMangaBuilder::default()
52 .manga_id(self.id)
53 .http_client(self.http_client.clone())
54 }
55 pub fn list(&self) -> ListEndpoint {
56 ListEndpoint::new(self.http_client.clone(), self.id)
57 }
58 pub fn put(&self) -> UpdateMangaBuilder {
59 UpdateMangaBuilder::default()
60 .manga_id(self.id)
61 .http_client(self.http_client.clone())
62 }
63 pub fn read(&self) -> ReadEndpoint {
64 ReadEndpoint::new(self.http_client.clone(), self.id)
65 }
66 pub fn status(&self) -> StatusEndpoint {
67 StatusEndpoint::new(self.http_client.clone(), self.id)
68 }
69}