diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 1 | ||||
-rw-r--r-- | src/models.rs | 16 |
2 files changed, 11 insertions, 6 deletions
@@ -1,6 +1,7 @@ extern crate futures; extern crate reqwest; extern crate serde; +extern crate chrono; #[macro_use] extern crate serde_derive; diff --git a/src/models.rs b/src/models.rs index 6aec705..52c4781 100644 --- a/src/models.rs +++ b/src/models.rs @@ -1,4 +1,8 @@ extern crate serde_json; +extern crate chrono; + +use chrono::{Duration, DateTime, Utc}; + #[derive(Debug, Deserialize)] pub struct DataContainer<T> { @@ -28,14 +32,14 @@ pub struct Video { pub published_at: String, //Should be converted to a URL pub url: String, - thumbnail_url: String, - viewable: String, - view_count: i32, - language: String, + pub thumbnail_url: String, + pub viewable: String, + pub view_count: i32, + pub language: String, #[serde(rename = "type")] - video_type: String, + pub video_type: String, //Should be converted to a Duration - duration: String, + pub duration: String, } #[derive(Debug, Deserialize)] |