omg_api/status.rs
1use clap::Subcommand;
2
3#[derive(Debug, Subcommand)]
4pub enum Status {
5 /// Get a single statuslog entry for an omg.lol address
6 Get {
7 /// ID of the statuslog entry to get
8 id: String,
9 },
10 /// Get entire statuslog for an omg.lol address
11 GetAll,
12 /// Create a new statuslog entry for an omg.lol address
13 Create {
14 /// Emoji to use for the statuslog entry
15 emoji: String,
16 /// Content for the statuslog entry
17 content: String,
18 /// External URL to link to from the statuslog entry
19 external_url: String, // TODO: should this be optional?
20 },
21 /// Create a new statuslog entry for an omg.lol address from a single string
22 EasyCreate {
23 /// Status to share
24 status: String,
25 },
26 /// Update the content of an existing statuslog entry for an omg.lol address
27 Update {
28 /// ID of the statuslog entry to update
29 id: String,
30 /// New emoji to use for the statuslog entry
31 emoji: String,
32 /// New content for the statuslog entry
33 content: String,
34 // TODO: should there be an external url here?
35 },
36 /// Get a statuslog bio
37 GetBio,
38 /// Update a statuslog bio
39 SetBio {
40 /// New content for statuslog bio
41 content: String,
42 },
43 /// Get all statuslog entries for all addresses
44 GetAllHistorical,
45 /// Get the most recent statuslog entries across omg.lol
46 Timeline,
47}
48
49impl Status {
50 pub fn process(&self, _address: &str) {
51 match self {
52 Status::Get { id: _ } => todo!(),
53 Status::GetAll => todo!(),
54 Status::Create { emoji: _, content: _, external_url: _ } => todo!(),
55 Status::EasyCreate { status: _ } => todo!(),
56 Status::Update { id: _, emoji: _, content: _ } => todo!(),
57 Status::GetBio => todo!(),
58 Status::SetBio { content: _ } => todo!(),
59 Status::GetAllHistorical => todo!(),
60 Status::Timeline => todo!(),
61 }
62 }
63}