### Output of channel example Source: https://docs.rs/rustypipe/latest/rustypipe/index.html Example output from the channel example showing channel info and video items. ```text Name: Louis Rossmann Description: I discuss random things of interest to me. (...) Subscribers: 1780000 [qBHgJx_rb8E] Introducing Rossmann senior, a genuine fossil 😃 (122s) [TmV8eAtXc3s] Am I wrong about CompTIA? (592s) [CjOJJc1qzdY] How FUTO projects loosen Google's grip on your life! (588s) [0A10JtkkL9A] a private moment between a man and his kitten (522s) [zbHq5_1Cd5U] Is Texas mandating auto repair shops use OEM parts? SB1083 analysis & breakdown; tldr, no. (645s) [6Fv8bd9ICb4] Who owns this? (199s) ... ``` -------------------------------- ### Output of playlist example Source: https://docs.rs/rustypipe/latest/rustypipe/index.html Example output from the playlist example showing playlist metadata and video items. ```text Name: Homelab Author: Jeff Geerling Last update: 2023-05-04 [cVWF3u-y-Zg] I put a computer in my computer (720s) [ecdm3oA-QdQ] 6-in-1: Build a 6-node Ceph cluster on this Mini ITX Motherboard (783s) [xvE4HNJZeIg] Scrapyard Server: Fastest all-SSD NAS! (733s) [RvnG-ywF6_s] Nanosecond clock sync with a Raspberry Pi (836s) [R2S2RMNv7OU] I made the Petabyte Raspberry Pi even faster! (572s) [FG--PtrDmw4] Hiding Macs in my Rack! (515s) ... ``` -------------------------------- ### channel_handle Validation Examples Source: https://docs.rs/rustypipe/latest/rustypipe/validate/fn.channel_handle.html Example assertions showing valid and invalid channel handles. Valid handles start with '@' and can contain Unicode letters, numbers, underscores, hyphens, full stops, and middle dots. Invalid handles lack the '@' prefix or contain spaces. ```rust assert!(validate::channel_handle("@EEVBlog").is_ok()); assert!(validate::channel_handle("@Āll·._-").is_ok()); assert!(validate::channel_handle("@한국").is_ok()); assert!(validate::channel_handle("noat").is_err()); assert!(validate::channel_handle("@no space").is_err()); ``` -------------------------------- ### Example usage of video_id validation Source: https://docs.rs/rustypipe/latest/rustypipe/validate/fn.video_id.html Example assertions showing valid and invalid video IDs. Valid IDs are exactly 11 characters with allowed characters; invalid ones fail. ```rust assert!(validate::video_id("dQw4w9WgXcQ").is_ok()); assert!(validate::video_id("Abcd").is_err()); assert!(validate::video_id("dQw4w9WgXc@").is_err()); ``` -------------------------------- ### Example usage of album_id validation Source: https://docs.rs/rustypipe/latest/rustypipe/validate/fn.album_id.html Example assertions showing valid and invalid album IDs. The first assertion passes for a valid ID, the second fails for an invalid one. ```rust assert!(validate::album_id("MPREb_GyH43gCvdM5").is_ok()); assert!(validate::album_id("Abcd_GyH43gCvdM5").is_err()); ``` -------------------------------- ### RustyPipe::user_auth_get_code Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipe.html Gets a new device code for logging into YouTube. ```APIDOC ## RustyPipe::user_auth_get_code ### Description Gets a new device code for logging into YouTube. ### Method `pub async fn user_auth_get_code(&self) -> Result` ### Parameters None. ### Returns - `Result` - The device code on success, or an error. ``` -------------------------------- ### continuation Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Get more YouTube items from the given continuation token and endpoint. ```APIDOC ## continuation ### Description Get more YouTube items from the given continuation token and endpoint. ### Method async fn ### Signature pub async fn continuation + Debug>(&self, ctoken: S, endpoint: ContinuationEndpoint, visitor_data: Option<&str>) -> Result, Error> ### Parameters - **ctoken** (S) - Required - The continuation token. - **endpoint** (ContinuationEndpoint) - Required - The endpoint to continue from. - **visitor_data** (Option<&str>) - Optional - Visitor data for the continuation. ### Return Value - **Result, Error>** - A paginator for fetching more items, or an error. ``` -------------------------------- ### Example: assert!(validate::genre_id(...)) Source: https://docs.rs/rustypipe/latest/rustypipe/validate/fn.genre_id.html Shows three assertions: a valid genre ID passes, a short invalid ID fails, and an ID with an incorrect prefix fails. The valid ID is exactly 24 characters, starts with `ggMPO`, and uses only `A-Za-z0-9_-`. ```rust assert!(validate::genre_id("ggMPOg1uX1JOQWZFeDByc2Jm").is_ok()); assert!(validate::genre_id("Abcd").is_err()); assert!(validate::genre_id("ggAbcg1uX1JOQWZFeDByc2Jm").is_err()); ``` -------------------------------- ### playlist Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Get a YouTube playlist. ```APIDOC ## playlist ### Description Get a YouTube playlist. ### Method async fn ### Signature pub async fn playlist + Debug>(&self, playlist_id: S) -> Result ### Parameters - **playlist_id** (S) - Required - The YouTube playlist ID. ### Return Value - **Result** - The playlist, or an error. ``` -------------------------------- ### RustyPipe::version_botguard Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipe.html Gets the version string of the used botguard binary. ```APIDOC ## RustyPipe::version_botguard ### Description Gets the version string (e.g. `rustypipe-botguard 0.1.1`) of the used botguard binary. ### Method `pub async fn version_botguard(&self) -> Option` ### Parameters None. ### Returns - `Option` - The version string, or `None` if not available. ``` -------------------------------- ### Get a playlist with RustyPipe Source: https://docs.rs/rustypipe/latest/rustypipe/index.html Fetches a playlist, extends its items up to 1000, and prints playlist details and video items. ```rust use rustypipe::client::RustyPipe #[tokio::main] async fn main() { // Create a client let rp = RustyPipe::new(); // Get the playlist let playlist = rp .query() .playlist("PL2_OBreMn7FrsiSW0VDZjdq0xqUKkZYHT") .await .unwrap(); // Get all items (maximum: 1000) playlist.videos.extend_limit(rp.query(), 1000).await.unwrap(); println!("Name: {}", playlist.name); println!("Author: {}", playlist.channel.unwrap().name); println!("Last update: {}", playlist.last_update.unwrap()); playlist .videos .items .iter() .for_each(|v| println!("[{}] {} ({}s)", v.id, v.name, v.length)); } ``` -------------------------------- ### Usage Examples for track_lyrics_id Source: https://docs.rs/rustypipe/latest/rustypipe/validate/fn.track_lyrics_id.html Shows three assertions: a valid ID returns Ok, an invalid short ID returns Err, and an ID with wrong prefix returns Err. These examples illustrate the validation rules. ```rust assert!(validate::track_lyrics_id("MPLYt_wrKjTn9hmry").is_ok()); assert!(validate::track_lyrics_id("Abcd").is_err()); assert!(validate::track_lyrics_id("Abcdt_wrKjTn9hmry").is_err()); ``` -------------------------------- ### Get a channel with RustyPipe Source: https://docs.rs/rustypipe/latest/rustypipe/index.html Fetches channel videos and prints channel info and video items. ```rust use rustypipe::client::RustyPipe #[tokio::main] async fn main() { // Create a client let rp = RustyPipe::new(); // Get the channel let channel = rp .query() .channel_videos("UCl2mFZoRqjw_ELax4Yisf6w") .await .unwrap(); println!("Name: {}", channel.name); println!("Description: {}", channel.description); println!("Subscribers: {}", channel.subscriber_count.unwrap()); channel .content .items .iter() .for_each(|v| println!("[{}] {} ({}s)", v.id, v.name, v.length.unwrap())); } ``` -------------------------------- ### Validate channel IDs with channel_id Source: https://docs.rs/rustypipe/latest/rustypipe/validate/fn.channel_id.html Examples demonstrating valid and invalid YouTube channel ID formats. ```rust assert!(validate::channel_id("UC2DjFE7Xf11URZqWBigcVOQ").is_ok()); assert!(validate::channel_id("Abcd").is_err()); assert!(validate::channel_id("XY2DjFE7Xf11URZqWBigcVOQ").is_err()); ``` -------------------------------- ### Examples: validate::playlist_id with valid and invalid IDs Source: https://docs.rs/rustypipe/latest/rustypipe/validate/fn.playlist_id.html Examples showing the use of `validate::playlist_id` with valid playlist IDs (starting with `PL`, `RDCLAK`, or `OLAK`) and an invalid ID (`Abcd`). The valid IDs return `is_ok()`, the invalid one returns `is_err()`. ```rust assert!(validate::playlist_id("PL4lEESSgxM_5O81EvKCmBIm_JT5Q7JeaI").is_ok()); assert!(validate::playlist_id("RDCLAK5uy_kFQXdnqMaQCVx2wpUM4ZfbsGCDibZtkJk").is_ok()); assert!(validate::playlist_id("OLAK5uy_k0yFrZlFRgCf3rLPza-lkRmCrtLPbK9pE").is_ok()); assert!(validate::playlist_id("Abcd").is_err()); ``` -------------------------------- ### Instantiate RustyPipe client with default and custom options Source: https://docs.rs/rustypipe/latest/rustypipe/index.html Shows two ways to create a RustyPipe client: with default options using RustyPipe::new() and with a custom storage directory using RustyPipe::builder(). Also demonstrates a query with language set to German. ```rust let rp = RustyPipe::new(); let rp = RustyPipe::builder().storage_dir("/app/data").build().unwrap(); let channel = rp.query().lang(Language::De).channel_videos("UCl2mFZoRqjw_ELax4Yisf6w").await.unwrap(); ``` -------------------------------- ### Validate radio IDs with radio_id Source: https://docs.rs/rustypipe/latest/rustypipe/validate/fn.radio_id.html Shows valid and invalid radio ID examples. Valid IDs start with `RD` and have at least 22 characters from `A-Za-z0-9_-`. ```rust assert!(validate::radio_id("RDEMSuoM_jxfse1_g8uCO7MCtg").is_ok()); assert!(validate::radio_id("Abcd").is_err()); assert!(validate::radio_id("XYEMSuoM_jxfse1_g8uCO7MCtg").is_err()); ``` -------------------------------- ### srv1 subtitle format example Source: https://docs.rs/rustypipe/latest/rustypipe/model/struct.Subtitle.html srv1 is the default subtitle format. It uses XML with a transcript element and text elements containing start and dur attributes. ```xml - [Mr Beast] I built two massive circles and put 100 boys in one and 100 girls in the other ``` -------------------------------- ### RustyPipe::new Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipe.html Creates a new RustyPipe instance with default settings. ```APIDOC ## RustyPipe::new ### Description Creates a new RustyPipe instance with default settings. To create an instance with custom options, use `RustyPipeBuilder` instead. ### Method `pub fn new() -> Self` ### Parameters None. ### Returns - `Self` - A new RustyPipe instance. ``` -------------------------------- ### resolve_string examples Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Shows how to resolve input strings (channel handle, playlist ID) to UrlTarget values. Accepts URLs, IDs, and channel handles/vanity IDs. ```rust // Channel assert_eq!( rp.query().resolve_string("LinusTechTips", true).await.unwrap(), UrlTarget::Channel {id: "UCXuqSBlHAE6Xw-yeJA0Tunw".to_owned()} ); // Playlist assert_eq!( rp.query().resolve_string("PL4lEESSgxM_5O81EvKCmBIm_JT5Q7JeaI", true).await.unwrap(), UrlTarget::Playlist {id: "PL4lEESSgxM_5O81EvKCmBIm_JT5Q7JeaI".to_owned()} ); ``` -------------------------------- ### RustyPipeBuilder::new Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeBuilder.html Creates a new RustyPipeBuilder instance. This is the same as RustyPipe::builder. ```APIDOC ## RustyPipeBuilder::new ### Description Creates a new `RustyPipeBuilder` instance. This is the same as `RustyPipe::builder`. ### Method `pub fn new() -> Self` ### Parameters None. ### Returns - `Self` - A new `RustyPipeBuilder` instance. ``` -------------------------------- ### RustyPipeBuilder::build Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeBuilder.html Creates a new, configured RustyPipe instance. ```APIDOC ## RustyPipeBuilder::build ### Description Creates a new, configured `RustyPipe` instance. ### Method `pub fn build(self) -> Result` ### Parameters None. ### Returns - `Result` - A `RustyPipe` instance on success, or an `Error` on failure. ``` -------------------------------- ### Watch a video with RustyPipe and mpv Source: https://docs.rs/rustypipe/latest/rustypipe/index.html Fetches the player for a video, selects the best video and audio streams, and opens them in the mpv player. ```rust use std::process::Command; use rustypipe::{client::RustyPipe, param::StreamFilter}; #[tokio::main] async fn main() { // Create a client let rp = RustyPipe::new(); // Fetch the player let player = rp.query().player("pPvd8UxmSbQ").await.unwrap(); // Select the best streams let (video, audio) = player.select_video_audio_stream(&StreamFilter::default()); // Open mpv player let mut args = vec![video.expect("no video stream").url.to_owned()]; if let Some(audio) = audio { args.push(format!("--audio-file={}", audio.url)); } Command::new("mpv").args(args).output().unwrap(); } ``` -------------------------------- ### Set query options with country, lang, visitor_data, and player Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Example of setting request options for a RustyPipeQuery instance. Uses RustyPipe::new() and the query() method, then chains country, lang, visitor_data, and player calls. ```rust let rp = RustyPipe::new(); rp.query() .country(rustypipe::param::Country::De) .lang(rustypipe::param::Language::De) .visitor_data("CgthZVRCd1dkbTlRWSj3v_miBg%3D%3D") .player("ZeerrnuLi5E"); ``` -------------------------------- ### Example assertions for track_related_id Source: https://docs.rs/rustypipe/latest/rustypipe/validate/fn.track_related_id.html Example assertions showing valid and invalid related track IDs. The first assertion passes for a valid ID, while the second and third fail for invalid IDs. ```rust assert!(validate::track_related_id("MPTRt_wrKjTn9hmry").is_ok()); assert!(validate::track_related_id("Abcd").is_err()); assert!(validate::track_related_id("Abcdt_wrKjTn9hmry").is_err()); ``` -------------------------------- ### resolve_url examples Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Shows how to resolve YouTube URLs (channel, video, album) to UrlTarget values. The resolve_albums flag controls whether album URLs are resolved to album IDs or returned as playlists. ```rust // Channel assert_eq!( rp.query().resolve_url("https://www.youtube.com/LinusTechTips", true).await.unwrap(), UrlTarget::Channel {id: "UCXuqSBlHAE6Xw-yeJA0Tunw".to_owned()} ); // Video assert_eq!( rp.query().resolve_url("https://youtu.be/dQw4w9WgXcQ", true).await.unwrap(), UrlTarget::Video {id: "dQw4w9WgXcQ".to_owned(), start_time: 0} ); // Album // You can choose whether album URLs should be resolved to their album id or returned as playlists assert_eq!( rp.query().resolve_url("https://music.youtube.com/playlist?list=OLAK5uy_k0yFrZlFRgCf3rLPza-lkRmCrtLPbK9pE", true).await.unwrap(), UrlTarget::Album {id: "MPREb_GyH43gCvdM5".to_owned()} ); assert_eq!( rp.query().resolve_url("https://music.youtube.com/playlist?list=OLAK5uy_k0yFrZlFRgCf3rLPza-lkRmCrtLPbK9pE", false).await.unwrap(), UrlTarget::Playlist {id: "OLAK5uy_k0yFrZlFRgCf3rLPza-lkRmCrtLPbK9pE".to_owned()} ); ``` -------------------------------- ### SearchFilter::new Source: https://docs.rs/rustypipe/latest/rustypipe/param/search_filter/struct.SearchFilter.html Creates a new SearchFilter instance with default settings. ```APIDOC ## SearchFilter::new ### Description Creates a new `SearchFilter` instance with default settings. ### Method `pub fn new() -> Self` ### Parameters None ### Returns - `Self` - A new `SearchFilter` instance. ``` -------------------------------- ### RustyPipeQuery Options Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Shows how to set country, language, and visitor data options on a RustyPipeQuery instance before making a request. ```APIDOC ## RustyPipeQuery Options ### Description Set the language, country, and visitor data ID for individual requests. ### Usage Example ```rust let rp = RustyPipe::new(); rp.query() .country(rustypipe::param::Country::De) .lang(rustypipe::param::Language::De) .visitor_data("CgthZVRCd1dkbTlRWSj3v_miBg%3D%3D") .player("ZeerrnuLi5E"); ``` ### Methods - `country(country: Country)` - Sets the country for the request. - `lang(lang: Language)` - Sets the language for the request. - `visitor_data(data: &str)` - Sets the visitor data ID for the request. ### Notes - The `player` method is used to request video player data. - Options are applied per request. ``` -------------------------------- ### raw Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Execute a request to the YouTube API and return the response string. ```APIDOC ## raw ### Description Execute a request to the YouTube API and return the response string. ### Method Async method ### Parameters - **ctype** (ClientType) - Required - Client type (`Desktop`, `DesktopMusic`, `Android`, …). - **endpoint** (&str) - Required - YouTube API endpoint (`https://www.youtube.com/youtubei/v1/?key=...`). - **body** (&B: Serialize + ?Sized) - Required - Serializable request body to be sent in JSON format. ### Returns - **Result** - The response string on success, or an error. ``` -------------------------------- ### search_suggestion Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Get YouTube search suggestions. ```APIDOC ## search_suggestion ### Description Get YouTube search suggestions. ### Method async fn ### Signature pub async fn search_suggestion + Debug>(&self, query: S) -> Result, Error> ### Parameters - **query** (S) - Required - The search query string. ### Return Value - **Result, Error>** - A vector of search suggestions, or an error. ``` -------------------------------- ### video_details Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Gets the metadata for a video by its video ID. ```APIDOC ## video_details ### Description Gets the metadata for a video by its video ID. ### Method async fn video_details ### Signature ```rust pub async fn video_details + Debug>( &self, video_id: S, ) -> Result ``` ### Parameters - **video_id** (S) - Required - The ID of the video to fetch details for. ### Returns - **Result** - The video metadata or an error. ``` -------------------------------- ### player_from_clients Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Get YouTube player data using a list of clients. The clients are used in the given order. If a client cannot fetch the requested video, an attempt is made with the next one. ```APIDOC ## player_from_clients ### Description Get YouTube player data (video/audio streams + basic metadata) using a list of clients. The clients are used in the given order. If a client cannot fetch the requested video, an attempt is made with the next one. ### Method async fn ### Signature pub async fn player_from_clients + Debug>(&self, video_id: S, clients: &[ClientType]) -> Result ### Parameters - **video_id** (S) - Required - The YouTube video ID. - **clients** (&[ClientType]) - Required - A slice of client types to use, in order. ### Return Value - **Result** - The player data, or an error. ``` -------------------------------- ### trending Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Get the videos from the YouTube trending page. ```APIDOC ## trending ### Description Get the videos from the YouTube trending page. ### Method async fn ### Signature pub async fn trending(&self) -> Result, Error> ### Return Value - **Result, Error>** - A vector of trending VideoItem objects, or an error. ``` -------------------------------- ### music_search_suggestion Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Get YouTube Music search suggestions. ```APIDOC ## music_search_suggestion ### Description Get YouTube Music search suggestions. ### Method async fn ### Signature pub async fn music_search_suggestion + Debug>(&self, query: S) -> Result ### Parameters - **query** (S) - Required - The search query string. ### Return Value - **Result** - The search suggestions, or an error. ``` -------------------------------- ### player_from_client Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Get YouTube player data using the specified client. ```APIDOC ## player_from_client ### Description Get YouTube player data (video/audio streams + basic metadata) using the specified client. ### Method async fn ### Signature pub async fn player_from_client + Debug>(&self, video_id: S, client_type: ClientType) -> Result ### Parameters - **video_id** (S) - Required - The YouTube video ID. - **client_type** (ClientType) - Required - The client type to use. ### Return Value - **Result** - The player data, or an error. ``` -------------------------------- ### RustyPipeBuilder::build_with_client Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeBuilder.html Creates a new, configured RustyPipe instance using a Reqwest ClientBuilder. ```APIDOC ## RustyPipeBuilder::build_with_client ### Description Creates a new, configured RustyPipe instance using a Reqwest `ClientBuilder`. ### Method `pub fn build_with_client(self, client_builder: ClientBuilder) -> Result` ### Parameters - `client_builder` (ClientBuilder) - Required - The Reqwest `ClientBuilder` to use for the HTTP client. ### Returns - `Result` - A `RustyPipe` instance on success, or an `Error` on failure. ``` -------------------------------- ### RustyPipe::user_auth_access_token Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipe.html Gets the OAuth access token for authenticated requests. ```APIDOC ## RustyPipe::user_auth_access_token ### Description Gets the OAuth access token for accessing YouTube as an authenticated user. ### Method `pub async fn user_auth_access_token(&self) -> Result` ### Parameters None. ### Returns - `Result` - The access token on success, or an error. ``` -------------------------------- ### impl FromYtItem for TrackItem Source: https://docs.rs/rustypipe/latest/rustypipe/model/struct.TrackItem.html Provides casting from generic YouTube Music items and YouTube items to TrackItem. ```APIDOC ## impl FromYtItem for TrackItem ### Description Provides casting from generic YouTube Music items and YouTube items to TrackItem. ### Methods #### fn from_ytm_item(item: MusicItem) -> Option Casting from a generic YouTube Music item to a specific kind. #### fn from_yt_item(_item: YouTubeItem) -> Option Casting from a generic YouTube item to a specific kind. ``` -------------------------------- ### get_visitor_data Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Get a YouTube visitor data ID, which is necessary for certain requests. ```APIDOC ## get_visitor_data ### Description Get a YouTube visitor data ID, which is necessary for certain requests. ### Method Async method ### Parameters - **force_new** (bool) - Required - Whether to force a new visitor data ID. ### Returns - **Result** - The visitor data ID on success, or an error. ``` -------------------------------- ### video_comments Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Gets the comments for a video using a continuation token obtained from video_details(). ```APIDOC ## video_comments ### Description Gets the comments for a video using a continuation token obtained from `video_details()`. ### Method async fn video_comments ### Signature ```rust pub async fn video_comments + Debug>( &self, ctoken: S, visitor_data: Option<&str>, ) -> Result, Error> ``` ### Parameters - **ctoken** (S) - Required - The continuation token for fetching comments. - **visitor_data** (Option<&str>) - Optional - Visitor data for the request. ### Returns - **Result, Error>** - A paginator for the comments or an error. ``` -------------------------------- ### player_client_order Source: https://docs.rs/rustypipe/latest/rustypipe/client/struct.RustyPipeQuery.html Get the default order of client types when fetching player data. ```APIDOC ## player_client_order ### Description Get the default order of client types when fetching player data. The order may change in the future in case YouTube applies changes to their platform that disable a client or make it less reliable. ### Method fn ### Signature pub fn player_client_order(&self) -> &'static [ClientType] ### Return Value - **&'static [ClientType]** - The default order of client types. ``` -------------------------------- ### UrlTarget::to_url Source: https://docs.rs/rustypipe/latest/rustypipe/model/enum.UrlTarget.html Converts the URL target to a YouTube URL. Equivalent to `url_target.to_string()`. ```APIDOC ## UrlTarget::to_url ### Description Converts the URL target to a YouTube URL. Equivalent to `url_target.to_string()`. ### Method `pub fn to_url(&self) -> String` ### Parameters None ### Returns - **String** - The YouTube URL representation of the URL target. ### Example ```rust let target = UrlTarget::Video { id: "ZeerrnuLi5E".to_string(), start_time: 0 }; let url = target.to_url(); ``` ```