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/helix/namespaces/clips.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/helix/namespaces/clips.rs') diff --git a/src/helix/namespaces/clips.rs b/src/helix/namespaces/clips.rs index 083e5c4..19293cc 100644 --- a/src/helix/namespaces/clips.rs +++ b/src/helix/namespaces/clips.rs @@ -1,9 +1,10 @@ -use futures::future::Future; use std::collections::BTreeMap; use super::super::models::{DataContainer, PaginationContainer, User, Video, Clip}; use super::super::Client; +use super::super::ClientTrait; +use super::super::RatelimitKey; const API_DOMAIN: &'static str = "api.twitch.tv"; -use super::super::Namespace; +use super::Namespace; pub struct Clips {} type ClipsNamespace = Namespace; @@ -30,10 +31,9 @@ pub fn clip(client: Client, id: &str) { let url = String::from("https://") + - API_DOMAIN + "/helix/clips" + "?id=" + id; + client.domain() + "/helix/clips" + "?id=" + id; let params = BTreeMap::new(); - let limit = client.default_ratelimit(); - ApiRequest::new(url, params, client, Method::GET, Some(limit)) + ApiRequest::new(url, params, client, Method::GET, Some(RatelimitKey::Default)) } -- cgit v1.2.3