From 8615cc2f030240ba2982dba893fe63f11a0c8a88 Mon Sep 17 00:00:00 2001 From: David Blajda Date: Thu, 13 Dec 2018 20:56:55 +0000 Subject: Restructure project and included kraken endpoint --- src/models.rs | 76 ----------------------------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 src/models.rs (limited to 'src/models.rs') diff --git a/src/models.rs b/src/models.rs deleted file mode 100644 index 2b01e7c..0000000 --- a/src/models.rs +++ /dev/null @@ -1,76 +0,0 @@ -extern crate serde_json; -extern crate chrono; - -use chrono::{Duration, DateTime, Utc}; - - -#[derive(Debug, Deserialize)] -pub struct DataContainer { - pub data: Vec -} - -#[derive(Debug, Deserialize)] -pub struct Cursor { - cursor: String -} - -#[derive(Debug, Deserialize)] -pub struct PaginationContainer { - pub data: Vec, - pub pagination: Option -} - -#[derive(Debug, Deserialize)] -pub struct Video { - pub id: String, - pub user_id: String, - pub user_name: String, - pub title: String, - pub description: String, - //Should be converted to a DateTime - pub created_at: String, - pub published_at: String, - //Should be converted to a URL - pub url: String, - pub thumbnail_url: String, - pub viewable: String, - pub view_count: i32, - pub language: String, - #[serde(rename = "type")] - pub video_type: String, - //Should be converted to a Duration - pub duration: String, -} - -#[derive(Debug, Deserialize)] -pub struct User { - pub id: String, - pub login: String, - pub display_name: String, - #[serde(rename = "type")] - pub user_type: String, - pub broadcaster_type: String, - pub description: String, - pub profile_image_url: String, - pub offline_image_url: String, - pub view_count: u32, - pub email: Option, -} - -#[derive(Debug, Deserialize)] -pub struct Clip { - pub id: String, - pub url: String, - pub embed_url: String, - pub broadcaster_id: String, - pub broadcaster_name: String, - pub creator_id: String, - pub creator_name: String, - pub video_id: String, - pub game_id: String, - pub language: String, - pub title: String, - pub created_at: String, - pub thumbnail_url: String, - pub view_count: i32, -} -- cgit v1.2.3