omg_api/
account.rs

1use clap::Subcommand;
2
3#[derive(Debug, Subcommand)]
4pub enum Account {
5    /// Get information about your account
6    #[clap(visible_alias = "gi")]
7    GetInfo {
8        /// Email of your omg.lol account
9        email: String,
10    },
11    /// Get all addresses associated with your account
12    #[clap(visible_alias = "ga")]
13    GetAddresses {
14        /// Email of your omg.lol account
15        email: String,
16    },
17    /// Get the name associated with your account
18    #[clap(visible_alias = "gn")]
19    GetName {
20        /// Email of your omg.lol account
21        email: String,
22    },
23    /// Update the name associated with your account
24    #[clap(visible_alias = "sn")]
25    SetName {
26        /// Email of your omg.lol account
27        email: String,
28        /// Name to set for your account
29        name: String,
30    },
31    /// Get all sessions associated with your account
32    #[clap(visible_alias = "gs")]
33    GetSessions {
34        /// Email of your omg.lol account
35        email: String,
36    },
37    /// Delete a session from your account
38    #[clap(visible_alias = "rs")]
39    RemoveSession {
40        /// Email of your omg.lol account
41        email: String,
42        /// ID of the session to remove
43        session_id: String,
44    },
45    /// Get settings associated with your account
46    #[clap(visible_alias = "gset")]
47    GetSettings {
48        /// Email of your omg.lol account
49        email: String,
50    },
51    /// Update settings associated with your account
52    #[clap(visible_alias = "sset")]
53    SetSettings {
54        /// Email of your omg.lol account
55        email: String,
56        /// Temporary JSON data input
57        json_data: String,
58    },
59}
60
61impl Account {
62    pub fn process(&self) {
63        match self {
64            Account::GetInfo { email: _ } => todo!(),
65            Account::GetAddresses { email: _ } => todo!(),
66            Account::GetName { email: _ } => todo!(),
67            Account::SetName { email: _, name: _ } => todo!(),
68            Account::GetSessions { email: _ } => todo!(),
69            Account::RemoveSession { email: _, session_id: _ } => todo!(),
70            Account::GetSettings { email: _ } => todo!(),
71            Account::SetSettings { email: _, json_data: _ } => todo!(),
72        }
73    }
74}