diff options
author | David Blajda <blajda@hotmail.com> | 2019-05-08 15:38:37 +0000 |
---|---|---|
committer | David Blajda <blajda@hotmail.com> | 2019-05-08 15:38:37 +0000 |
commit | 98fb79b85e3cfbb547e5340b30623511daf09ef5 (patch) | |
tree | a03bd7a95c86a92eb7510409429f50433056d7ab /src/helix/namespaces/clips.rs | |
parent | 0e09c2c06fc0b81f11d12985a4172c815233db17 (diff) |
:WIP: Move types to a different crate
Diffstat (limited to 'src/helix/namespaces/clips.rs')
-rw-r--r-- | src/helix/namespaces/clips.rs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/helix/namespaces/clips.rs b/src/helix/namespaces/clips.rs deleted file mode 100644 index c4595ce..0000000 --- a/src/helix/namespaces/clips.rs +++ /dev/null @@ -1,32 +0,0 @@ -use super::*; -use super::models::{DataContainer, Clip}; - -pub struct Clips {} -type ClipsNamespace = Namespace<Clips>; - -impl ClipsNamespace { - pub fn clip<S: ToString>(self, id: &S) -> ApiRequest<DataContainer<Clip>> { - use self::clip; - clip(self.client, id) - } -} - -impl Client { - pub fn clips(&self) -> ClipsNamespace { - ClipsNamespace::new(self) - } -} - - -pub fn clip<S: ToString>(client: Client, id: &S) - -> ApiRequest<DataContainer<Clip>> -{ - let client = client.inner; - let url = - String::from("https://") + - client.domain() + "/helix/clips" + "?id=" + &id.to_string(); - - let params : ParamList = BTreeMap::new(); - - ApiRequest::new(url, params, client, Method::GET, Some(RatelimitKey::Default)) -} |