Class: SimpleSpotify::Model::Artist
- Inherits:
-
Object
- Object
- SimpleSpotify::Model::Artist
- Includes:
- Resource
- Defined in:
- lib/simplespotify/models/artist.rb
Instance Method Summary collapse
- #albums!(client = nil) ⇒ Object
- #related_artists(client = nil) ⇒ Object
- #related_artists!(client = nil) ⇒ Object
- #top_tracks(client = nil) ⇒ Object
- #top_tracks!(client = nil) ⇒ Object
Methods included from Resource
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 |
#related_artists(client = nil) ⇒ Object
21 22 23 |
# File 'lib/simplespotify/models/artist.rb', line 21 def client=nil @related_artists || (client) end |
#related_artists!(client = nil) ⇒ Object
16 17 18 19 |
# File 'lib/simplespotify/models/artist.rb', line 16 def client=nil client ||= SimpleSpotify.default_client @related_artists = client.(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 |