aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/zot/item.rs6
-rw-r--r--examples/zotcli.rs1
2 files changed, 7 insertions, 0 deletions
diff --git a/examples/zot/item.rs b/examples/zot/item.rs
index eb9013f..e848af2 100644
--- a/examples/zot/item.rs
+++ b/examples/zot/item.rs
@@ -30,6 +30,12 @@ pub fn post(client: &zotapi::Client, args: &ArgMatches) {
msg.file(file);
}
+ if let Some(groups) = dbg!(args.value_of("GROUP")) {
+ for g in groups.split(",") {
+ msg.group_allow(g);
+ }
+ }
+
match msg.create() {
Ok(payload) => {
println!("Raw payload: {}", payload);
diff --git a/examples/zotcli.rs b/examples/zotcli.rs
index 0925a1f..2b068e0 100644
--- a/examples/zotcli.rs
+++ b/examples/zotcli.rs
@@ -75,6 +75,7 @@ fn main() {
(@arg BODY: +required "Body of the message")
(@arg TITLE: --title +takes_value "Set a title for the message")
(@arg ATTACH: --attach [FILE] "Attach a file or image to the post")
+ (@arg GROUP: --group [groups] "Limit distribution to the specified group(s) separated by comma")
)
)
.get_matches();