Module: Ronnie::Client::Artists
- Included in:
- Ronnie::Client
- Defined in:
- lib/ronnie/client/artists.rb
Instance Method Summary collapse
-
#find_artists_by_label(label_id, options = {}) ⇒ Object
Find Artists by Label.
-
#heavily_rotated_artists(user_id = nil, friends = nil, options = {}) ⇒ Object
retrieve heavily rotated artists.
-
#search_artists(query, options = {}) ⇒ Object
Search Artists.
-
#top_artists(options = {}) ⇒ Object
retrieve the site-wide most popular artists.
Instance Method Details
#find_artists_by_label(label_id, options = {}) ⇒ Object
Find Artists by Label
9 10 11 |
# File 'lib/ronnie/client/artists.rb', line 9 def find_artists_by_label(label_id, ={}) post('getArtistsForLabel', { label: label_id }) end |
#heavily_rotated_artists(user_id = nil, friends = nil, options = {}) ⇒ Object
retrieve heavily rotated artists.
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/ronnie/client/artists.rb', line 26 def heavily_rotated_artists(user_id=nil, friends=nil, ={}) if user_id = { user: user_id, type: 'artists' } if friends = .merge!({ friends: friends }) end else = { type: 'artists' } end post('getHeavyRotation', .merge!()) end |
#search_artists(query, options = {}) ⇒ Object
Search Artists
18 19 20 |
# File 'lib/ronnie/client/artists.rb', line 18 def search_artists(query, ={}) post('search', { query: query, types: 'Artist' }) end |
#top_artists(options = {}) ⇒ Object
retrieve the site-wide most popular artists.
44 45 46 |
# File 'lib/ronnie/client/artists.rb', line 44 def top_artists(={}) post('getTopCharts', { type: "Artist" }) end |