upload_video/
upload_video.rs1use youtube_rs::*;
2fn main() {
3 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 let opt = client.create_upload_options(options).unwrap();
16 client.upload_request(opt).expect("Could not upload");
17}