Class: AppleMusic::MusicVideo::Attributes
- Inherits:
-
Object
- Object
- AppleMusic::MusicVideo::Attributes
- Defined in:
- lib/apple_music/music_video/attributes.rb
Overview
Instance Attribute Summary collapse
-
#album_name ⇒ Object
readonly
Returns the value of attribute album_name.
-
#artist_name ⇒ Object
readonly
Returns the value of attribute artist_name.
-
#artwork ⇒ Object
readonly
Returns the value of attribute artwork.
-
#content_rating ⇒ Object
readonly
Returns the value of attribute content_rating.
-
#duration_in_millis ⇒ Object
readonly
Returns the value of attribute duration_in_millis.
-
#editorial_notes ⇒ Object
readonly
Returns the value of attribute editorial_notes.
-
#genre_names ⇒ Object
readonly
Returns the value of attribute genre_names.
-
#has_4k ⇒ Object
readonly
Returns the value of attribute has_4k.
-
#has_hdr ⇒ Object
readonly
Returns the value of attribute has_hdr.
-
#isrc ⇒ Object
readonly
Returns the value of attribute isrc.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#play_params ⇒ Object
readonly
Returns the value of attribute play_params.
-
#previews ⇒ Object
readonly
Returns the value of attribute previews.
-
#release_date ⇒ Object
readonly
Returns the value of attribute release_date.
-
#track_number ⇒ Object
readonly
Returns the value of attribute track_number.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#video_sub_type ⇒ Object
readonly
Returns the value of attribute video_sub_type.
Instance Method Summary collapse
- #has_4k? ⇒ Boolean
- #has_hdr? ⇒ Boolean
-
#initialize(props = {}) ⇒ Attributes
constructor
A new instance of Attributes.
Constructor Details
#initialize(props = {}) ⇒ Attributes
Returns a new instance of Attributes.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/apple_music/music_video/attributes.rb', line 11 def initialize(props = {}) @album_name = props['albumName'] @artist_name = props['artistName'] # required @artwork = Artwork.new(props['artwork']) # required @content_rating = props['contentRating'] @duration_in_millis = props['durationInMillis'] @editorial_notes = EditorialNotes.new(props['editorialNotes']) if props['editorialNotes'] @genre_names = props['genreNames'] # required @isrc = props['isrc'] # required @name = props['name'] # required @play_params = PlayParameters.new(props['playParams']) if props['playParams'] @previews = Array(props['previews']).map { |attrs| Preview.new(attrs) } # required @release_date = Date.parse(props['releaseDate']) # required @track_number = props['trackNumber'] @url = props['url'] # required @video_sub_type = props['videoSubType'] @has_hdr = props['hasHDR'] # required @has_4k = props['has4K'] # required end |
Instance Attribute Details
#album_name ⇒ Object (readonly)
Returns the value of attribute album_name.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def album_name @album_name end |
#artist_name ⇒ Object (readonly)
Returns the value of attribute artist_name.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def artist_name @artist_name end |
#artwork ⇒ Object (readonly)
Returns the value of attribute artwork.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def artwork @artwork end |
#content_rating ⇒ Object (readonly)
Returns the value of attribute content_rating.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def @content_rating end |
#duration_in_millis ⇒ Object (readonly)
Returns the value of attribute duration_in_millis.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def duration_in_millis @duration_in_millis end |
#editorial_notes ⇒ Object (readonly)
Returns the value of attribute editorial_notes.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def editorial_notes @editorial_notes end |
#genre_names ⇒ Object (readonly)
Returns the value of attribute genre_names.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def genre_names @genre_names end |
#has_4k ⇒ Object (readonly)
Returns the value of attribute has_4k.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def has_4k @has_4k end |
#has_hdr ⇒ Object (readonly)
Returns the value of attribute has_hdr.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def has_hdr @has_hdr end |
#isrc ⇒ Object (readonly)
Returns the value of attribute isrc.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def isrc @isrc end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def name @name end |
#play_params ⇒ Object (readonly)
Returns the value of attribute play_params.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def play_params @play_params end |
#previews ⇒ Object (readonly)
Returns the value of attribute previews.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def previews @previews end |
#release_date ⇒ Object (readonly)
Returns the value of attribute release_date.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def release_date @release_date end |
#track_number ⇒ Object (readonly)
Returns the value of attribute track_number.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def track_number @track_number end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def url @url end |
#video_sub_type ⇒ Object (readonly)
Returns the value of attribute video_sub_type.
7 8 9 |
# File 'lib/apple_music/music_video/attributes.rb', line 7 def video_sub_type @video_sub_type end |
Instance Method Details
#has_4k? ⇒ Boolean
35 36 37 |
# File 'lib/apple_music/music_video/attributes.rb', line 35 def has_4k? has_4k end |
#has_hdr? ⇒ Boolean
31 32 33 |
# File 'lib/apple_music/music_video/attributes.rb', line 31 def has_hdr? has_hdr end |