summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs1
-rw-r--r--src/models.rs16
2 files changed, 11 insertions, 6 deletions
diff --git a/src/lib.rs b/src/lib.rs
index f0a01b9..37c89ca 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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)]