upload_video/
upload_video.rs

1use youtube_rs::*;
2fn main() {
3    // Put your own youtube secret file here
4    let client = YTClient::from_secret_path("./secret.json").unwrap();
5    let options = VideoData {
6        title: "test video",
7        desc: "cool description",
8        keywords: Some("test,cool"),
9        category:video::CategoryID::SciTech as u32,
10        privacy_status: video::PrivacyStatus::Private,
11        file: "./test.mp4",
12        for_kids:false
13    };
14    // Creates the settings for the video
15    let opt = client.create_upload_options(options).unwrap();
16    client.upload_request(opt).expect("Could not upload");
17}