From 298806448db4a4e74306ec648bfc0e43a76c6bc3 Mon Sep 17 00:00:00 2001 From: David Blajda Date: Thu, 20 Dec 2018 23:42:45 +0000 Subject: Split auth and unauth client and created ClientTrait --- src/lib.rs | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 70f03dd..e18f243 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,35 +1,19 @@ #![recursion_limit="128"] #![feature(option_replace)] -#![feature(associated_type_defaults)] extern crate futures; extern crate reqwest; extern crate serde; extern crate chrono; #[macro_use] extern crate serde_derive; +use reqwest::r#async::Client as ReqwestClient; + pub mod helix; pub mod kraken; pub mod types; pub mod error; pub mod sync; - +pub mod namespace; pub use self::helix::Client as HelixClient; pub use self::kraken::Client as KrakenClient; - -use reqwest::r#async::Client as ReqwestClient; - -pub struct Client { - pub helix: HelixClient, - pub kraken: KrakenClient, -} - -impl Client { - pub fn new(client_id: &str) -> Client { - let client = ReqwestClient::new(); - Client { - helix: HelixClient::new_with_client(client_id, client.clone()), - kraken: KrakenClient::new_with_client(client_id, client.clone()), - } - } -} -- cgit v1.2.3