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
mod activate;
mod check_username_available;
mod complete_recovery;
mod create;
mod recover;
mod resend_activation_code;
use crate::v5::account::activate::ActivateAccountBuilder;
use crate::v5::account::check_username_available::CheckUsernameAvailableBuilder;
use crate::v5::account::complete_recovery::CompleteAccountRecoveryBuilder;
use crate::v5::account::create::CreateAccountBuilder;
use crate::v5::account::recover::RecoverAccountBuilder;
use crate::v5::account::resend_activation_code::ResendActivationCodeBuilder;
use crate::HttpClientRef;
#[derive(Debug)]
pub struct AccountBuilder {
http_client: HttpClientRef,
}
impl AccountBuilder {
#[doc(hidden)]
pub(crate) fn new(http_client: HttpClientRef) -> Self {
Self { http_client }
}
pub fn create(&self) -> CreateAccountBuilder {
CreateAccountBuilder::default().http_client(self.http_client.clone())
}
pub fn activate(&self) -> ActivateAccountBuilder {
ActivateAccountBuilder::default().http_client(self.http_client.clone())
}
pub fn resend_activation_code(&self) -> ResendActivationCodeBuilder {
ResendActivationCodeBuilder::default().http_client(self.http_client.clone())
}
pub fn recover(&self) -> RecoverAccountBuilder {
RecoverAccountBuilder::default().http_client(self.http_client.clone())
}
pub fn complete_recovery(&self) -> CompleteAccountRecoveryBuilder {
CompleteAccountRecoveryBuilder::default().http_client(self.http_client.clone())
}
pub fn check_username_available(&self) -> CheckUsernameAvailableBuilder {
CheckUsernameAvailableBuilder::default().http_client(self.http_client.clone())
}
}