Class: YouTube::VideoDetails
- Inherits:
-
Object
- Object
- YouTube::VideoDetails
- Defined in:
- lib/youtube.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#channel_list ⇒ Object
readonly
Returns the value of attribute channel_list.
-
#comment_list ⇒ Object
readonly
Returns the value of attribute comment_list.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#length_seconds ⇒ Object
readonly
Returns the value of attribute length_seconds.
-
#rating_avg ⇒ Object
readonly
Returns the value of attribute rating_avg.
-
#rating_count ⇒ Object
readonly
Returns the value of attribute rating_count.
-
#recoding_location ⇒ Object
readonly
Returns the value of attribute recoding_location.
-
#recording_country ⇒ Object
readonly
Returns the value of attribute recording_country.
-
#recording_date ⇒ Object
readonly
Returns the value of attribute recording_date.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#thumbnail_url ⇒ Object
readonly
Returns the value of attribute thumbnail_url.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#update_time ⇒ Object
readonly
Returns the value of attribute update_time.
-
#upload_time ⇒ Object
readonly
Returns the value of attribute upload_time.
-
#view_count ⇒ Object
readonly
Returns the value of attribute view_count.
Instance Method Summary collapse
-
#initialize(payload) ⇒ VideoDetails
constructor
A new instance of VideoDetails.
Constructor Details
#initialize(payload) ⇒ VideoDetails
Returns a new instance of VideoDetails.
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/youtube.rb', line 266 def initialize(payload) @author = payload['author'] @channel_list = payload['channel_list'] @comment_list = payload['comment_list'] @description = payload['description'] @length_seconds = payload['length_seconds'].to_i @rating_avg = payload['rating_avg'].to_f @rating_count = payload['rating_count'].to_i @recording_country = payload['recording_country'] @recording_date = payload['recording_date'] @recording_location = payload['recording_location'] @tags = payload['tags'] @thumbnail_url = payload['thumbnail_url'] @title = payload['title'] @update_time = YouTube._string_to_time(payload['update_time']) @upload_time = YouTube._string_to_time(payload['upload_time']) @view_count = payload['view_count'].to_i end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
249 250 251 |
# File 'lib/youtube.rb', line 249 def @author end |
#channel_list ⇒ Object (readonly)
Returns the value of attribute channel_list.
250 251 252 |
# File 'lib/youtube.rb', line 250 def channel_list @channel_list end |
#comment_list ⇒ Object (readonly)
Returns the value of attribute comment_list.
251 252 253 |
# File 'lib/youtube.rb', line 251 def comment_list @comment_list end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
252 253 254 |
# File 'lib/youtube.rb', line 252 def description @description end |
#length_seconds ⇒ Object (readonly)
Returns the value of attribute length_seconds.
253 254 255 |
# File 'lib/youtube.rb', line 253 def length_seconds @length_seconds end |
#rating_avg ⇒ Object (readonly)
Returns the value of attribute rating_avg.
254 255 256 |
# File 'lib/youtube.rb', line 254 def @rating_avg end |
#rating_count ⇒ Object (readonly)
Returns the value of attribute rating_count.
255 256 257 |
# File 'lib/youtube.rb', line 255 def @rating_count end |
#recoding_location ⇒ Object (readonly)
Returns the value of attribute recoding_location.
256 257 258 |
# File 'lib/youtube.rb', line 256 def recoding_location @recoding_location end |
#recording_country ⇒ Object (readonly)
Returns the value of attribute recording_country.
257 258 259 |
# File 'lib/youtube.rb', line 257 def recording_country @recording_country end |
#recording_date ⇒ Object (readonly)
Returns the value of attribute recording_date.
258 259 260 |
# File 'lib/youtube.rb', line 258 def recording_date @recording_date end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
259 260 261 |
# File 'lib/youtube.rb', line 259 def @tags end |
#thumbnail_url ⇒ Object (readonly)
Returns the value of attribute thumbnail_url.
260 261 262 |
# File 'lib/youtube.rb', line 260 def thumbnail_url @thumbnail_url end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
261 262 263 |
# File 'lib/youtube.rb', line 261 def title @title end |
#update_time ⇒ Object (readonly)
Returns the value of attribute update_time.
262 263 264 |
# File 'lib/youtube.rb', line 262 def update_time @update_time end |
#upload_time ⇒ Object (readonly)
Returns the value of attribute upload_time.
263 264 265 |
# File 'lib/youtube.rb', line 263 def upload_time @upload_time end |
#view_count ⇒ Object (readonly)
Returns the value of attribute view_count.
264 265 266 |
# File 'lib/youtube.rb', line 264 def view_count @view_count end |