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 videostreams: Vec<Stream>,
    pub audiostreams: 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

The 11-character video id

The title of the video

The rating of the video (0-5)

The viewcount of the video

The author of the video

The duration of the streams in seconds

The url of the video’s thumbnail image

The number of likes received for the video

The number of dislikes received for the video

The commentcount of the video

The video description text

The available streams (containing both video and audio)

The available only-video streams

The available only-audio streams

The url of the video’s medium size thumbnail image

The url of the video’s large size thumbnail image

The url of the video’s extra large thumbnail image

The url of the video’s native thumbnail image

The upload date of the video

The category ID of the video

Methods

impl Rafy
[src]

[src]

Create a Rafy object using the Rafy::new() function, giving YouTube URL as the argument.

Examples

extern crate rafy;
use rafy::Rafy;

fn main() {
    let content = Rafy::new("https://www.youtube.com/watch?v=DjMkfARvGE8");
}

Trait Implementations

impl Debug for Rafy
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for Rafy
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Rafy

impl Sync for Rafy