diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2024-03-25 12:00:13 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2024-03-25 12:00:13 +0100 |
commit | 880b640d3f63c7d26e1b604eb6c905b0973dfae7 (patch) | |
tree | 78cb6aaecaab77145c3c22e7877ec0037297a36a /src/bin/zot/main.rs | |
parent | e0ce8e76101210918903a780af26abea5284d076 (diff) | |
download | rust-zotapi-880b640d3f63c7d26e1b604eb6c905b0973dfae7.tar.gz rust-zotapi-880b640d3f63c7d26e1b604eb6c905b0973dfae7.tar.bz2 rust-zotapi-880b640d3f63c7d26e1b604eb6c905b0973dfae7.zip |
Reenable requesting abook infor for channel.simplify
Only dumps raw json response for now, make it nicer later.
Diffstat (limited to 'src/bin/zot/main.rs')
-rw-r--r-- | src/bin/zot/main.rs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/bin/zot/main.rs b/src/bin/zot/main.rs index 50dfb97..a919e35 100644 --- a/src/bin/zot/main.rs +++ b/src/bin/zot/main.rs @@ -58,8 +58,11 @@ async fn main() -> Result<(), Box<(dyn std::error::Error + 'static)>> { (@subcommand network => (about: "Fetch the network stream") ) - (@subcommand abook => - (about: "Fetch address book/contact info") + (@subcommand contact => + (about: "Work with address book/contact info") + (@subcommand list => + (about: "List the current channels contacts.") + ) ) (@subcommand abconfig => (about: "Fetch abconfig") @@ -154,6 +157,18 @@ async fn main() -> Result<(), Box<(dyn std::error::Error + 'static)>> { } } } + ("abook", Some(m)) => { + match m.subcommand() { + ("list", Some(_)) => { + let r = z.abook_list().await?; + println!("{}", r); + } + _ => { + println!("Not a known subcommand for `abook`, or it's not implemented yet."); + println!("{}", m.usage()); + } + } + } /* ("network", Some(m)) => { let raw = m.is_present("raw"); |