aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/zot/zot
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/zot/zot')
-rw-r--r--src/bin/zot/zot/abconfig.rs4
-rw-r--r--src/bin/zot/zot/abook.rs4
-rw-r--r--src/bin/zot/zot/channel_stream.rs4
-rw-r--r--src/bin/zot/zot/item.rs4
-rw-r--r--src/bin/zot/zot/network_stream.rs4
-rw-r--r--src/bin/zot/zot/xchan.rs8
6 files changed, 14 insertions, 14 deletions
diff --git a/src/bin/zot/zot/abconfig.rs b/src/bin/zot/zot/abconfig.rs
index 2e357e4..14875c8 100644
--- a/src/bin/zot/zot/abconfig.rs
+++ b/src/bin/zot/zot/abconfig.rs
@@ -17,8 +17,8 @@
use zotapi;
-pub fn fetch(client: &zotapi::Client) {
- match zotapi::ABConfig::z().fetch(&client) {
+pub async fn fetch(client: &zotapi::Client) {
+ match zotapi::ABConfig::z().fetch(&client).await {
Ok(v) => {
println!("Id: Chan: Cat: Key: Val: xchan:");
for entry in v {
diff --git a/src/bin/zot/zot/abook.rs b/src/bin/zot/zot/abook.rs
index 97025c3..6c33757 100644
--- a/src/bin/zot/zot/abook.rs
+++ b/src/bin/zot/zot/abook.rs
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-pub fn fetch(client: &zotapi::Client, _raw: bool) {
- match zotapi::Abook::z().fetch(&client) {
+pub async fn fetch(client: &zotapi::Client, _raw: bool) {
+ match zotapi::Abook::z().fetch(&client).await {
Ok(abooks) => {
for b in abooks {
println!("{:?}", b);
diff --git a/src/bin/zot/zot/channel_stream.rs b/src/bin/zot/zot/channel_stream.rs
index 33ad7cf..68a5402 100644
--- a/src/bin/zot/zot/channel_stream.rs
+++ b/src/bin/zot/zot/channel_stream.rs
@@ -20,8 +20,8 @@ use zotapi;
use serde_json;
use std::iter::Iterator;
-pub fn fetch(client: &zotapi::Client, raw: bool) {
- match zotapi::channel_stream().fetch(&client) {
+pub async fn fetch(client: &zotapi::Client, raw: bool) {
+ match zotapi::channel_stream().fetch(&client).await {
Ok(payload) => {
if raw {
println!("{}", payload);
diff --git a/src/bin/zot/zot/item.rs b/src/bin/zot/zot/item.rs
index 648a9f0..dbb39ba 100644
--- a/src/bin/zot/zot/item.rs
+++ b/src/bin/zot/zot/item.rs
@@ -18,7 +18,7 @@
use clap::ArgMatches;
use zotapi;
-pub fn post(client: &zotapi::Client, args: &ArgMatches) {
+pub async fn post(client: &zotapi::Client, args: &ArgMatches<'_>) {
let mut msg = zotapi::item();
let body: String;
@@ -42,7 +42,7 @@ pub fn post(client: &zotapi::Client, args: &ArgMatches) {
}
}
- match msg.create(&client) {
+ match msg.create(&client).await {
Ok(res) => {
if res.success {
println!("New item with id {} posted successfully!", res.item_id);
diff --git a/src/bin/zot/zot/network_stream.rs b/src/bin/zot/zot/network_stream.rs
index 0e6edb4..a5a7142 100644
--- a/src/bin/zot/zot/network_stream.rs
+++ b/src/bin/zot/zot/network_stream.rs
@@ -20,8 +20,8 @@ use zotapi;
use serde_json;
use std::iter::Iterator;
-pub fn fetch(client: &zotapi::Client, raw: bool) {
- match zotapi::network_stream().fetch(&client) {
+pub async fn fetch(client: &zotapi::Client, raw: bool) {
+ match zotapi::network_stream().fetch(&client).await {
Ok(payload) => {
if raw {
println!("{}", payload);
diff --git a/src/bin/zot/zot/xchan.rs b/src/bin/zot/zot/xchan.rs
index 088d49c..146b2ab 100644
--- a/src/bin/zot/zot/xchan.rs
+++ b/src/bin/zot/zot/xchan.rs
@@ -23,11 +23,11 @@ pub enum Type {
GUID,
}
-pub fn fetch(client: &zotapi::Client, _raw: bool, t: Type, id: &str) {
+pub async fn fetch(client: &zotapi::Client, _raw: bool, t: Type, id: &str) {
let res = match t {
- Type::Addr => zotapi::XChan::z().by_address(&id).fetch(&client),
- Type::Hash => zotapi::XChan::z().by_hash(&id).fetch(&client),
- Type::GUID => zotapi::XChan::z().by_guid(&id).fetch(&client),
+ Type::Addr => zotapi::XChan::z().by_address(&id).fetch(&client).await,
+ Type::Hash => zotapi::XChan::z().by_hash(&id).fetch(&client).await,
+ Type::GUID => zotapi::XChan::z().by_guid(&id).fetch(&client).await,
};
match res {