diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2019-06-09 22:51:27 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2019-06-09 22:51:27 +0200 |
commit | c9ac54435649973c1aa0543434cc344e66cf33f8 (patch) | |
tree | 6209b40117a60896c0d018b09a68d3e3a3690c46 /examples/zotcli.rs | |
parent | 051e884f55162498bae05e796b431e9122313c11 (diff) | |
download | rust-zotapi-c9ac54435649973c1aa0543434cc344e66cf33f8.tar.gz rust-zotapi-c9ac54435649973c1aa0543434cc344e66cf33f8.tar.bz2 rust-zotapi-c9ac54435649973c1aa0543434cc344e66cf33f8.zip |
Fetch privacy groups.
Diffstat (limited to 'examples/zotcli.rs')
-rw-r--r-- | examples/zotcli.rs | 13 |
1 files changed, 13 insertions, 0 deletions
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") { |