diff options
author | David Blajda <blajda@hotmail.com> | 2018-12-20 23:42:45 +0000 |
---|---|---|
committer | David Blajda <blajda@hotmail.com> | 2018-12-20 23:42:45 +0000 |
commit | 298806448db4a4e74306ec648bfc0e43a76c6bc3 (patch) | |
tree | 1cdd90df0d65a513ad94588dae7621b03a906b3e /src/lib.rs | |
parent | 2bae9a4e8d8b77f8a99df6829547a60f883632a3 (diff) |
Split auth and unauth client and created ClientTrait
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 22 |
1 files changed, 3 insertions, 19 deletions
@@ -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()), - } - } -} |