aboutsummaryrefslogtreecommitdiffstats
path: root/examples/zotcli.rs
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2019-06-09 21:49:11 +0200
committerHarald Eilertsen <haraldei@anduin.net>2019-06-09 21:49:11 +0200
commit051e884f55162498bae05e796b431e9122313c11 (patch)
tree34d33305d8eac20e0a41bb2b25bf9e8eceb6671f /examples/zotcli.rs
parent8f352330d2189c0f6065812c7f3dbdab2e6d3c9e (diff)
downloadrust-zotapi-051e884f55162498bae05e796b431e9122313c11.tar.gz
rust-zotapi-051e884f55162498bae05e796b431e9122313c11.tar.bz2
rust-zotapi-051e884f55162498bae05e796b431e9122313c11.zip
zotcli can now post messages with titles.
Diffstat (limited to 'examples/zotcli.rs')
-rw-r--r--examples/zotcli.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/zotcli.rs b/examples/zotcli.rs
index 565d3ff..986dc85 100644
--- a/examples/zotcli.rs
+++ b/examples/zotcli.rs
@@ -64,6 +64,7 @@ fn main() {
(@subcommand post =>
(about: "Post a new message")
(@arg BODY: +required "Body of the message")
+ (@arg TITLE: --title +takes_value "Set a title for the message")
)
)
.get_matches();
@@ -101,8 +102,7 @@ fn main() {
zot::xchan::fetch(&client, raw, t, m.value_of("ID").unwrap());
},
("post", Some(m)) => {
- let body = m.value_of("BODY").unwrap();
- zot::item::post(&client, body);
+ zot::item::post(&client, m);
},
_ => {
println!("{}", matches.usage());