class
Google::Apis::YoutubeV3::YouTubeService
Defined in:
google/apis/youtube_v3/service.crConstructors
-
.new
Creates a new YouTubeService client configured for the YouTube Data API v3.
Instance Method Summary
-
#authorize(oauth_client : Google::Auth::OAuth2Client)
Sets the authorization credentials using an OAuth2 client.
-
#authorize(credentials : Google::Auth::ServiceAccountCredentials)
Sets the authorization credentials using a service account.
-
#batch(&block : Google::Apis::Core::BatchRequest -> ) : Array(HTTP::Client::Response)
Executes multiple API requests in a single HTTP connection using batch processing (max 50 requests).
-
#bind_live_broadcast(id : String, part : String, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, stream_id : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : LiveBroadcast
Binds a live broadcast to a live stream, or removes an existing binding.
-
#delete_caption(id : String, on_behalf_of : String | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Deletes a caption track identified by id.
-
#delete_channel_section(id : String, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Deletes a channel section identified by id.
-
#delete_comment(id : String, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Deletes a comment identified by id.
-
#delete_live_broadcast(id : String, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Deletes a live broadcast identified by id.
-
#delete_live_chat_ban(id : String, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Removes a ban from a live chat, allowing the user to send messages again.
-
#delete_live_chat_message(id : String, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Deletes a live chat message identified by id.
-
#delete_live_chat_moderator(id : String, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Removes a moderator from a live chat identified by id.
-
#delete_live_stream(id : String, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Deletes a live stream identified by id.
-
#delete_playlist(id : String, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Deletes a playlist identified by id.
-
#delete_playlist_image(id : String | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Deletes a playlist image identified by id.
-
#delete_playlist_item(id : String, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Removes an item from a playlist by its id.
-
#delete_subscription(id : String, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Removes a subscription identified by id.
-
#delete_third_party_link(linking_token : String, type : String, external_channel_id : String | Nil = nil, part : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Deletes a third-party link identified by linking_token and type.
-
#delete_video(id : String, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Deletes a YouTube video identified by id.
-
#download_caption(id : String, on_behalf_of : String | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, tfmt : String | Nil = nil, tlang : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil, download_dest : String | IO = "") : Nil
Downloads a caption track file.
-
#get_video_rating(id : String, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : JSON::Any
Retrieves the rating (like/dislike/none) that the authorized user gave to a video.
-
#get_video_trainability(id : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : VideoTrainability
Retrieves trainability information for a video.
-
#insert_abuse_report(part : String, abuse_report_object : JSON::Any, fields : String | Nil = nil, quota_user : String | Nil = nil) : JSON::Any
Submits an abuse report for a YouTube resource (e.g., video, comment, channel).
-
#insert_caption(part : String, caption_object : Caption, on_behalf_of : String | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, sync : Bool | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Caption
Uploads a caption track for a video.
-
#insert_channel_banner(channel_banner_resource_object : ChannelBannerResource | Nil = nil, channel_id : String | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil, upload_source : String | IO | Nil = nil, content_type : String = "application/octet-stream") : ChannelBannerResource
Uploads a channel banner image.
-
#insert_channel_section(part : String, channel_section_object : ChannelSection, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ChannelSection
Creates a new channel section (e.g., featured playlists, recent activity) on a channel page.
-
#insert_comment(part : String, comment_object : Comment, fields : String | Nil = nil, quota_user : String | Nil = nil) : Comment
Creates a reply to an existing comment.
-
#insert_comment_thread(part : String, comment_thread_object : CommentThread, fields : String | Nil = nil, quota_user : String | Nil = nil) : CommentThread
Creates a new top-level comment thread on a video or channel.
-
#insert_live_broadcast(part : String, live_broadcast_object : LiveBroadcast, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : LiveBroadcast
Creates a new live broadcast event.
-
#insert_live_broadcast_cuepoint(cuepoint_object : Cuepoint | Nil = nil, id : String | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, part : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Cuepoint
Inserts a cuepoint (ad break) into a live broadcast.
-
#insert_live_chat_ban(part : String, live_chat_ban_object : LiveChatBan, fields : String | Nil = nil, quota_user : String | Nil = nil) : LiveChatBan
Bans a user from a live chat, preventing them from sending messages.
-
#insert_live_chat_message(part : String, live_chat_message_object : LiveChatMessage, fields : String | Nil = nil, quota_user : String | Nil = nil) : LiveChatMessage
Sends a message to a live broadcast's chat.
-
#insert_live_chat_moderator(part : String, live_chat_moderator_object : LiveChatModerator, fields : String | Nil = nil, quota_user : String | Nil = nil) : LiveChatModerator
Adds a moderator to a live chat.
-
#insert_live_stream(part : String, live_stream_object : LiveStream, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : LiveStream
Creates a new live stream for the authenticated user.
-
#insert_playlist(part : String, playlist_object : Playlist, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Playlist
Creates a new playlist for the authenticated user.
-
#insert_playlist_image(playlist_image_object : PlaylistImage | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, part : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil, upload_source : String | IO | Nil = nil, content_type : String = "application/octet-stream") : PlaylistImage
Uploads and associates an image with a playlist.
-
#insert_playlist_item(part : String, playlist_item_object : PlaylistItem, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : PlaylistItem
Adds a resource (video) to a playlist.
-
#insert_subscription(part : String, subscription_object : Subscription, fields : String | Nil = nil, quota_user : String | Nil = nil) : Subscription
Subscribes the authenticated user to a channel.
-
#insert_test(part : String, test_item_object : TestItem | Nil = nil, external_channel_id : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : TestItem
Inserts a test item (internal/testing endpoint).
-
#insert_third_party_link(part : String, third_party_link_object : ThirdPartyLink, external_channel_id : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ThirdPartyLink
Creates a new third-party link between a YouTube channel and an external platform.
-
#insert_video(part : String, video_object : Video, auto_levels : Bool | Nil = nil, notify_subscribers : Bool | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, stabilize : Bool | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Video
Uploads a video to YouTube with the given metadata.
-
#list_activities(part : String, channel_id : String | Nil = nil, home : Bool | Nil = nil, max_results : Int32 | Nil = nil, mine : Bool | Nil = nil, page_token : String | Nil = nil, published_after : String | Nil = nil, published_before : String | Nil = nil, region_code : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListActivitiesResponse
Retrieves a list of channel activity events (uploads, likes, favorites, etc.).
-
#list_captions(part : String, video_id : String, id : String | Nil = nil, on_behalf_of : String | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListCaptionsResponse
Retrieves a list of caption tracks associated with the specified video.
-
#list_channel_sections(part : String, channel_id : String | Nil = nil, hl : String | Nil = nil, id : String | Nil = nil, mine : Bool | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListChannelSectionsResponse
Retrieves a list of channel sections for the specified channel.
-
#list_channels(part : String, category_id : String | Nil = nil, for_handle : String | Nil = nil, for_username : String | Nil = nil, hl : String | Nil = nil, id : String | Nil = nil, managed_by_me : Bool | Nil = nil, max_results : Int32 | Nil = nil, mine : Bool | Nil = nil, my_subscribers : Bool | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, page_token : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListChannelsResponse
Retrieves a list of YouTube channels matching the specified criteria.
-
#list_comment_threads(part : String, all_threads_related_to_channel_id : String | Nil = nil, channel_id : String | Nil = nil, id : String | Nil = nil, max_results : Int32 | Nil = nil, moderation_status : String | Nil = nil, order : String | Nil = nil, page_token : String | Nil = nil, search_terms : String | Nil = nil, text_format : String | Nil = nil, video_id : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListCommentThreadsResponse
Retrieves a list of comment threads matching the specified criteria.
-
#list_comments(part : String, id : String | Nil = nil, max_results : Int32 | Nil = nil, page_token : String | Nil = nil, parent_id : String | Nil = nil, text_format : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListCommentsResponse
Retrieves a list of comments matching the specified criteria.
-
#list_i18n_languages(part : String, hl : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListI18nLanguagesResponse
Retrieves a list of application languages that the YouTube website supports.
-
#list_i18n_regions(part : String, hl : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListI18nRegionsResponse
Retrieves a list of content regions that the YouTube website supports.
-
#list_live_broadcasts(part : String, broadcast_status : String | Nil = nil, broadcast_type : String | Nil = nil, id : String | Nil = nil, max_results : Int32 | Nil = nil, mine : Bool | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, page_token : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListLiveBroadcastsResponse
Retrieves a list of live broadcasts matching the specified criteria.
-
#list_live_chat_messages(live_chat_id : String, part : String, hl : String | Nil = nil, max_results : Int32 | Nil = nil, page_token : String | Nil = nil, profile_image_size : Int32 | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : LiveChatMessageListResponse
Retrieves live chat messages from a live broadcast's chat.
-
#list_live_chat_moderators(live_chat_id : String, part : String, max_results : Int32 | Nil = nil, page_token : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : LiveChatModeratorListResponse
Retrieves a list of moderators for a live chat.
-
#list_live_streams(part : String, id : String | Nil = nil, max_results : Int32 | Nil = nil, mine : Bool | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, page_token : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListLiveStreamsResponse
Retrieves a list of live streams owned by the authenticated user.
-
#list_members(part : String, filter_by_member_channel_id : String | Nil = nil, has_access_to_level : String | Nil = nil, max_results : Int32 | Nil = nil, mode : String | Nil = nil, page_token : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : MemberListResponse
Retrieves a list of channel members (sponsors) for the authenticated user's channel.
-
#list_memberships_levels(part : String, fields : String | Nil = nil, quota_user : String | Nil = nil) : MembershipsLevelListResponse
Retrieves all membership levels defined for the authenticated user's channel.
-
#list_playlist_images(max_results : Int32 | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, page_token : String | Nil = nil, parent : String | Nil = nil, part : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : PlaylistImageListResponse
Retrieves a list of images associated with a playlist.
-
#list_playlist_items(part : String, id : String | Nil = nil, max_results : Int32 | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, page_token : String | Nil = nil, playlist_id : String | Nil = nil, video_id : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListPlaylistItemsResponse
Retrieves a list of items in a playlist.
-
#list_playlists(part : String, channel_id : String | Nil = nil, hl : String | Nil = nil, id : String | Nil = nil, max_results : Int32 | Nil = nil, mine : Bool | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, page_token : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListPlaylistsResponse
Retrieves a list of playlists matching the specified criteria.
-
#list_searches(part : String, channel_id : String | Nil = nil, channel_type : String | Nil = nil, event_type : String | Nil = nil, for_content_owner : Bool | Nil = nil, for_developer : Bool | Nil = nil, for_mine : Bool | Nil = nil, location : String | Nil = nil, location_radius : String | Nil = nil, max_results : Int32 | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, order : String | Nil = nil, page_token : String | Nil = nil, published_after : String | Nil = nil, published_before : String | Nil = nil, q : String | Nil = nil, region_code : String | Nil = nil, relevance_language : String | Nil = nil, safe_search : String | Nil = nil, topic_id : String | Nil = nil, type : String | Nil = nil, video_caption : String | Nil = nil, video_category_id : String | Nil = nil, video_definition : String | Nil = nil, video_dimension : String | Nil = nil, video_duration : String | Nil = nil, video_embeddable : String | Nil = nil, video_license : String | Nil = nil, video_paid_product_placement : String | Nil = nil, video_syndicated : String | Nil = nil, video_type : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : SearchListsResponse
Searches for YouTube resources (videos, channels, playlists) matching the given query parameters.
-
#list_subscriptions(part : String, channel_id : String | Nil = nil, for_channel_id : String | Nil = nil, id : String | Nil = nil, max_results : Int32 | Nil = nil, mine : Bool | Nil = nil, my_recent_subscribers : Bool | Nil = nil, my_subscribers : Bool | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, order : String | Nil = nil, page_token : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListSubscriptionsResponse
Retrieves a list of subscriptions matching the specified criteria.
-
#list_super_chat_events(part : String, hl : String | Nil = nil, max_results : Int32 | Nil = nil, page_token : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : SuperChatEventListResponse
Retrieves a list of Super Chat events for the authenticated user's channel.
-
#list_third_party_links(part : String, external_channel_id : String | Nil = nil, linking_token : String | Nil = nil, type : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ThirdPartyLinkListResponse
Retrieves a list of third-party links associated with a channel.
-
#list_video_abuse_report_reasons(part : String, hl : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListVideoAbuseReportReasonResponse
Retrieves the list of valid reasons for reporting a video as abusive.
-
#list_video_categories(part : String, hl : String | Nil = nil, id : String | Nil = nil, region_code : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListVideoCategoriesResponse
Retrieves a list of video categories available in the specified region.
-
#list_videos(part : String, chart : String | Nil = nil, hl : String | Nil = nil, id : String | Nil = nil, locale : String | Nil = nil, max_height : Int32 | Nil = nil, max_results : Int32 | Nil = nil, max_width : Int32 | Nil = nil, my_rating : String | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, page_token : String | Nil = nil, region_code : String | Nil = nil, video_category_id : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ListVideosResponse
Retrieves a list of videos matching the specified criteria.
-
#mark_comment_as_spam(id : String, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Flags one or more comments as spam.
-
#rate_video(id : String, rating : String, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Adds a like or dislike rating to a video, or removes a rating.
-
#report_video_abuse(video_abuse_report_object : VideoAbuseReport, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Reports a video as abusive by submitting a video abuse report.
-
#set_comment_moderation_status(id : String, moderation_status : String, ban_author : Bool | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Sets the moderation status of one or more comments.
-
#set_thumbnail(video_id : String, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : SetThumbnailResponse
Sets a custom thumbnail image for a video.
-
#set_watermark(channel_id : String, invideo_branding_object : InvideoBranding, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Sets a watermark image for a channel's videos.
-
#stream_live_chat_messages(hl : String | Nil = nil, live_chat_id : String | Nil = nil, max_results : Int32 | Nil = nil, page_token : String | Nil = nil, part : String | Nil = nil, profile_image_size : Int32 | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : LiveChatMessageListResponse
Streams live chat messages via a persistent connection for real-time updates.
-
#transition_live_broadcast(broadcast_status : String, id : String, part : String, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : LiveBroadcast
Transitions a live broadcast to a new status (e.g., "testing", "live", "complete").
-
#transition_live_chat_message(id : String | Nil = nil, status : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Transitions a live chat message to a new status.
-
#unset_watermark(channel_id : String, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Nil
Removes the watermark image from a channel's videos.
-
#update_caption(part : String, caption_object : Caption, on_behalf_of : String | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, sync : Bool | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Caption
Updates an existing caption track's metadata or replaces the caption data.
-
#update_channel(part : String, channel_object : Channel, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Channel
Updates a channel's metadata (e.g., branding settings, localized info).
-
#update_channel_section(part : String, channel_section_object : ChannelSection, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ChannelSection
Updates an existing channel section's metadata.
-
#update_comment(part : String, comment_object : Comment, fields : String | Nil = nil, quota_user : String | Nil = nil) : Comment
Updates an existing comment's text.
-
#update_comment_thread(comment_thread_object : CommentThread, part : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : CommentThread
Updates an existing comment thread (e.g., modifies the top-level comment text).
-
#update_live_broadcast(part : String, live_broadcast_object : LiveBroadcast, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : LiveBroadcast
Updates an existing live broadcast's metadata (e.g., title, description, scheduled times).
-
#update_live_stream(part : String, live_stream_object : LiveStream, on_behalf_of_content_owner : String | Nil = nil, on_behalf_of_content_owner_channel : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : LiveStream
Updates an existing live stream's metadata.
-
#update_playlist(part : String, playlist_object : Playlist, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Playlist
Updates a playlist's metadata (e.g., title, description, privacy status).
-
#update_playlist_image(playlist_image_object : PlaylistImage | Nil = nil, on_behalf_of_content_owner : String | Nil = nil, part : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil, upload_source : String | IO | Nil = nil, content_type : String = "application/octet-stream") : PlaylistImage
Updates an existing playlist image, optionally replacing the image data.
-
#update_playlist_item(part : String, playlist_item_object : PlaylistItem, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : PlaylistItem
Updates a playlist item (e.g., changes its position in the playlist or updates the video note).
-
#update_third_party_link(part : String, third_party_link_object : ThirdPartyLink, external_channel_id : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : ThirdPartyLink
Updates an existing third-party link's metadata.
-
#update_video(part : String, video_object : Video, on_behalf_of_content_owner : String | Nil = nil, fields : String | Nil = nil, quota_user : String | Nil = nil) : Video
Updates a video's metadata.
Instance methods inherited from class Google::Apis::Core::BaseService
access_token : String | Nil
access_token,
access_token=(access_token : String | Nil)
access_token=,
base_path : String
base_path,
base_path=(base_path : String)
base_path=,
execute(method : String, path : String, query : Hash(String, String | Nil) = {} of String => String | ::Nil, body : String | Nil = nil, headers : HTTP::Headers | Nil = nil) : HTTP::Client::Response
execute,
key : String | Nil
key,
key=(key : String | Nil)
key=,
max_retries : Int32
max_retries,
max_retries=(max_retries : Int32)
max_retries=,
root_url : String
root_url,
root_url=(root_url : String)
root_url=
Constructor methods inherited from class Google::Apis::Core::BaseService
new(root_url : String, base_path : String)
new
Constructor Detail
Creates a new YouTubeService client configured for the YouTube Data API v3.
The base URL is set to www.googleapis.com/youtube/v3/.
Instance Method Detail
Sets the authorization credentials using an OAuth2 client. Extracts a valid access token from the client and applies it to all subsequent API requests. See https://developers.google.com/youtube/v3/guides/authentication
Sets the authorization credentials using a service account. Extracts a valid access token from the service account credentials and applies it to all subsequent API requests. See https://developers.google.com/youtube/v3/guides/authentication
Executes multiple API requests in a single HTTP connection using batch processing (max 50 requests).
Yields a BatchRequest object to which individual requests can be added.
Returns an array of HTTP responses, one per batched request.
Binds a live broadcast to a live stream, or removes an existing binding.
The id is the broadcast ID. Set stream_id to bind, or omit it to unbind the current stream.
Returns the updated LiveBroadcast resource.
See https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/bind
Deletes a caption track identified by id.
Returns Nil on success.
See https://developers.google.com/youtube/v3/docs/captions/delete
Deletes a channel section identified by id.
Returns Nil on success.
See https://developers.google.com/youtube/v3/docs/channelSections/delete
Deletes a comment identified by id.
Returns Nil on success.
See https://developers.google.com/youtube/v3/docs/comments/delete
Deletes a live broadcast identified by id.
The broadcast must be in "complete" or "testing" status to be deleted.
Returns Nil on success.
See https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/delete
Removes a ban from a live chat, allowing the user to send messages again.
The id is the ban ID. Returns Nil on success.
See https://developers.google.com/youtube/v3/live/docs/liveChatBans/delete
Deletes a live chat message identified by id.
Only the message author or a chat moderator can delete a message. Returns Nil on success.
See https://developers.google.com/youtube/v3/live/docs/liveChatMessages/delete
Removes a moderator from a live chat identified by id.
Returns Nil on success.
See https://developers.google.com/youtube/v3/live/docs/liveChatModerators/delete
Deletes a live stream identified by id.
Returns Nil on success.
See https://developers.google.com/youtube/v3/live/docs/liveStreams/delete
Deletes a playlist identified by id.
Returns Nil on success. Requires authorization.
See https://developers.google.com/youtube/v3/docs/playlists/delete
Deletes a playlist image identified by id.
Returns Nil on success.
See https://developers.google.com/youtube/v3/docs/playlistImages/delete
Removes an item from a playlist by its id.
Returns Nil on success.
See https://developers.google.com/youtube/v3/docs/playlistItems/delete
Removes a subscription identified by id.
Returns Nil on success.
See https://developers.google.com/youtube/v3/docs/subscriptions/delete
Deletes a third-party link identified by linking_token and type.
Returns Nil on success.
See https://developers.google.com/youtube/v3/docs/thirdPartyLinks/delete
Deletes a YouTube video identified by id.
Requires authorization with the appropriate scope. Returns Nil on success.
See https://developers.google.com/youtube/v3/docs/videos/delete
Downloads a caption track file. The id is the caption track ID. Use tfmt to specify the output format (e.g., "srt", "vtt", "sbv"). Use tlang to request a translated caption. The file is written to download_dest (file path or IO). See https://developers.google.com/youtube/v3/docs/captions/download
Retrieves the rating (like/dislike/none) that the authorized user gave to a video.
The id parameter is a comma-separated list of video IDs.
Returns a JSON::Any containing rating information for each requested video.
See https://developers.google.com/youtube/v3/docs/videos/getRating
Retrieves trainability information for a video.
The id parameter specifies the video ID. Returns a VideoTrainability resource.
See https://developers.google.com/youtube/v3/docs/videos
Submits an abuse report for a YouTube resource (e.g., video, comment, channel).
The abuse_report_object contains the report details as JSON. Returns the created report as JSON::Any.
See https://developers.google.com/youtube/v3/docs/abuseReports/insert
Uploads a caption track for a video.
The caption_object must include the video ID and language. Set sync to true to auto-sync timing.
Returns the newly created Caption resource.
See https://developers.google.com/youtube/v3/docs/captions/insert
Uploads a channel banner image. The returned URL can then be used with #update_channel to set the banner.
Provide the image via upload_source (file path or IO) with the appropriate content_type.
Returns a ChannelBannerResource containing the URL to use in the channel branding settings.
See https://developers.google.com/youtube/v3/docs/channelBanners/insert
Creates a new channel section (e.g., featured playlists, recent activity) on a channel page.
The channel_section_object defines the section type and content.
Returns the newly created ChannelSection resource.
See https://developers.google.com/youtube/v3/docs/channelSections/insert
Creates a reply to an existing comment.
The comment_object must include the parent comment ID and text content.
Returns the newly created Comment resource.
See https://developers.google.com/youtube/v3/docs/comments/insert
Creates a new top-level comment thread on a video or channel.
The comment_thread_object must include the channel/video ID and the top-level comment text.
Returns the newly created CommentThread resource.
See https://developers.google.com/youtube/v3/docs/commentThreads/insert
Creates a new live broadcast event.
The live_broadcast_object must include title, scheduled start time, and privacy status.
Returns the newly created LiveBroadcast resource.
See https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/insert
Inserts a cuepoint (ad break) into a live broadcast.
The id is the broadcast ID. The cuepoint_object contains cuepoint settings such as duration.
Returns the created Cuepoint resource.
See https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/cuepoint
Bans a user from a live chat, preventing them from sending messages.
The live_chat_ban_object must include the live chat ID, banned user channel ID, and ban type ("permanent" or "temporary").
Returns the newly created LiveChatBan resource.
See https://developers.google.com/youtube/v3/live/docs/liveChatBans/insert
Sends a message to a live broadcast's chat.
The live_chat_message_object must include the live chat ID and message text.
Returns the newly created LiveChatMessage resource.
See https://developers.google.com/youtube/v3/live/docs/liveChatMessages/insert
Adds a moderator to a live chat.
The live_chat_moderator_object must include the live chat ID and the channel ID of the user to promote.
Returns the newly created LiveChatModerator resource.
See https://developers.google.com/youtube/v3/live/docs/liveChatModerators/insert
Creates a new live stream for the authenticated user.
The live_stream_object must include CDN settings and a title.
Returns the newly created LiveStream resource with ingestion info.
See https://developers.google.com/youtube/v3/live/docs/liveStreams/insert
Creates a new playlist for the authenticated user.
The part parameter specifies which properties are set in playlist_object (e.g., "snippet,status").
Returns the newly created Playlist resource.
See https://developers.google.com/youtube/v3/docs/playlists/insert
Uploads and associates an image with a playlist.
Provide the image via upload_source (file path or IO) with the appropriate content_type.
If no upload_source is given, creates the image from playlist_image_object metadata only.
Returns the newly created PlaylistImage resource.
See https://developers.google.com/youtube/v3/docs/playlistImages/insert
Adds a resource (video) to a playlist.
The playlist_item_object must include the playlist ID and the resource to add.
Returns the newly created PlaylistItem resource.
See https://developers.google.com/youtube/v3/docs/playlistItems/insert
Subscribes the authenticated user to a channel.
The subscription_object must include the channel ID to subscribe to.
Returns the newly created Subscription resource.
See https://developers.google.com/youtube/v3/docs/subscriptions/insert
Inserts a test item (internal/testing endpoint).
The test_item_object contains the test data. Returns the created TestItem.
Creates a new third-party link between a YouTube channel and an external platform.
The third_party_link_object defines the link details. Returns the newly created ThirdPartyLink.
See https://developers.google.com/youtube/v3/docs/thirdPartyLinks/insert
Uploads a video to YouTube with the given metadata.
The part parameter specifies which properties are included in the video_object (e.g., "snippet,status").
Set notify_subscribers to false to suppress notification to channel subscribers.
Returns the newly created Video resource.
See https://developers.google.com/youtube/v3/docs/videos/insert
Retrieves a list of channel activity events (uploads, likes, favorites, etc.).
The part parameter specifies which properties to include (e.g., "snippet,contentDetails").
Filter by channel_id or mine. Use published_after/published_before for date ranges.
Returns a ListActivitiesResponse with pagination support.
See https://developers.google.com/youtube/v3/docs/activities/list
Retrieves a list of caption tracks associated with the specified video.
The video_id is required. Optionally filter by id (comma-separated caption track IDs).
Returns a ListCaptionsResponse.
See https://developers.google.com/youtube/v3/docs/captions/list
Retrieves a list of channel sections for the specified channel.
The part parameter specifies which properties to include (e.g., "snippet,contentDetails").
Filter by channel_id, id, or mine. Returns a ListChannelSectionsResponse.
See https://developers.google.com/youtube/v3/docs/channelSections/list
Retrieves a list of YouTube channels matching the specified criteria.
The part parameter specifies which properties to include (e.g., "snippet,statistics,contentDetails").
Filter by id, for_username, for_handle, mine (authenticated user's channel), or category_id.
Returns a ListChannelsResponse with pagination support.
See https://developers.google.com/youtube/v3/docs/channels/list
Retrieves a list of comments matching the specified criteria.
The part parameter specifies which properties to include (e.g., "snippet").
Filter by id for specific comments or parent_id for replies to a top-level comment.
Returns a ListCommentsResponse with pagination support.
See https://developers.google.com/youtube/v3/docs/comments/list
Retrieves a list of application languages that the YouTube website supports.
Use hl to specify the language for localized names. Returns a ListI18nLanguagesResponse.
See https://developers.google.com/youtube/v3/docs/i18nLanguages/list
Retrieves a list of content regions that the YouTube website supports.
Use hl to specify the language for localized region names. Returns a ListI18nRegionsResponse.
See https://developers.google.com/youtube/v3/docs/i18nRegions/list
Retrieves a list of live broadcasts matching the specified criteria.
The part parameter specifies which properties to include (e.g., "snippet,status,contentDetails").
Filter by broadcast_status ("active", "all", "completed", "upcoming"), id, or mine.
Returns a ListLiveBroadcastsResponse with pagination support.
See https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/list
Retrieves live chat messages from a live broadcast's chat.
The live_chat_id identifies the chat. Use page_token for polling new messages.
Returns a LiveChatMessageListResponse with messages and a polling interval.
See https://developers.google.com/youtube/v3/live/docs/liveChatMessages/list
Retrieves a list of moderators for a live chat.
The live_chat_id identifies the chat. Returns a LiveChatModeratorListResponse with pagination support.
See https://developers.google.com/youtube/v3/live/docs/liveChatModerators/list
Retrieves a list of live streams owned by the authenticated user.
The part parameter specifies which properties to include (e.g., "snippet,cdn,status").
Filter by id or mine. Returns a ListLiveStreamsResponse with pagination support.
See https://developers.google.com/youtube/v3/live/docs/liveStreams/list
Retrieves a list of channel members (sponsors) for the authenticated user's channel.
Filter by filter_by_member_channel_id for specific members, or has_access_to_level for a membership level.
The mode parameter controls listing mode ("list_by_member" or "list_by_newest").
Returns a MemberListResponse with pagination support.
See https://developers.google.com/youtube/v3/docs/members/list
Retrieves all membership levels defined for the authenticated user's channel.
Returns a MembershipsLevelListResponse containing the available pricing levels.
See https://developers.google.com/youtube/v3/docs/membershipsLevels/list
Retrieves a list of images associated with a playlist.
Use parent to specify the playlist ID. Returns a PlaylistImageListResponse with pagination support.
See https://developers.google.com/youtube/v3/docs/playlistImages/list
Retrieves a list of items in a playlist.
The part parameter specifies which properties to include (e.g., "snippet,contentDetails").
Filter by playlist_id to get items from a specific playlist, or id for specific item IDs.
Returns a ListPlaylistItemsResponse with pagination support.
See https://developers.google.com/youtube/v3/docs/playlistItems/list
Retrieves a list of playlists matching the specified criteria.
The part parameter specifies which properties to include (e.g., "snippet,contentDetails").
Filter by channel_id, id (comma-separated playlist IDs), or mine for the authenticated user's playlists.
Returns a ListPlaylistsResponse with pagination support.
See https://developers.google.com/youtube/v3/docs/playlists/list
Searches for YouTube resources (videos, channels, playlists) matching the given query parameters.
The part parameter specifies the resource properties to include (e.g., "snippet").
Filter by q (search query), type (video/channel/playlist), channel_id, region_code, and many more.
Returns a SearchListsResponse containing matching results with pagination support via page_token.
See https://developers.google.com/youtube/v3/docs/search/list
Retrieves a list of subscriptions matching the specified criteria.
The part parameter specifies which properties to include (e.g., "snippet,contentDetails").
Filter by channel_id, mine (authenticated user), my_subscribers, or id.
Returns a ListSubscriptionsResponse with pagination support.
See https://developers.google.com/youtube/v3/docs/subscriptions/list
Retrieves a list of Super Chat events for the authenticated user's channel.
Super Chat events represent paid messages from viewers during live streams.
Returns a SuperChatEventListResponse with pagination support.
See https://developers.google.com/youtube/v3/docs/superChatEvents/list
Retrieves a list of third-party links associated with a channel.
Filter by linking_token, type, or external_channel_id.
Returns a ThirdPartyLinkListResponse.
See https://developers.google.com/youtube/v3/docs/thirdPartyLinks/list
Retrieves the list of valid reasons for reporting a video as abusive.
Use hl for localized reason descriptions. Returns a ListVideoAbuseReportReasonResponse.
See https://developers.google.com/youtube/v3/docs/videoAbuseReportReasons/list
Retrieves a list of video categories available in the specified region.
Filter by id (comma-separated category IDs) or region_code. Use hl for localized category names.
Returns a ListVideoCategoriesResponse.
See https://developers.google.com/youtube/v3/docs/videoCategories/list
Retrieves a list of videos matching the specified criteria.
The part parameter specifies which resource properties to include (e.g., "snippet,contentDetails,statistics").
Filter by id (comma-separated video IDs), chart (mostPopular), or my_rating (like/dislike).
Returns a ListVideosResponse with pagination support via page_token.
See https://developers.google.com/youtube/v3/docs/videos/list
Flags one or more comments as spam. The id parameter is a comma-separated list of comment IDs to flag. See https://developers.google.com/youtube/v3/docs/comments/markAsSpam
Adds a like or dislike rating to a video, or removes a rating. The id is the video ID and rating must be one of "like", "dislike", or "none". See https://developers.google.com/youtube/v3/docs/videos/rate
Reports a video as abusive by submitting a video abuse report.
The video_abuse_report_object must include the video ID, reason ID, and optionally a secondary reason ID.
Returns Nil on success.
See https://developers.google.com/youtube/v3/docs/videos/reportAbuse
Sets the moderation status of one or more comments. The moderation_status can be "published", "heldForReview", or "rejected". Set ban_author to true to also ban the comment author from making future comments. See https://developers.google.com/youtube/v3/docs/comments/setModerationStatus
Sets a custom thumbnail image for a video.
The video_id identifies the video to set the thumbnail for.
Returns a SetThumbnailResponse containing the thumbnail URLs.
See https://developers.google.com/youtube/v3/docs/thumbnails/set
Sets a watermark image for a channel's videos.
The channel_id identifies the target channel and invideo_branding_object contains the watermark configuration.
Returns Nil on success.
See https://developers.google.com/youtube/v3/docs/watermarks/set
Streams live chat messages via a persistent connection for real-time updates.
The live_chat_id identifies the chat. Use page_token for continuation.
Returns a LiveChatMessageListResponse with messages and polling metadata.
Transitions a live broadcast to a new status (e.g., "testing", "live", "complete").
The broadcast_status specifies the target status. The broadcast must be bound to a stream first.
Returns the updated LiveBroadcast resource.
See https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/transition
Transitions a live chat message to a new status.
The id is the message ID and status is the target status.
Returns Nil on success.
Removes the watermark image from a channel's videos.
The channel_id identifies the channel to remove the watermark from.
Returns Nil on success.
See https://developers.google.com/youtube/v3/docs/watermarks/unset
Updates an existing caption track's metadata or replaces the caption data.
Set sync to true to have YouTube auto-sync the updated caption timing.
Returns the updated Caption resource.
See https://developers.google.com/youtube/v3/docs/captions/update
Updates a channel's metadata (e.g., branding settings, localized info).
The part parameter specifies which properties in channel_object will be updated.
Returns the updated Channel resource.
See https://developers.google.com/youtube/v3/docs/channels/update
Updates an existing channel section's metadata.
The channel_section_object must include the section ID and updated properties.
Returns the updated ChannelSection resource.
See https://developers.google.com/youtube/v3/docs/channelSections/update
Updates an existing comment's text.
The comment_object must include the comment ID and updated text.
Returns the updated Comment resource.
See https://developers.google.com/youtube/v3/docs/comments/update
Updates an existing comment thread (e.g., modifies the top-level comment text).
The comment_thread_object must include the thread ID and updated properties.
Returns the updated CommentThread resource.
See https://developers.google.com/youtube/v3/docs/commentThreads
Updates an existing live broadcast's metadata (e.g., title, description, scheduled times).
The live_broadcast_object must include the broadcast ID and updated properties.
Returns the updated LiveBroadcast resource.
See https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/update
Updates an existing live stream's metadata.
The live_stream_object must include the stream ID and updated properties.
Returns the updated LiveStream resource.
See https://developers.google.com/youtube/v3/live/docs/liveStreams/update
Updates a playlist's metadata (e.g., title, description, privacy status).
The part parameter specifies which properties in playlist_object will be updated.
Returns the updated Playlist resource.
See https://developers.google.com/youtube/v3/docs/playlists/update
Updates an existing playlist image, optionally replacing the image data.
Provide a new image via upload_source (file path or IO) with the appropriate content_type.
Returns the updated PlaylistImage resource.
See https://developers.google.com/youtube/v3/docs/playlistImages/update
Updates a playlist item (e.g., changes its position in the playlist or updates the video note).
The playlist_item_object must include the item ID and updated properties.
Returns the updated PlaylistItem resource.
See https://developers.google.com/youtube/v3/docs/playlistItems/update
Updates an existing third-party link's metadata.
The third_party_link_object must include the link ID and updated properties.
Returns the updated ThirdPartyLink resource.
See https://developers.google.com/youtube/v3/docs/thirdPartyLinks/update
Updates a video's metadata.
The part parameter specifies which properties in video_object will be updated.
The video ID must be set in the video_object. Returns the updated Video resource.
See https://developers.google.com/youtube/v3/docs/videos/update