Module: Echowrap::API::Playlist
Constant Summary
Constants included from Utils
Utils::API_KEY_CANNOT_CALL_THIS_METHOD, Utils::INVALID_PARAMETER, Utils::MISSING_OR_INVALID_KEY, Utils::MISSING_PARAMETER, Utils::RATE_LIMIT_EXCEEDED, Utils::SUCCESS
Instance Method Summary collapse
-
#playlist_basic(options = {}) ⇒ Array, Array<Echowrap::Song>
Returns a basic playlist.
- #playlist_dynamic_create(options = {}) ⇒ Object
- #playlist_dynamic_delete(options = {}) ⇒ Object
- #playlist_dynamic_feedback(options = {}) ⇒ Object
- #playlist_dynamic_info(options = {}) ⇒ Object
- #playlist_dynamic_next(options = {}) ⇒ Object
- #playlist_dynamic_restart(options = {}) ⇒ Object
- #playlist_dynamic_steer(options = {}) ⇒ Object
-
#playlist_static(options = {}) ⇒ Array, Array<Echowrap::Song>
Returns a static playlist.
Instance Method Details
#playlist_basic(options = {}) ⇒ Array, Array<Echowrap::Song>
Returns a basic playlist. A basic playlist is generated once from an initial set of parameters, and returned as an ordered list of songs. Basic playlist functionality is supported, see the static and dynamic playlist APIs for advanced contextual and personalized playlisting. Some properties of a basic playlist:
Songs are never repeated
Artists may be repeated
A number of different algorithms can be used to select songs for the playlist. These are specified with the type parameter.
31 32 33 |
# File 'lib/echowrap/api/playlist.rb', line 31 def playlist_basic(={}) objects_from_response(Echowrap::Song, :get, '/api/v4/playlist/basic', :songs, ) end |
#playlist_dynamic_create(options = {}) ⇒ Object
122 123 124 |
# File 'lib/echowrap/api/playlist.rb', line 122 def playlist_dynamic_create(={}) object_from_response(Echowrap::Playlist, :get, '/api/v4/playlist/dynamic/create', nil, ) end |
#playlist_dynamic_delete(options = {}) ⇒ Object
243 244 245 |
# File 'lib/echowrap/api/playlist.rb', line 243 def playlist_dynamic_delete(={}) boolean_from_response(:get, '/api/v4/playlist/dynamic/delete', ) end |
#playlist_dynamic_feedback(options = {}) ⇒ Object
182 183 184 |
# File 'lib/echowrap/api/playlist.rb', line 182 def playlist_dynamic_feedback(={}) boolean_from_response(:get, '/api/v4/playlist/dynamic/feedback', ) end |
#playlist_dynamic_info(options = {}) ⇒ Object
227 228 229 |
# File 'lib/echowrap/api/playlist.rb', line 227 def playlist_dynamic_info(={}) object_from_response(Echowrap::Playlist, :get, '/api/v4/playlist/dynamic/info', nil, ) end |
#playlist_dynamic_next(options = {}) ⇒ Object
156 157 158 |
# File 'lib/echowrap/api/playlist.rb', line 156 def playlist_dynamic_next(={}) object_from_response(Echowrap::Playlist, :get, '/api/v4/playlist/dynamic/next', nil, ) end |
#playlist_dynamic_restart(options = {}) ⇒ Object
138 139 140 |
# File 'lib/echowrap/api/playlist.rb', line 138 def playlist_dynamic_restart(={}) object_from_response(Echowrap::Playlist, :get, '/api/v4/playlist/dynamic/restart', nil, ) end |
#playlist_dynamic_steer(options = {}) ⇒ Object
211 212 213 |
# File 'lib/echowrap/api/playlist.rb', line 211 def playlist_dynamic_steer(={}) boolean_from_response(:get, '/api/v4/playlist/dynamic/steer', ) end |
#playlist_static(options = {}) ⇒ Array, Array<Echowrap::Song>
Returns a static playlist. A static playlist is generated once from an initial set of parameters, and returned as an ordered list of songs. Some properties of a static playlist:
Songs are never repeated
Artist may be repeated
A number of different algorithms can be used to select songs for the playlist. These are specified with the type parameter.
98 99 100 |
# File 'lib/echowrap/api/playlist.rb', line 98 def playlist_static(={}) objects_from_response(Echowrap::Song, :get, '/api/v4/playlist/static', :songs, ) end |