summaryrefslogtreecommitdiff
path: root/src/helix/namespaces/auth.rs
diff options
context:
space:
mode:
authorDavid Blajda <blajda@hotmail.com>2018-12-27 04:46:10 +0000
committerDavid Blajda <blajda@hotmail.com>2018-12-27 04:46:10 +0000
commitcb1b144e48ee357a76f551433d4886f092d259c8 (patch)
tree15606dc621e4d68f3bf3e9d27a44e6fd02a00fc5 /src/helix/namespaces/auth.rs
parent2e08d0c8abbfb9f989c61acb4f6c580719a65b42 (diff)
Use a generic client for both helix and kraken
Diffstat (limited to 'src/helix/namespaces/auth.rs')
-rw-r--r--src/helix/namespaces/auth.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/helix/namespaces/auth.rs b/src/helix/namespaces/auth.rs
index 478c1af..1ad5c57 100644
--- a/src/helix/namespaces/auth.rs
+++ b/src/helix/namespaces/auth.rs
@@ -1,9 +1,10 @@
use std::collections::BTreeMap;
-use super::super::models::Credentials;
+use crate::helix::models::Credentials;
use super::super::Client;
const ID_DOMAIN: &'static str = "id.twitch.tv";
use super::Namespace;
-use super::super::ClientTrait;
+use crate::client::{ClientTrait, ApiRequest};
+use reqwest::Method;
pub struct Auth {}
type AuthNamespace = Namespace<Auth>;
@@ -22,13 +23,11 @@ impl Client {
}
}
-use super::super::ApiRequest;
-use reqwest::Method;
-
//TODO: Implement scopes
pub fn client_credentials(client: Client, secret: &str)
-> ApiRequest<Credentials> {
+ let client = client.inner;
let url =
String::from("https://") +
ID_DOMAIN + "/oauth2/token";