aboutsummaryrefslogtreecommitdiffstats
path: root/examples/zotcli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/zotcli.rs')
-rw-r--r--examples/zotcli.rs13
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") {