diff options
Diffstat (limited to 'examples/zot.rs')
-rw-r--r-- | examples/zot.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/zot.rs b/examples/zot.rs index 2c49fe3..5fa4f09 100644 --- a/examples/zot.rs +++ b/examples/zot.rs @@ -25,6 +25,7 @@ use clap::{Arg, SubCommand}; use dotenv::dotenv; use std::env; +mod abook; mod channel_stream; mod network_stream; @@ -47,6 +48,12 @@ fn main() { .arg(Arg::with_name("raw") .long("raw") .help("Display raw json payload"))) + .subcommand( + SubCommand::with_name("abook") + .about("Fetch address book/contact info") + .arg(Arg::with_name("raw") + .long("raw") + .help("Display raw json payload"))) .get_matches(); let client = zotapi::client(&site, &user, &password); @@ -60,6 +67,10 @@ fn main() { let raw = m.is_present("raw"); network_stream::fetch(&client, raw); }, + ("abook", Some(m)) => { + let raw = m.is_present("raw"); + abook::fetch(&client, raw); + }, _ => { println!("{}", matches.usage()); }, |