blob: c4595ce1a56547b28cde0487bf43dd80210acdb9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
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))
}
|