From c9ac54435649973c1aa0543434cc344e66cf33f8 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 9 Jun 2019 22:51:27 +0200 Subject: Fetch privacy groups. --- examples/zotcli.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'examples/zotcli.rs') diff --git a/examples/zotcli.rs b/examples/zotcli.rs index 986dc85..ceb463b 100644 --- a/examples/zotcli.rs +++ b/examples/zotcli.rs @@ -53,6 +53,10 @@ fn main() { (@subcommand abconfig => (about: "Fetch abconfig") ) + (@subcommand group => + (about: "Fetch privacy groups") + (@arg raw: --raw "Display raw json payload") + ) (@subcommand xchan => (about: "Fetch xchan info") (@arg raw: --raw "Display raw json payload") @@ -87,6 +91,15 @@ fn main() { let raw = m.is_present("raw"); zot::abook::fetch(&client, raw); }, + ("group", Some(m)) => { + let res = client.group().fetch().unwrap(); + if m.is_present("raw") { + println!("{}", res); + } + else { + zot::group::list(&res); + } + }, ("xchan", Some(m)) => { let raw = m.is_present("raw"); let t = if m.is_present("guid") { -- cgit v1.2.3