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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
mod approve_deletion;
pub(crate) mod custom_lists;
mod delete;
mod followed_custom_lists;
pub(crate) mod followed_groups;
mod followed_manga;
pub(crate) mod followed_manga_feed;
mod followed_users;
mod get;
mod is_following_custom_list;
mod is_following_group;
mod is_following_manga;
mod is_following_user;
mod list;
mod me;
pub(crate) mod my_custom_lists;
mod update_email;
mod update_password;
use crate::v5::user::approve_deletion::ApproveUserDeletionBuilder;
use crate::v5::user::custom_lists::UserCustomListsBuilder;
use crate::v5::user::delete::DeleteUserBuilder;
use crate::v5::user::followed_custom_lists::GetFollowedCustomListsBuilder;
use crate::v5::user::followed_groups::FollowedGroupsBuilder;
use crate::v5::user::followed_manga::FollowedMangaBuilder;
use crate::v5::user::followed_manga_feed::GetFollowedMangaFeedBuilder;
use crate::v5::user::followed_users::FollowedUsersBuilder;
use crate::v5::user::get::GetUserBuilder;
use crate::v5::user::is_following_custom_list::IsFollowingCustomListBuilder;
use crate::v5::user::is_following_group::IsFollowingGroupBuilder;
use crate::v5::user::is_following_manga::IsFollowingMangaBuilder;
use crate::v5::user::is_following_user::IsFollowingUserBuilder;
use crate::v5::user::list::ListUserBuilder;
use crate::v5::user::me::GetMyUserDetailsBuilder;
use crate::v5::user::my_custom_lists::MyCustomListsBuilder;
use crate::v5::user::update_email::UpdateUserEmailBuilder;
use crate::v5::user::update_password::UpdateUserPasswordBuilder;
use crate::HttpClientRef;
#[derive(Debug)]
pub struct UserBuilder {
http_client: HttpClientRef,
}
impl UserBuilder {
#[doc(hidden)]
pub(crate) fn new(http_client: HttpClientRef) -> Self {
Self { http_client }
}
pub fn list(&self) -> ListUserBuilder {
ListUserBuilder::default().http_client(self.http_client.clone())
}
pub fn search(&self) -> ListUserBuilder {
self.list()
}
pub fn get(&self) -> GetUserBuilder {
GetUserBuilder::default().http_client(self.http_client.clone())
}
pub fn view(&self) -> GetUserBuilder {
self.get()
}
pub fn followed_manga_feed(&self) -> GetFollowedMangaFeedBuilder {
GetFollowedMangaFeedBuilder::default().http_client(self.http_client.clone())
}
pub fn followed_groups(&self) -> FollowedGroupsBuilder {
FollowedGroupsBuilder::default().http_client(self.http_client.clone())
}
pub fn delete(&self) -> DeleteUserBuilder {
DeleteUserBuilder::default().http_client(self.http_client.clone())
}
pub fn approve_deletion(&self) -> ApproveUserDeletionBuilder {
ApproveUserDeletionBuilder::default().http_client(self.http_client.clone())
}
pub fn update_password(&self) -> UpdateUserPasswordBuilder {
UpdateUserPasswordBuilder::default().http_client(self.http_client.clone())
}
pub fn update_email(&self) -> UpdateUserEmailBuilder {
UpdateUserEmailBuilder::default().http_client(self.http_client.clone())
}
pub fn me(&self) -> GetMyUserDetailsBuilder {
GetMyUserDetailsBuilder::default().http_client(self.http_client.clone())
}
pub fn is_following_group(&self) -> IsFollowingGroupBuilder {
IsFollowingGroupBuilder::default().http_client(self.http_client.clone())
}
pub fn followed_users(&self) -> FollowedUsersBuilder {
FollowedUsersBuilder::default().http_client(self.http_client.clone())
}
pub fn is_following_user(&self) -> IsFollowingUserBuilder {
IsFollowingUserBuilder::default().http_client(self.http_client.clone())
}
pub fn followed_manga(&self) -> FollowedMangaBuilder {
FollowedMangaBuilder::default().http_client(self.http_client.clone())
}
pub fn is_following_manga(&self) -> IsFollowingMangaBuilder {
IsFollowingMangaBuilder::default().http_client(self.http_client.clone())
}
pub fn my_custom_lists(&self) -> MyCustomListsBuilder {
MyCustomListsBuilder::default().http_client(self.http_client.clone())
}
pub fn custom_lists(&self) -> UserCustomListsBuilder {
UserCustomListsBuilder::default().http_client(self.http_client.clone())
}
pub fn followed_custom_lists(&self) -> GetFollowedCustomListsBuilder {
GetFollowedCustomListsBuilder::default().http_client(self.http_client.clone())
}
pub fn is_following_custom_list(&self) -> IsFollowingCustomListBuilder {
IsFollowingCustomListBuilder::default().http_client(self.http_client.clone())
}
}