omg_api/
now.rs

1use clap::Subcommand;
2
3#[derive(Debug, Subcommand)]
4pub enum Now {
5    /// Get the /now page for an address
6    Get,
7    /// Get all listed /now pages from now.garden
8    List,
9    /// Set the contents of the /now page for an address, remember to set the -l flag if you want your /now page listed
10    Set {
11        /// New content for the /now page
12        content: String,
13        /// List this /now page in now.garden
14        #[arg(short, long, default_value_t = false)]
15        listed: bool,
16    },
17}
18
19impl Now {
20    pub fn process(&self, _address: &str) {
21        match self {
22            Now::Get => todo!(),
23            Now::List => todo!(),
24            Now::Set { content: _, listed: _ } => todo!(),
25        }
26    }
27}