File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,4 +28,4 @@ def channels_params
2828 end
2929 end
3030 end
31- end
31+ end
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ def attributes_for_new_item(data)
2727 attributes [ :statistics ] = data [ 'statistics' ]
2828 attributes [ :video_category ] = data [ 'videoCategory' ]
2929 attributes [ :claim ] = data [ 'claim' ]
30+ attributes [ :player ] = data [ 'player' ]
3031 attributes [ :auth ] = @auth
3132 end
3233 end
Original file line number Diff line number Diff line change 11module Yt
22 module Models
33 # Provides methods to authenticate with YouTube (and Google) API.
4- # @see https://developers.google.com/accounts/docs/OAuth2
4+ # @see https://developers.google.com/identity/protocols/oauth2
55 class Authentication
66
77 # Before your application can access private data using a Google API,
@@ -52,11 +52,15 @@ class Authentication
5252 # @return [Time] the time when access token no longer works.
5353 attr_reader :expires_at
5454
55+ # @return [String] the OAuth2 Google id_token.
56+ attr_reader :id_token
57+
5558 def initialize ( data = { } )
5659 @access_token = data [ 'access_token' ]
5760 @refresh_token = data [ 'refresh_token' ]
5861 @error = data [ 'error' ]
5962 @expires_at = expiration_date data . slice ( 'expires_at' , 'expires_in' )
63+ @id_token = data [ 'id_token' ]
6064 end
6165
6266 # @return [Boolean] whether the access token has expired.
@@ -80,4 +84,4 @@ def expiration_date(options = {})
8084 end
8185 end
8286 end
83- end
87+ end
Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ class Channel < Resource
1212 # @return [String] the channel’s title.
1313 delegate :title , to : :snippet
1414
15+ # @!attribute [r] custom_url
16+ # @return [String] the channel’s handle or custom identifier.
17+ delegate :custom_url , to : :snippet
18+
1519 # @!attribute [r] description
1620 # @return [String] the channel’s description.
1721 delegate :description , to : :snippet
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ def initialize(options = {})
1919 end
2020
2121 has_attribute :title , default : ''
22+ has_attribute :custom_url , default : ''
2223 has_attribute :description , default : ''
2324 has_attribute :published_at , type : Time
2425 has_attribute :channel_id
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ def initialize(options = {})
2222 has_attribute :gender , default : ''
2323 has_attribute :locale , default : ''
2424 has_attribute :hd , default : ''
25+ has_attribute :email_verified , default : false , camelize : false
2526 end
2627 end
2728end
You can’t perform that action at this time.
0 commit comments