1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
mod abandon_session;
mod commit_session;
mod delete_image;
mod delete_images;
mod get_session;
mod start_edit_chapter_session;
mod start_session;
mod upload_images;
use crate::v5::cover::upload::UploadCoverBuilder;
use crate::v5::upload::abandon_session::AbandonUploadSessionBuilder;
use crate::v5::upload::commit_session::CommitUploadSessionBuilder;
use crate::v5::upload::delete_image::DeleteImageBuilder;
use crate::v5::upload::delete_images::DeleteImagesBuilder;
use crate::v5::upload::get_session::GetUploadSessionBuilder;
use crate::v5::upload::start_edit_chapter_session::StartEditChapterSessionBuilder;
use crate::v5::upload::start_session::StartUploadSessionBuilder;
use crate::v5::upload::upload_images::UploadImagesBuilder;
use crate::HttpClientRef;
#[derive(Debug)]
pub struct UploadBuilder {
http_client: HttpClientRef,
}
impl UploadBuilder {
#[doc(hidden)]
pub(crate) fn new(http_client: HttpClientRef) -> Self {
Self { http_client }
}
pub fn cover(&self) -> UploadCoverBuilder {
UploadCoverBuilder::default().http_client(self.http_client.clone())
}
pub fn get_session(&self) -> GetUploadSessionBuilder {
GetUploadSessionBuilder::default().http_client(self.http_client.clone())
}
pub fn start_session(&self) -> StartUploadSessionBuilder {
StartUploadSessionBuilder::default().http_client(self.http_client.clone())
}
pub fn start_edit_chapter_session(&self) -> StartEditChapterSessionBuilder {
StartEditChapterSessionBuilder::default().http_client(self.http_client.clone())
}
pub fn upload_images(&self) -> UploadImagesBuilder {
UploadImagesBuilder::default().http_client(self.http_client.clone())
}
pub fn abandon_session(&self) -> AbandonUploadSessionBuilder {
AbandonUploadSessionBuilder::default().http_client(self.http_client.clone())
}
pub fn commit_session(&self) -> CommitUploadSessionBuilder {
CommitUploadSessionBuilder::new(self.http_client.clone())
}
pub fn delete_image(&self) -> DeleteImageBuilder {
DeleteImageBuilder::default().http_client(self.http_client.clone())
}
pub fn delete_images(&self) -> DeleteImagesBuilder {
DeleteImagesBuilder::default().http_client(self.http_client.clone())
}
}