Files
google-apis-rs/gen/youtube3-cli/src/main.rs
Sebastian Thiel 9a8ae4b7d6 fix(clap): upload some code to help debugging
We get a stack-overflow when trying to run the dfa-reporting program,
and right now I don't know how to workaround it.

This could be preventing us from using clap.
2015-04-29 09:07:14 +02:00

1632 lines
97 KiB
Rust

// DO NOT EDIT !
// This file was generated automatically from 'src/mako/cli/main.rs.mako'
// DO NOT EDIT !
#![feature(plugin, exit_status)]
#![allow(unused_variables, unused_imports, dead_code, unused_mut)]
extern crate clap;
extern crate yup_oauth2 as oauth2;
extern crate yup_hyper_mock as mock;
extern crate rustc_serialize;
extern crate serde;
extern crate hyper;
extern crate mime;
extern crate google_youtube3 as api;
use std::env;
use std::io::{self, Write};
use clap::{App, SubCommand, Arg};
fn main() {
let matches =
App::new("youtube3")
.author("Sebastian Thiel <byronimo@gmail.com>")
.version("0.2.0")
.about("Programmatic access to YouTube features.")
.after_help("All documentation details can be found athttp://byron.github.io/google-apis-rs/google_youtube3_cli/index.html")
.arg(Arg::with_name("url")
.long("scope")
.help("Specify the authentication a method should be executed in. Each scope requires the user to grant this application permission to use it.If unset, it defaults to the shortest scope url for a particular method.")
.takes_value(true))
.arg(Arg::with_name("folder")
.long("config-dir")
.help("A directory into which we will store our persistent data. Defaults to a user-writable directory that we will create during the first invocation.[default: ${CONFIG_DIR}]")
.takes_value(true))
.arg(Arg::with_name("debug")
.long("debug")
.help("Output all server communication to standard error. `tx` and `rx` are placed into the same stream.")
.takes_value(false))
.arg(Arg::with_name("debug-auth")
.long("debug-auth")
.help("Output all communication related to authentication to standard error. `tx` and `rx` are placed into the same stream.")
.takes_value(false))
.subcommand(
SubCommand::new("activities")
.subcommand(
SubCommand::new("insert")
.about("Posts a bulletin for a specific channel. (The user submitting the request must be authorized to act on the channel's behalf.)
Note: Even though an activity resource can contain information about actions like a user rating a video or marking a video as a favorite, you need to use other API methods to generate those activity resources. For example, you would use the API's videos.rate() method to rate a video and the playlistItems.insert() method to mark a video as a favorite.")
.after_help("Posts a bulletin for a specific channel. (The user submitting the request must be authorized to act on the channel's behalf.)
Note: Even though an activity resource can contain information about actions like a user rating a video or marking a video as a favorite, you need to use other API methods to generate those activity resources. For example, you would use the API's videos.rate() method to rate a video and the playlistItems.insert() method to mark a video as a favorite.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("list")
.about("Returns a list of channel activity events that match the request criteria. For example, you can retrieve events associated with a particular channel, events associated with the user's subscriptions and Google+ friends, or the YouTube home page feed, which is customized for each user.")
.after_help("Returns a list of channel activity events that match the request criteria. For example, you can retrieve events associated with a particular channel, events associated with the user's subscriptions and Google+ friends, or the YouTube home page feed, which is customized for each user.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more activity resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails.
If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a activity resource, the snippet property contains other properties that identify the type of activity, a display title for the activity, and so forth. If you set part=snippet, the API response will also contain all of those nested properties.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("captions")
.subcommand(
SubCommand::new("delete")
.about("Deletes a specified caption track.")
.after_help("Deletes a specified caption track.")
.arg(
Arg::with_name("id")
.help("The id parameter identifies the caption track that is being deleted. The value is a caption track ID as identified by the id property in a caption resource.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
.subcommand(
SubCommand::new("download")
.about("Downloads a caption track. The caption track is returned in its original format unless the request specifies a value for the tfmt parameter and in its original language unless the request specifies a value for the tlang parameter.")
.after_help("Downloads a caption track. The caption track is returned in its original format unless the request specifies a value for the tfmt parameter and in its original language unless the request specifies a value for the tlang parameter.")
.arg(
Arg::with_name("id")
.help("The id parameter identifies the caption track that is being retrieved. The value is a caption track ID as identified by the id property in a caption resource.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("insert")
.about("Uploads a caption track.")
.after_help("Uploads a caption track.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("mode")
.short("u")
.help("Specify which file to upload")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("list")
.about("Returns a list of caption tracks that are associated with a specified video. Note that the API response does not contain the actual captions and that the captions.download method provides the ability to retrieve a caption track.")
.after_help("Returns a list of caption tracks that are associated with a specified video. Note that the API response does not contain the actual captions and that the captions.download method provides the ability to retrieve a caption track.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("video-id")
.help("The videoId parameter specifies the YouTube video ID of the video for which the API should return caption tracks.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("update")
.about("Updates a caption track. When updating a caption track, you can change the track's draft status, upload a new caption file for the track, or both.")
.after_help("Updates a caption track. When updating a caption track, you can change the track's draft status, upload a new caption file for the track, or both.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("mode")
.short("u")
.help("Specify which file to upload")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("channel-banners")
.subcommand(
SubCommand::new("insert")
.about("Uploads a channel banner image to YouTube. This method represents the first two steps in a three-step process to update the banner image for a channel:
- Call the channelBanners.insert method to upload the binary image data to YouTube. The image must have a 16:9 aspect ratio and be at least 2120x1192 pixels.
- Extract the url property's value from the response that the API returns for step 1.
- Call the channels.update method to update the channel's branding settings. Set the brandingSettings.image.bannerExternalUrl property's value to the URL obtained in step 2.")
.after_help("Uploads a channel banner image to YouTube. This method represents the first two steps in a three-step process to update the banner image for a channel:
- Call the channelBanners.insert method to upload the binary image data to YouTube. The image must have a 16:9 aspect ratio and be at least 2120x1192 pixels.
- Extract the url property's value from the response that the API returns for step 1.
- Call the channels.update method to update the channel's branding settings. Set the brandingSettings.image.bannerExternalUrl property's value to the URL obtained in step 2.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("mode")
.short("u")
.help("Specify which file to upload")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("channel-sections")
.subcommand(
SubCommand::new("delete")
.about("Deletes a channelSection.")
.after_help("Deletes a channelSection.")
.arg(
Arg::with_name("id")
.help("The id parameter specifies the YouTube channelSection ID for the resource that is being deleted. In a channelSection resource, the id property specifies the YouTube channelSection ID.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
.subcommand(
SubCommand::new("insert")
.about("Adds a channelSection for the authenticated user's channel.")
.after_help("Adds a channelSection for the authenticated user's channel.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("list")
.about("Returns channelSection resources that match the API request criteria.")
.after_help("Returns channelSection resources that match the API request criteria.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more channelSection resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails.
If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channelSection resource, the snippet property contains other properties, such as a display title for the channelSection. If you set part=snippet, the API response will also contain all of those nested properties.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("update")
.about("Update a channelSection.")
.after_help("Update a channelSection.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("channels")
.subcommand(
SubCommand::new("list")
.about("Returns a collection of zero or more channel resources that match the request criteria.")
.after_help("Returns a collection of zero or more channel resources that match the request criteria.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more channel resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, statistics, topicDetails, and invideoPromotion.
If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channel resource, the contentDetails property contains other properties, such as the uploads properties. As such, if you set part=contentDetails, the API response will also contain all of those nested properties.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("update")
.about("Updates a channel's metadata.")
.after_help("Updates a channel's metadata.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("comment-threads")
.subcommand(
SubCommand::new("insert")
.about("Creates a new comment thread and top level comment.")
.after_help("Creates a new comment thread and top level comment.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("list")
.about("Returns a list of comment threads that match the API request parameters.")
.after_help("Returns a list of comment threads that match the API request parameters.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies the commentThread resource parts that the API response will include. Supported values are id, snippet and replies.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("update")
.about("Modifies an existing comment.")
.after_help("Modifies an existing comment.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("comments")
.subcommand(
SubCommand::new("delete")
.about("Deletes a comment.")
.after_help("Deletes a comment.")
.arg(
Arg::with_name("id")
.help("The id parameter specifies the comment ID for the resource that should be deleted.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
.subcommand(
SubCommand::new("insert")
.about("Creates a new comment.
Note: to create a top level comment it is also necessary to create a comment thread. Both are accomplished through the commentThreads resource.")
.after_help("Creates a new comment.
Note: to create a top level comment it is also necessary to create a comment thread. Both are accomplished through the commentThreads resource.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("list")
.about("Returns a list of comments that match the API request parameters.")
.after_help("Returns a list of comments that match the API request parameters.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies the comment resource parts that the API response will include. Supported values are id and snippet.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("mark-as-spam")
.about("Expresses the caller's opinion that a comment is spam.")
.after_help("Expresses the caller's opinion that a comment is spam.")
.arg(
Arg::with_name("id")
.help("The id parameter specifies a comma-separated list of IDs of comments which should get flagged as spam.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
.subcommand(
SubCommand::new("set-moderation-status")
.about("Sets the moderation status of one or more comments.")
.after_help("Sets the moderation status of one or more comments.")
.arg(
Arg::with_name("id")
.help("The id parameter specifies a comma-separated list of IDs of comments whose moderation status should be updated.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("moderation-status")
.help("Determines the new moderation status of the specified comments.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
.subcommand(
SubCommand::new("update")
.about("Modifies an existing comment.")
.after_help("Modifies an existing comment.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("guide-categories")
.subcommand(
SubCommand::new("list")
.about("Returns a list of categories that can be associated with YouTube channels.")
.after_help("Returns a list of categories that can be associated with YouTube channels.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more guideCategory resource properties that the API response will include. The part names that you can include in the parameter value are id and snippet.
If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a guideCategory resource, the snippet property contains other properties, such as the category's title. If you set part=snippet, the API response will also contain all of those nested properties.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("i18n-languages")
.subcommand(
SubCommand::new("list")
.about("Returns a list of supported languages.")
.after_help("Returns a list of supported languages.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more i18nLanguage resource properties that the API response will include. The part names that you can include in the parameter value are id and snippet.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("i18n-regions")
.subcommand(
SubCommand::new("list")
.about("Returns a list of supported regions.")
.after_help("Returns a list of supported regions.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more i18nRegion resource properties that the API response will include. The part names that you can include in the parameter value are id and snippet.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("live-broadcasts")
.subcommand(
SubCommand::new("bind")
.about("Binds a YouTube broadcast to a stream or removes an existing binding between a broadcast and a stream. A broadcast can only be bound to one video stream.")
.after_help("Binds a YouTube broadcast to a stream or removes an existing binding between a broadcast and a stream. A broadcast can only be bound to one video stream.")
.arg(
Arg::with_name("id")
.help("The id parameter specifies the unique ID of the broadcast that is being bound to a video stream.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("control")
.about("Controls the settings for a slate that can be displayed in the broadcast stream.")
.after_help("Controls the settings for a slate that can be displayed in the broadcast stream.")
.arg(
Arg::with_name("id")
.help("The id parameter specifies the YouTube live broadcast ID that uniquely identifies the broadcast in which the slate is being updated.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("delete")
.about("Deletes a broadcast.")
.after_help("Deletes a broadcast.")
.arg(
Arg::with_name("id")
.help("The id parameter specifies the YouTube live broadcast ID for the resource that is being deleted.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
.subcommand(
SubCommand::new("insert")
.about("Creates a broadcast.")
.after_help("Creates a broadcast.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("list")
.about("Returns a list of YouTube broadcasts that match the API request parameters.")
.after_help("Returns a list of YouTube broadcasts that match the API request parameters.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("transition")
.about("Changes the status of a YouTube live broadcast and initiates any processes associated with the new status. For example, when you transition a broadcast's status to testing, YouTube starts to transmit video to that broadcast's monitor stream. Before calling this method, you should confirm that the value of the status.streamStatus property for the stream bound to your broadcast is active.")
.after_help("Changes the status of a YouTube live broadcast and initiates any processes associated with the new status. For example, when you transition a broadcast's status to testing, YouTube starts to transmit video to that broadcast's monitor stream. Before calling this method, you should confirm that the value of the status.streamStatus property for the stream bound to your broadcast is active.")
.arg(
Arg::with_name("broadcast-status")
.help("The broadcastStatus parameter identifies the state to which the broadcast is changing. Note that to transition a broadcast to either the testing or live state, the status.streamStatus must be active for the stream that the broadcast is bound to.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("id")
.help("The id parameter specifies the unique ID of the broadcast that is transitioning to another status.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("update")
.about("Updates a broadcast. For example, you could modify the broadcast settings defined in the liveBroadcast resource's contentDetails object.")
.after_help("Updates a broadcast. For example, you could modify the broadcast settings defined in the liveBroadcast resource's contentDetails object.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("live-streams")
.subcommand(
SubCommand::new("delete")
.about("Deletes a video stream.")
.after_help("Deletes a video stream.")
.arg(
Arg::with_name("id")
.help("The id parameter specifies the YouTube live stream ID for the resource that is being deleted.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
.subcommand(
SubCommand::new("insert")
.about("Creates a video stream. The stream enables you to send your video to YouTube, which can then broadcast the video to your audience.")
.after_help("Creates a video stream. The stream enables you to send your video to YouTube, which can then broadcast the video to your audience.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("list")
.about("Returns a list of video streams that match the API request parameters.")
.after_help("Returns a list of video streams that match the API request parameters.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more liveStream resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, cdn, and status.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("update")
.about("Updates a video stream. If the properties that you want to change cannot be updated, then you need to create a new stream with the proper settings.")
.after_help("Updates a video stream. If the properties that you want to change cannot be updated, then you need to create a new stream with the proper settings.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("playlist-items")
.subcommand(
SubCommand::new("delete")
.about("Deletes a playlist item.")
.after_help("Deletes a playlist item.")
.arg(
Arg::with_name("id")
.help("The id parameter specifies the YouTube playlist item ID for the playlist item that is being deleted. In a playlistItem resource, the id property specifies the playlist item's ID.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
.subcommand(
SubCommand::new("insert")
.about("Adds a resource to a playlist.")
.after_help("Adds a resource to a playlist.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("list")
.about("Returns a collection of playlist items that match the API request parameters. You can retrieve all of the playlist items in a specified playlist or retrieve one or more playlist items by their unique IDs.")
.after_help("Returns a collection of playlist items that match the API request parameters. You can retrieve all of the playlist items in a specified playlist or retrieve one or more playlist items by their unique IDs.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more playlistItem resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status.
If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a playlistItem resource, the snippet property contains numerous fields, including the title, description, position, and resourceId properties. As such, if you set part=snippet, the API response will contain all of those properties.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("update")
.about("Modifies a playlist item. For example, you could update the item's position in the playlist.")
.after_help("Modifies a playlist item. For example, you could update the item's position in the playlist.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("playlists")
.subcommand(
SubCommand::new("delete")
.about("Deletes a playlist.")
.after_help("Deletes a playlist.")
.arg(
Arg::with_name("id")
.help("The id parameter specifies the YouTube playlist ID for the playlist that is being deleted. In a playlist resource, the id property specifies the playlist's ID.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
.subcommand(
SubCommand::new("insert")
.about("Creates a playlist.")
.after_help("Creates a playlist.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("list")
.about("Returns a collection of playlists that match the API request parameters. For example, you can retrieve all playlists that the authenticated user owns, or you can retrieve one or more playlists by their unique IDs.")
.after_help("Returns a collection of playlists that match the API request parameters. For example, you can retrieve all playlists that the authenticated user owns, or you can retrieve one or more playlists by their unique IDs.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more playlist resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, status, and contentDetails.
If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a playlist resource, the snippet property contains properties like author, title, description, tags, and timeCreated. As such, if you set part=snippet, the API response will contain all of those properties.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("update")
.about("Modifies a playlist. For example, you could change a playlist's title, description, or privacy status.")
.after_help("Modifies a playlist. For example, you could change a playlist's title, description, or privacy status.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("search")
.subcommand(
SubCommand::new("list")
.about("Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource.")
.after_help("Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more search resource properties that the API response will include. The part names that you can include in the parameter value are id and snippet.
If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a search result, the snippet property contains other properties that identify the result's title, description, and so forth. If you set part=snippet, the API response will also contain all of those nested properties.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("subscriptions")
.subcommand(
SubCommand::new("delete")
.about("Deletes a subscription.")
.after_help("Deletes a subscription.")
.arg(
Arg::with_name("id")
.help("The id parameter specifies the YouTube subscription ID for the resource that is being deleted. In a subscription resource, the id property specifies the YouTube subscription ID.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
.subcommand(
SubCommand::new("insert")
.about("Adds a subscription for the authenticated user's channel.")
.after_help("Adds a subscription for the authenticated user's channel.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("list")
.about("Returns subscription resources that match the API request criteria.")
.after_help("Returns subscription resources that match the API request criteria.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more subscription resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails.
If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a subscription resource, the snippet property contains other properties, such as a display title for the subscription. If you set part=snippet, the API response will also contain all of those nested properties.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("thumbnails")
.subcommand(
SubCommand::new("set")
.about("Uploads a custom video thumbnail to YouTube and sets it for a video.")
.after_help("Uploads a custom video thumbnail to YouTube and sets it for a video.")
.arg(
Arg::with_name("video-id")
.help("The videoId parameter specifies a YouTube video ID for which the custom video thumbnail is being provided.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("mode")
.short("u")
.help("Specify which file to upload")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("video-abuse-report-reasons")
.subcommand(
SubCommand::new("list")
.about("Returns a list of abuse reasons that can be used for reporting abusive videos.")
.after_help("Returns a list of abuse reasons that can be used for reporting abusive videos.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies the videoCategory resource parts that the API response will include. Supported values are id and snippet.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("video-categories")
.subcommand(
SubCommand::new("list")
.about("Returns a list of categories that can be associated with YouTube videos.")
.after_help("Returns a list of categories that can be associated with YouTube videos.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies the videoCategory resource parts that the API response will include. Supported values are id and snippet.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("videos")
.subcommand(
SubCommand::new("delete")
.about("Deletes a YouTube video.")
.after_help("Deletes a YouTube video.")
.arg(
Arg::with_name("id")
.help("The id parameter specifies the YouTube video ID for the resource that is being deleted. In a video resource, the id property specifies the video's ID.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
.subcommand(
SubCommand::new("get-rating")
.about("Retrieves the ratings that the authorized user gave to a list of specified videos.")
.after_help("Retrieves the ratings that the authorized user gave to a list of specified videos.")
.arg(
Arg::with_name("id")
.help("The id parameter specifies a comma-separated list of the YouTube video ID(s) for the resource(s) for which you are retrieving rating data. In a video resource, the id property specifies the video's ID.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("insert")
.about("Uploads a video to YouTube and optionally sets the video's metadata.")
.after_help("Uploads a video to YouTube and optionally sets the video's metadata.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("mode")
.short("u")
.help("Specify which file to upload")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("list")
.about("Returns a list of videos that match the API request parameters.")
.after_help("Returns a list of videos that match the API request parameters.")
.arg(
Arg::with_name("part")
.help("The part parameter specifies a comma-separated list of one or more video resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, fileDetails, liveStreamingDetails, localizations, player, processingDetails, recordingDetails, statistics, status, suggestions, and topicDetails.
If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a video resource, the snippet property contains the channelId, title, description, tags, and categoryId properties. As such, if you set part=snippet, the API response will contain all of those properties.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
.subcommand(
SubCommand::new("rate")
.about("Add a like or dislike rating to a video or remove a rating from a video.")
.after_help("Add a like or dislike rating to a video or remove a rating from a video.")
.arg(
Arg::with_name("id")
.help("The id parameter specifies the YouTube video ID of the video that is being rated or having its rating removed.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("rating")
.help("Specifies the rating to record.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
.subcommand(
SubCommand::new("report-abuse")
.about("Report abuse for a video.")
.after_help("Report abuse for a video.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
.subcommand(
SubCommand::new("update")
.about("Updates a video's metadata.")
.after_help("Updates a video's metadata.")
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
.arg(
Arg::with_name("<out>")
.short("o")
.help("Specify the file into which to write the programs output")
.takes_value(true)
.required(false)
.multiple(false))
)
)
.subcommand(
SubCommand::new("watermarks")
.subcommand(
SubCommand::new("set")
.about("Uploads a watermark image to YouTube and sets it for a channel.")
.after_help("Uploads a watermark image to YouTube and sets it for a channel.")
.arg(
Arg::with_name("channel-id")
.help("The channelId parameter specifies a YouTube channel ID for which the watermark is being provided.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("kv")
.short("r")
.help("Set various fields of the request structure")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("mode")
.short("u")
.help("Specify which file to upload")
.takes_value(true)
.required(true)
.multiple(true))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
.subcommand(
SubCommand::new("unset")
.about("Deletes a watermark.")
.after_help("Deletes a watermark.")
.arg(
Arg::with_name("channel-id")
.help("The channelId parameter specifies a YouTube channel ID for which the watermark is being unset.")
.required(true)
.multiple(false))
.arg(
Arg::with_name("v")
.short("p")
.help("Set various fields of the request structure")
.takes_value(true)
.required(false)
.multiple(true))
)
)
.get_matches();
}