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
use clap::Subcommand;
#[derive(Debug, Subcommand)]
pub enum Account {
/// Get information about your account
#[clap(visible_alias = "gi")]
GetInfo {
/// Email of your omg.lol account
email: String,
},
/// Get all addresses associated with your account
#[clap(visible_alias = "ga")]
GetAddresses {
/// Email of your omg.lol account
email: String,
},
/// Get the name associated with your account
#[clap(visible_alias = "gn")]
GetName {
/// Email of your omg.lol account
email: String,
},
/// Update the name associated with your account
#[clap(visible_alias = "sn")]
SetName {
/// Email of your omg.lol account
email: String,
/// Name to set for your account
name: String,
},
/// Get all sessions associated with your account
#[clap(visible_alias = "gs")]
GetSessions {
/// Email of your omg.lol account
email: String,
},
/// Delete a session from your account
#[clap(visible_alias = "rs")]
RemoveSession {
/// Email of your omg.lol account
email: String,
/// ID of the session to remove
session_id: String,
},
/// Get settings associated with your account
#[clap(visible_alias = "gset")]
GetSettings {
/// Email of your omg.lol account
email: String,
},
/// Update settings associated with your account
#[clap(visible_alias = "sset")]
SetSettings {
/// Email of your omg.lol account
email: String,
/// Temporary JSON data input
json_data: String,
},
}
impl Account {
pub fn process(&self) {
match self {
Account::GetInfo { email: _ } => todo!(),
Account::GetAddresses { email: _ } => todo!(),
Account::GetName { email: _ } => todo!(),
Account::SetName { email: _, name: _ } => todo!(),
Account::GetSessions { email: _ } => todo!(),
Account::RemoveSession { email: _, session_id: _ } => todo!(),
Account::GetSettings { email: _ } => todo!(),
Account::SetSettings { email: _, json_data: _ } => todo!(),
}
}
}