Module: Ronnie::Client::Collections
- Included in:
- Ronnie::Client
- Defined in:
- lib/ronnie/client/collections.rb,
lib/ronnie/client/collections/albums.rb,
lib/ronnie/client/collections/artists.rb
Defined Under Namespace
Instance Method Summary collapse
-
#add_playlists_to_collection(playlists, options = {}) ⇒ Object
Add Playlists to Collection.
-
#add_tracks_to_collection(tracks, options = {}) ⇒ Object
Add Tracks to Collection.
-
#remove_playlists_from_collection(playlists, options = {}) ⇒ Object
Remove Playlists from Collection.
-
#remove_tracks_from_collection(tracks, options = {}) ⇒ Object
Remove Tracks from Collection.
-
#sync_playlists(playlists) ⇒ Object
Sync Playlists.
-
#sync_tracks(tracks) ⇒ Object
Sync Tracks.
-
#unsync_playlists(playlists) ⇒ Object
Unsync Playlists.
-
#unsync_tracks(tracks) ⇒ Object
Unsync Tracks.
Instance Method Details
#add_playlists_to_collection(playlists, options = {}) ⇒ Object
Add Playlists to Collection
10 11 12 |
# File 'lib/ronnie/client/collections.rb', line 10 def add_playlists_to_collection(playlists, ={}) post('addToCollection', { keys: playlists.join(', ') }) end |
#add_tracks_to_collection(tracks, options = {}) ⇒ Object
Add Tracks to Collection
20 21 22 |
# File 'lib/ronnie/client/collections.rb', line 20 def add_tracks_to_collection(tracks, ={}) post('addToCollection', { keys: tracks.join(', ') }) end |
#remove_playlists_from_collection(playlists, options = {}) ⇒ Object
Remove Playlists from Collection
30 31 32 |
# File 'lib/ronnie/client/collections.rb', line 30 def remove_playlists_from_collection(playlists, ={}) post('removeFromCollection', { keys: playlists.join(', ') }) end |
#remove_tracks_from_collection(tracks, options = {}) ⇒ Object
Remove Tracks from Collection
40 41 42 |
# File 'lib/ronnie/client/collections.rb', line 40 def remove_tracks_from_collection(tracks, ={}) post('removeFromCollection', { keys: tracks.join(', ') }) end |
#sync_playlists(playlists) ⇒ Object
Sync Playlists
50 51 52 |
# File 'lib/ronnie/client/collections.rb', line 50 def sync_playlists(playlists) post('setAvailableOffline', { keys: playlists.join(', '), offline: true }) end |
#sync_tracks(tracks) ⇒ Object
Sync Tracks
60 61 62 |
# File 'lib/ronnie/client/collections.rb', line 60 def sync_tracks(tracks) post('setAvailableOffline', { keys: tracks.join(', '), offline: true }) end |
#unsync_playlists(playlists) ⇒ Object
Unsync Playlists
70 71 72 |
# File 'lib/ronnie/client/collections.rb', line 70 def unsync_playlists(playlists) post('setAvailableOffline', { keys: playlists.join(', '), offline: false }) end |
#unsync_tracks(tracks) ⇒ Object
Unsync Tracks
80 81 82 |
# File 'lib/ronnie/client/collections.rb', line 80 def unsync_tracks(tracks) post('setAvailableOffline', { keys: tracks.join(', '), offline: false }) end |