aboutsummaryrefslogtreecommitdiffstats
path: root/examples/zotcli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/zotcli.rs')
-rw-r--r--examples/zotcli.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/zotcli.rs b/examples/zotcli.rs
index 14bb9ad..02f51e6 100644
--- a/examples/zotcli.rs
+++ b/examples/zotcli.rs
@@ -94,10 +94,9 @@ fn main() {
}
("group", Some(m)) => {
if let Some(id) = m.value_of("ID") {
- let res = client
- .group_members()
+ let res = zotapi::group_members()
.by_group_id(u64::from_str(id).unwrap())
- .fetch()
+ .fetch(&client)
.unwrap();
if m.is_present("raw") {
@@ -106,7 +105,10 @@ fn main() {
zot::group::list_members(&res);
}
} else if let Some(gname) = m.value_of("GNAME") {
- let res = client.group_members().by_group_name(gname).fetch().unwrap();
+ let res = zotapi::group_members()
+ .by_group_name(gname)
+ .fetch(&client)
+ .unwrap();
if m.is_present("raw") {
println!("{}", res);
@@ -114,7 +116,7 @@ fn main() {
zot::group::list_members(&res);
}
} else {
- let res = client.group().fetch().unwrap();
+ let res = zotapi::group().fetch(&client).unwrap();
if m.is_present("raw") {
println!("{}", res);