Class: YouTube::VideoDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/youtube.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#authorObject (readonly)

Returns the value of attribute author.



249
250
251
# File 'lib/youtube.rb', line 249

def author
  @author
end

#channel_listObject (readonly)

Returns the value of attribute channel_list.



250
251
252
# File 'lib/youtube.rb', line 250

def channel_list
  @channel_list
end

#comment_listObject (readonly)

Returns the value of attribute comment_list.



251
252
253
# File 'lib/youtube.rb', line 251

def comment_list
  @comment_list
end

#descriptionObject (readonly)

Returns the value of attribute description.



252
253
254
# File 'lib/youtube.rb', line 252

def description
  @description
end

#length_secondsObject (readonly)

Returns the value of attribute length_seconds.



253
254
255
# File 'lib/youtube.rb', line 253

def length_seconds
  @length_seconds
end

#rating_avgObject (readonly)

Returns the value of attribute rating_avg.



254
255
256
# File 'lib/youtube.rb', line 254

def rating_avg
  @rating_avg
end

#rating_countObject (readonly)

Returns the value of attribute rating_count.



255
256
257
# File 'lib/youtube.rb', line 255

def rating_count
  @rating_count
end

#recoding_locationObject (readonly)

Returns the value of attribute recoding_location.



256
257
258
# File 'lib/youtube.rb', line 256

def recoding_location
  @recoding_location
end

#recording_countryObject (readonly)

Returns the value of attribute recording_country.



257
258
259
# File 'lib/youtube.rb', line 257

def recording_country
  @recording_country
end

#recording_dateObject (readonly)

Returns the value of attribute recording_date.



258
259
260
# File 'lib/youtube.rb', line 258

def recording_date
  @recording_date
end

#tagsObject (readonly)

Returns the value of attribute tags.



259
260
261
# File 'lib/youtube.rb', line 259

def tags
  @tags
end

#thumbnail_urlObject (readonly)

Returns the value of attribute thumbnail_url.



260
261
262
# File 'lib/youtube.rb', line 260

def thumbnail_url
  @thumbnail_url
end

#titleObject (readonly)

Returns the value of attribute title.



261
262
263
# File 'lib/youtube.rb', line 261

def title
  @title
end

#update_timeObject (readonly)

Returns the value of attribute update_time.



262
263
264
# File 'lib/youtube.rb', line 262

def update_time
  @update_time
end

#upload_timeObject (readonly)

Returns the value of attribute upload_time.



263
264
265
# File 'lib/youtube.rb', line 263

def upload_time
  @upload_time
end

#view_countObject (readonly)

Returns the value of attribute view_count.



264
265
266
# File 'lib/youtube.rb', line 264

def view_count
  @view_count
end