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.
-
#embed_allowed ⇒ Object
readonly
Returns the value of attribute embed_allowed.
-
#embed_status ⇒ Object
readonly
Returns the value of attribute embed_status.
-
#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.
-
#recording_country ⇒ Object
readonly
Returns the value of attribute recording_country.
-
#recording_date ⇒ Object
readonly
Returns the value of attribute recording_date.
-
#recording_location ⇒ Object
readonly
Returns the value of attribute recording_location.
-
#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.
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/youtube.rb', line 347 def initialize(payload) @author = payload['author'].to_s @channel_list = payload['channel_list'] @comment_list = payload['comment_list'] @description = payload['description'].to_s @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'].to_s @recording_date = payload['recording_date'].to_s @recording_location = payload['recording_location'].to_s @tags = payload['tags'] @thumbnail_url = payload['thumbnail_url'] @title = payload['title'].to_s @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 @embed_status = payload['embed_status'] @embed_allowed = ( payload['embed_status'] == "ok" ) end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
328 329 330 |
# File 'lib/youtube.rb', line 328 def @author end |
#channel_list ⇒ Object (readonly)
Returns the value of attribute channel_list.
329 330 331 |
# File 'lib/youtube.rb', line 329 def channel_list @channel_list end |
#comment_list ⇒ Object (readonly)
Returns the value of attribute comment_list.
330 331 332 |
# File 'lib/youtube.rb', line 330 def comment_list @comment_list end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
331 332 333 |
# File 'lib/youtube.rb', line 331 def description @description end |
#embed_allowed ⇒ Object (readonly)
Returns the value of attribute embed_allowed.
345 346 347 |
# File 'lib/youtube.rb', line 345 def @embed_allowed end |
#embed_status ⇒ Object (readonly)
Returns the value of attribute embed_status.
344 345 346 |
# File 'lib/youtube.rb', line 344 def @embed_status end |
#length_seconds ⇒ Object (readonly)
Returns the value of attribute length_seconds.
332 333 334 |
# File 'lib/youtube.rb', line 332 def length_seconds @length_seconds end |
#rating_avg ⇒ Object (readonly)
Returns the value of attribute rating_avg.
333 334 335 |
# File 'lib/youtube.rb', line 333 def @rating_avg end |
#rating_count ⇒ Object (readonly)
Returns the value of attribute rating_count.
334 335 336 |
# File 'lib/youtube.rb', line 334 def @rating_count end |
#recording_country ⇒ Object (readonly)
Returns the value of attribute recording_country.
336 337 338 |
# File 'lib/youtube.rb', line 336 def recording_country @recording_country end |
#recording_date ⇒ Object (readonly)
Returns the value of attribute recording_date.
337 338 339 |
# File 'lib/youtube.rb', line 337 def recording_date @recording_date end |
#recording_location ⇒ Object (readonly)
Returns the value of attribute recording_location.
335 336 337 |
# File 'lib/youtube.rb', line 335 def recording_location @recording_location end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
338 339 340 |
# File 'lib/youtube.rb', line 338 def @tags end |
#thumbnail_url ⇒ Object (readonly)
Returns the value of attribute thumbnail_url.
339 340 341 |
# File 'lib/youtube.rb', line 339 def thumbnail_url @thumbnail_url end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
340 341 342 |
# File 'lib/youtube.rb', line 340 def title @title end |
#update_time ⇒ Object (readonly)
Returns the value of attribute update_time.
341 342 343 |
# File 'lib/youtube.rb', line 341 def update_time @update_time end |
#upload_time ⇒ Object (readonly)
Returns the value of attribute upload_time.
342 343 344 |
# File 'lib/youtube.rb', line 342 def upload_time @upload_time end |
#view_count ⇒ Object (readonly)
Returns the value of attribute view_count.
343 344 345 |
# File 'lib/youtube.rb', line 343 def view_count @view_count end |