From aeaefd50b2a36443a13b5bb9272a528ae0d04a70 Mon Sep 17 00:00:00 2001 From: Kang-Kyu Lee Date: Mon, 8 Dec 2025 11:59:57 -0800 Subject: [PATCH 1/4] Add player data when player part added --- lib/yt/collections/videos.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/yt/collections/videos.rb b/lib/yt/collections/videos.rb index 05126770..bad00852 100644 --- a/lib/yt/collections/videos.rb +++ b/lib/yt/collections/videos.rb @@ -27,6 +27,7 @@ def attributes_for_new_item(data) attributes[:statistics] = data['statistics'] attributes[:video_category] = data['videoCategory'] attributes[:claim] = data['claim'] + attributes[:player] = data['player'] attributes[:auth] = @auth end end From c393df854a6cff82a381567ccc40a666e4608d78 Mon Sep 17 00:00:00 2001 From: Kang-Kyu Lee Date: Mon, 15 Dec 2025 11:55:17 -0800 Subject: [PATCH 2/4] email_verified field to UserInfo --- lib/yt/models/user_info.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/yt/models/user_info.rb b/lib/yt/models/user_info.rb index 20caa81d..82606ad2 100644 --- a/lib/yt/models/user_info.rb +++ b/lib/yt/models/user_info.rb @@ -22,6 +22,7 @@ def initialize(options = {}) has_attribute :gender, default: '' has_attribute :locale, default: '' has_attribute :hd, default: '' + has_attribute :email_verified, default: false, camelize: false end end end From 518579eb879943b4a4724d9113427fad9aae7bf5 Mon Sep 17 00:00:00 2001 From: Kang-Kyu Lee Date: Fri, 20 Mar 2026 14:49:53 -0700 Subject: [PATCH 3/4] Add custom_url field of channel snippet --- lib/yt/collections/channels.rb | 2 +- lib/yt/models/channel.rb | 4 ++++ lib/yt/models/snippet.rb | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/yt/collections/channels.rb b/lib/yt/collections/channels.rb index cf388871..e5797151 100644 --- a/lib/yt/collections/channels.rb +++ b/lib/yt/collections/channels.rb @@ -28,4 +28,4 @@ def channels_params end end end -end \ No newline at end of file +end diff --git a/lib/yt/models/channel.rb b/lib/yt/models/channel.rb index 23cf963a..3c853c8c 100644 --- a/lib/yt/models/channel.rb +++ b/lib/yt/models/channel.rb @@ -12,6 +12,10 @@ class Channel < Resource # @return [String] the channel’s title. delegate :title, to: :snippet + # @!attribute [r] custom_url + # @return [String] the channel’s handle or custom identifier. + delegate :custom_url, to: :snippet + # @!attribute [r] description # @return [String] the channel’s description. delegate :description, to: :snippet diff --git a/lib/yt/models/snippet.rb b/lib/yt/models/snippet.rb index b1ec0e2d..8dbef40f 100644 --- a/lib/yt/models/snippet.rb +++ b/lib/yt/models/snippet.rb @@ -19,6 +19,7 @@ def initialize(options = {}) end has_attribute :title, default: '' + has_attribute :custom_url, default: '' has_attribute :description, default: '' has_attribute :published_at, type: Time has_attribute :channel_id From 9b7c559dba87d1697d2bb4ecf689477ec945e561 Mon Sep 17 00:00:00 2001 From: Kang-Kyu Lee Date: Fri, 20 Mar 2026 15:03:07 -0700 Subject: [PATCH 4/4] Add id_token --- lib/yt/models/authentication.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/yt/models/authentication.rb b/lib/yt/models/authentication.rb index 5a317e64..18023097 100644 --- a/lib/yt/models/authentication.rb +++ b/lib/yt/models/authentication.rb @@ -1,7 +1,7 @@ module Yt module Models # Provides methods to authenticate with YouTube (and Google) API. - # @see https://developers.google.com/accounts/docs/OAuth2 + # @see https://developers.google.com/identity/protocols/oauth2 class Authentication # Before your application can access private data using a Google API, @@ -52,11 +52,15 @@ class Authentication # @return [Time] the time when access token no longer works. attr_reader :expires_at + # @return [String] the OAuth2 Google id_token. + attr_reader :id_token + def initialize(data = {}) @access_token = data['access_token'] @refresh_token = data['refresh_token'] @error = data['error'] @expires_at = expiration_date data.slice('expires_at', 'expires_in') + @id_token = data['id_token'] end # @return [Boolean] whether the access token has expired. @@ -80,4 +84,4 @@ def expiration_date(options = {}) end end end -end \ No newline at end of file +end