Struct rafy::Rafy
[−]
[src]
pub struct Rafy { pub videoid: String, pub title: String, pub rating: String, pub viewcount: u32, pub author: String, pub length: u32, pub thumbdefault: String, pub likes: u32, pub dislikes: u32, pub commentcount: u32, pub description: String, pub streams: Vec<Stream>, pub thumbmedium: String, pub thumbhigh: String, pub thumbstandard: String, pub thumbmaxres: String, pub published: String, pub category: u32, }
Once you have created a Rafy object using Rafy::new()
, several data attributes are available.
Examples
extern crate rafy; use rafy::Rafy; fn main() { let content = Rafy::new("https://www.youtube.com/watch?v=DjMkfARvGE8").unwrap(); println!("{}", content.title); println!("{}", content.viewcount); }
Fields
videoid: String
The 11-character video id
title: String
The title of the video
rating: String
The rating of the video (0-5)
viewcount: u32
The viewcount of the video
The author of the video
length: u32
The duration of the streams in seconds
thumbdefault: String
The url of the video’s thumbnail image
likes: u32
The number of likes received for the video
dislikes: u32
The number of dislikes received for the video
commentcount: u32
The commentcount of the video
description: String
The video description text
streams: Vec<Stream>
The available streams
thumbmedium: String
The url of the video’s medium size thumbnail image
thumbhigh: String
The url of the video’s large size thumbnail image
thumbstandard: String
The url of the video’s extra large thumbnail image
thumbmaxres: String
The url of the video’s native thumbnail image
published: String
The upload date of the video
category: u32
The category ID of the video