aboutsummaryrefslogtreecommitdiffstats
path: root/examples/zot
diff options
context:
space:
mode:
authorYour Name <you@example.com>2020-05-02 12:11:57 +0200
committerYour Name <you@example.com>2020-05-02 12:11:57 +0200
commitf38b1cf6c5c37ea41d720a76dc928c25e7437546 (patch)
treeb57ee11eaecee214d30544c4b62ebd61a10158c0 /examples/zot
parent73f4ff61c4d3dc8c70d048c71bb23651c460c107 (diff)
downloadrust-zotapi-f38b1cf6c5c37ea41d720a76dc928c25e7437546.tar.gz
rust-zotapi-f38b1cf6c5c37ea41d720a76dc928c25e7437546.tar.bz2
rust-zotapi-f38b1cf6c5c37ea41d720a76dc928c25e7437546.zip
xchan: update internal api and parse results into struct.
Diffstat (limited to 'examples/zot')
-rw-r--r--examples/zot/xchan.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/zot/xchan.rs b/examples/zot/xchan.rs
index 2995d0b..088d49c 100644
--- a/examples/zot/xchan.rs
+++ b/examples/zot/xchan.rs
@@ -25,14 +25,14 @@ pub enum Type {
pub fn fetch(client: &zotapi::Client, _raw: bool, t: Type, id: &str) {
let res = match t {
- 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),
+ 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),
};
match res {
Ok(payload) => {
- println!("{}", payload);
+ println!("{:?}", payload);
}
Err(e) => {
println!("{:?}", e);