Module: Ronnie::Client::Albums
- Included in:
- Ronnie::Client
- Defined in:
- lib/ronnie/client/albums.rb
Instance Method Summary collapse
-
#album(album_id, options = {}) ⇒ Object
Retrieve Album.
-
#find_albums_by_artist(artist_id, options = {}) ⇒ Object
Find Albums by Artist.
-
#find_albums_by_label(label_id, options = {}) ⇒ Object
Find Albums by Label.
-
#find_albums_by_upc(upc, options = {}) ⇒ Object
Find Albums by UPC.
-
#heavily_rotated_albums(user_id = nil, friends = nil, options = {}) ⇒ Object
retrieve heavily rotated albums.
-
#new_releases(options = {}) ⇒ Object
Retrieve new releases.
-
#search_albums(query, options = {}) ⇒ Object
Search Albums.
-
#top_albums(options = {}) ⇒ Object
retrieve the site-wide most popular albums.
Instance Method Details
#album(album_id, options = {}) ⇒ Object
Retrieve Album
9 10 11 |
# File 'lib/ronnie/client/albums.rb', line 9 def album(album_id, ={}) post('get', { keys: album_id }) end |
#find_albums_by_artist(artist_id, options = {}) ⇒ Object
Find Albums by Artist
18 19 20 |
# File 'lib/ronnie/client/albums.rb', line 18 def find_albums_by_artist(artist_id, ={}) post('getAlbumsForArtist', { artist: artist_id }) end |
#find_albums_by_label(label_id, options = {}) ⇒ Object
Find Albums by Label
27 28 29 |
# File 'lib/ronnie/client/albums.rb', line 27 def find_albums_by_label(label_id, ={}) post('getAlbumsForLabel', { label: label_id }) end |
#find_albums_by_upc(upc, options = {}) ⇒ Object
Find Albums by UPC
36 37 38 |
# File 'lib/ronnie/client/albums.rb', line 36 def find_albums_by_upc(upc, ={}) post('getAlbumsByUPC', { upc: upc }) end |
#heavily_rotated_albums(user_id = nil, friends = nil, options = {}) ⇒ Object
retrieve heavily rotated albums.
61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/ronnie/client/albums.rb', line 61 def heavily_rotated_albums(user_id=nil, friends=nil, ={}) if user_id = { user: user_id, type: 'albums' } if friends = .merge!({ friends: friends }) end else = { type: 'albums' } end post('getHeavyRotation', .merge!()) end |
#new_releases(options = {}) ⇒ Object
Retrieve new releases.
53 54 55 |
# File 'lib/ronnie/client/albums.rb', line 53 def new_releases(={}) post('getNewReleases') end |
#search_albums(query, options = {}) ⇒ Object
Search Albums
45 46 47 |
# File 'lib/ronnie/client/albums.rb', line 45 def search_albums(query, ={}) post('search', { query: query, types: 'Album' }) end |
#top_albums(options = {}) ⇒ Object
retrieve the site-wide most popular albums.
79 80 81 |
# File 'lib/ronnie/client/albums.rb', line 79 def top_albums(={}) post('getTopCharts', { type: "Album" }) end |