omg_api/
weblog.rs

1use clap::Subcommand;
2
3#[derive(Debug, Subcommand)]
4pub enum Weblog {
5    /// Get a specific weblog entry for an omg.lol address
6    Get {
7        /// ID of the weblog entry to get
8        id: String,
9    },
10    /// Get the latest weblog entry for an omg.lol address
11    Latest,
12    /// Get all weblog entries for an omg.lol address
13    GetAll,
14    /// Create a new weblog entry for an omg.lol address
15    Create {
16        /// Content for the weblog entry
17        content: String,
18    },
19    /// Delete a weblog entry for an omg.lol address
20    Delete {
21        /// ID of the weblog entry to delete
22        id: String,
23    },
24    /// Get weblog configuration for an omg.lol address
25    GetConfig,
26    /// Update weblog configuration for an omg.lol address
27    SetConfig {
28        /// Content for the weblog configuration entry
29        content: String,
30    },
31    /// Get the weblog template for an omg.lol address
32    GetTemplate,
33    /// Update the weblog template for an omg.lol address
34    SetTemplate {
35        /// Content for the weblog template entry
36        content: String,
37    },
38}
39
40impl Weblog {
41    pub fn process(&self, _address: &str) {
42        match self {
43            Weblog::Get { id: _ } => todo!(),
44            Weblog::Latest => todo!(),
45            Weblog::GetAll => todo!(),
46            Weblog::Create { content: _ } => todo!(),
47            Weblog::Delete { id: _ } => todo!(),
48            Weblog::GetConfig => todo!(),
49            Weblog::SetConfig { content: _ } => todo!(),
50            Weblog::GetTemplate => todo!(),
51            Weblog::SetTemplate { content: _ } => todo!(),
52        }
53    }
54}