Class: AppleMusic::Artist::Relationships

Inherits:
Object
  • Object
show all
Defined in:
lib/apple_music/artist/relationships.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(props = {}) ⇒ Relationships

Returns a new instance of Relationships.



9
10
11
12
13
14
15
# File 'lib/apple_music/artist/relationships.rb', line 9

def initialize(props = {})
  @albums = Relationship.new(props['albums']).data
  @genres = Relationship.new(props['genres']).data
  @music_videos = Relationship.new(props['musicVideos']).data
  @playlists = Relationship.new(props['playlists']).data
  @station = Relationship.new(props['station']).data.first
end

Instance Attribute Details

#albumsObject (readonly)

Returns the value of attribute albums.



7
8
9
# File 'lib/apple_music/artist/relationships.rb', line 7

def albums
  @albums
end

#genresObject (readonly)

Returns the value of attribute genres.



7
8
9
# File 'lib/apple_music/artist/relationships.rb', line 7

def genres
  @genres
end

#music_videosObject (readonly)

Returns the value of attribute music_videos.



7
8
9
# File 'lib/apple_music/artist/relationships.rb', line 7

def music_videos
  @music_videos
end

#playlistsObject (readonly)

Returns the value of attribute playlists.



7
8
9
# File 'lib/apple_music/artist/relationships.rb', line 7

def playlists
  @playlists
end

#stationObject (readonly)

Returns the value of attribute station.



7
8
9
# File 'lib/apple_music/artist/relationships.rb', line 7

def station
  @station
end