diff options
author | Your Name <you@example.com> | 2020-05-03 20:06:12 +0200 |
---|---|---|
committer | Your Name <you@example.com> | 2020-05-03 20:06:12 +0200 |
commit | a3d33d3e680f19c0d61911d64d9e4c30a07f55ab (patch) | |
tree | bfd791d4c0ec9430511a2431d1f04c969f552442 /examples/zot/abconfig.rs | |
parent | eb917c35008d32b3b27bf132b5f831f05888be54 (diff) | |
download | rust-zotapi-a3d33d3e680f19c0d61911d64d9e4c30a07f55ab.tar.gz rust-zotapi-a3d33d3e680f19c0d61911d64d9e4c30a07f55ab.tar.bz2 rust-zotapi-a3d33d3e680f19c0d61911d64d9e4c30a07f55ab.zip |
Promote example app to proper command line client.
Diffstat (limited to 'examples/zot/abconfig.rs')
-rw-r--r-- | examples/zot/abconfig.rs | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/examples/zot/abconfig.rs b/examples/zot/abconfig.rs deleted file mode 100644 index 2e357e4..0000000 --- a/examples/zot/abconfig.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* Example Zot API command line utility, part of zotapi. - * Copyright (C) 2018 Harald Eilertsen <haraldei@anduin.net> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -use zotapi; - -pub fn fetch(client: &zotapi::Client) { - match zotapi::ABConfig::z().fetch(&client) { - Ok(v) => { - println!("Id: Chan: Cat: Key: Val: xchan:"); - for entry in v { - println!("{:6} {:6} {:15} {:15} {:4} {}", - entry.id, - entry.chan, - entry.cat, - entry.k, - entry.v, - entry.xchan); - } - } - Err(e) => { - println!("{:?}", e); - } - } -} |