✨ feat(cli): add label command-line interface
- implement `LabelCli` struct with `run` method for fetching Gmail labels - integrate `clap` for command-line argument parsing
This commit is contained in:
committed by
Jeremiah Russell
parent
88e82f21c9
commit
8518242302
12
src/label_cli.rs
Normal file
12
src/label_cli.rs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
use clap::Parser;
|
||||||
|
use cull_gmail::{Error, Labels};
|
||||||
|
|
||||||
|
#[derive(Debug, Parser)]
|
||||||
|
pub struct LabelCli {}
|
||||||
|
|
||||||
|
impl LabelCli {
|
||||||
|
pub async fn run(&self, credential_file: &str) -> Result<(), Error> {
|
||||||
|
let _ = Labels::new(credential_file, true).await?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user