Class: SimpleSpotify::Model::Artist

Inherits:
Object
  • Object
show all
Includes:
Resource
Defined in:
lib/simplespotify/models/artist.rb

Instance Method Summary collapse

Methods included from Resource

included

Instance Method Details

#albums!(client = nil) ⇒ Object



35
36
37
38
# File 'lib/simplespotify/models/artist.rb', line 35

def albums! client=nil
  client ||= SimpleSpotify.default_client
  @albums = client.artist_albums(id)
end


21
22
23
# File 'lib/simplespotify/models/artist.rb', line 21

def related_artists client=nil
  @related_artists || related_artists!(client)
end


16
17
18
19
# File 'lib/simplespotify/models/artist.rb', line 16

def related_artists! client=nil
  client ||= SimpleSpotify.default_client
  @related_artists = client.related_artists(id)
end

#top_tracks(client = nil) ⇒ Object



31
32
33
# File 'lib/simplespotify/models/artist.rb', line 31

def top_tracks client=nil
  @top_tracks || top_tracks!(client)
end

#top_tracks!(client = nil) ⇒ Object



26
27
28
29
# File 'lib/simplespotify/models/artist.rb', line 26

def top_tracks! client=nil
  client ||= SimpleSpotify.default_client
  @top_tracks = client.top_tracks(id)
end