Class: YouTube::Playlist
- Defined in:
- lib/you_tube/objects/playlist.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Playlist
constructor
A new instance of Playlist.
Methods inherited from Object
Constructor Details
#initialize(options = {}) ⇒ Playlist
Returns a new instance of Playlist.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/you_tube/objects/playlist.rb', line 4 def initialize( = {}) super if ["snippet"] self.title = ["snippet"]["title"] self.description = ["snippet"]["description"] self.published_at = ["snippet"]["publishedAt"] if ["snippet"]["thumbnails"] thumb = ["snippet"]["thumbnails"] self.thumbnail_default = thumb["default"]["url"] if thumb["default"] self.thumbnail_medium = thumb["medium"]["url"] if thumb["medium"] self.thumbnail_high = thumb["high"]["url"] if thumb["high"] self.thumbnail_standard = thumb["standard"]["url"] if thumb["standard"] self.thumbnail_maxres = thumb["maxres"]["url"] if thumb["maxres"] end end if ["status"] self.privacy_status = ["status"]["privacyStatus"] end end |