From 0a5892c67fb02e09a621ac8796ac84232935f5c3 Mon Sep 17 00:00:00 2001 From: David Blajda Date: Wed, 30 Jan 2019 20:34:54 +0000 Subject: Use ToString for endpoint params --- src/helix/namespaces/clips.rs | 9 ++++----- 1 file changed, 4 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 1de2e33..c4595ce 100644 --- a/src/helix/namespaces/clips.rs +++ b/src/helix/namespaces/clips.rs @@ -1,12 +1,11 @@ use super::*; use super::models::{DataContainer, Clip}; -use crate::types::ClipId; pub struct Clips {} type ClipsNamespace = Namespace; impl ClipsNamespace { - pub fn clip(self, id: &ClipId) -> ApiRequest> { + pub fn clip(self, id: &S) -> ApiRequest> { use self::clip; clip(self.client, id) } @@ -19,15 +18,15 @@ impl Client { } -pub fn clip(client: Client, id: &ClipId) +pub fn clip(client: Client, id: &S) -> ApiRequest> { let client = client.inner; let url = String::from("https://") + - client.domain() + "/helix/clips" + "?id=" + id.as_ref(); + client.domain() + "/helix/clips" + "?id=" + &id.to_string(); - let params = BTreeMap::new(); + let params : ParamList = BTreeMap::new(); ApiRequest::new(url, params, client, Method::GET, Some(RatelimitKey::Default)) } -- cgit v1.2.3