summaryrefslogtreecommitdiff
path: root/src/models.rs
diff options
context:
space:
mode:
authorDavid Blajda <blajda@hotmail.com>2018-12-11 19:42:09 +0000
committerDavid Blajda <blajda@hotmail.com>2018-12-11 19:42:09 +0000
commit0e41bde5b8fca4451e7e39f9fdd4636f408850bb (patch)
tree2007b111ded4c5a1a831fd7c5aeb0d85c3e96c4c /src/models.rs
parent7e60a4edcef897c3810fb4ae0564228fe853bf00 (diff)
Make all fields public
Diffstat (limited to 'src/models.rs')
-rw-r--r--src/models.rs16
1 files changed, 10 insertions, 6 deletions
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)]