aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2023-03-27 22:14:15 +0200
committerHarald Eilertsen <haraldei@anduin.net>2023-03-27 22:14:15 +0200
commitfe9db878e8f7d8f4bff2a51bb49b66ff84013644 (patch)
tree60d040e1f61d5c00e86389578b15a536a212aa43 /src/bin
parent93ee81f05e1cb90c79949d5c57b1d7e3c272dd02 (diff)
downloadrust-zotapi-fe9db878e8f7d8f4bff2a51bb49b66ff84013644.tar.gz
rust-zotapi-fe9db878e8f7d8f4bff2a51bb49b66ff84013644.tar.bz2
rust-zotapi-fe9db878e8f7d8f4bff2a51bb49b66ff84013644.zip
Add ZotAPI trait and derive macro.
The idea is to try to generate more of the boilerplate code, but for now we only do the `z()` method definition. There are also some we're not quite able to replace yet (like XChanRequest) since it also has life times. It's a start anyways :)
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/zot/main.rs1
-rw-r--r--src/bin/zot/zot/abconfig.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/zot/main.rs b/src/bin/zot/main.rs
index 70a7984..bf7b9b8 100644
--- a/src/bin/zot/main.rs
+++ b/src/bin/zot/main.rs
@@ -19,6 +19,7 @@ use clap::{clap_app, crate_authors, crate_version};
use dotenv::dotenv;
use std::env;
use std::str::FromStr;
+use zotapi::ZotAPI;
mod zot;
diff --git a/src/bin/zot/zot/abconfig.rs b/src/bin/zot/zot/abconfig.rs
index 14875c8..1d67a54 100644
--- a/src/bin/zot/zot/abconfig.rs
+++ b/src/bin/zot/zot/abconfig.rs
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-use zotapi;
+use zotapi::{self, ZotAPI};
pub async fn fetch(client: &zotapi::Client) {
match zotapi::ABConfig::z().fetch(&client).await {