aboutsummaryrefslogtreecommitdiffstats
path: root/examples/zot/xchan.rs
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2020-01-03 23:32:44 +0100
committerHarald Eilertsen <haraldei@anduin.net>2020-01-03 23:32:44 +0100
commit0c76f0c9727a512475e29b5d099b5b7188f72052 (patch)
treed1c2b59458c62116447fa2d885113afe6a5378da /examples/zot/xchan.rs
parent5f96d9981a6d041f5c8a464cda10a0dc371060f8 (diff)
downloadrust-zotapi-0c76f0c9727a512475e29b5d099b5b7188f72052.tar.gz
rust-zotapi-0c76f0c9727a512475e29b5d099b5b7188f72052.tar.bz2
rust-zotapi-0c76f0c9727a512475e29b5d099b5b7188f72052.zip
Move Client out of the api objects.
Also make constructor functions in the zotapi namespace.
Diffstat (limited to 'examples/zot/xchan.rs')
-rw-r--r--examples/zot/xchan.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/zot/xchan.rs b/examples/zot/xchan.rs
index d2d73d0..2995d0b 100644
--- a/examples/zot/xchan.rs
+++ b/examples/zot/xchan.rs
@@ -25,9 +25,9 @@ pub enum Type {
pub fn fetch(client: &zotapi::Client, _raw: bool, t: Type, id: &str) {
let res = match t {
- Type::Addr => client.xchan().by_address(&id).fetch(),
- Type::Hash => client.xchan().by_hash(&id).fetch(),
- Type::GUID => client.xchan().by_guid(&id).fetch(),
+ Type::Addr => zotapi::xchan().by_address(&id).fetch(&client),
+ Type::Hash => zotapi::xchan().by_hash(&id).fetch(&client),
+ Type::GUID => zotapi::xchan().by_guid(&id).fetch(&client),
};
match res {