Module: Echowrap::API::Song
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
-
#song_identify(options = {}) ⇒ Echowrap::Track
Identifies a song given an Echoprint or Echo Nest Musical Fingerprint hash codes.
-
#song_profile(options = {}) ⇒ Echowrap::Song
Get info about songs given a song id or track id.
-
#song_search(options = {}) ⇒ Array, Array<Echowrap::Song>
Search for songs given different query types.
Instance Method Details
#song_identify(options = {}) ⇒ Echowrap::Track
Identifies a song given an Echoprint or Echo Nest Musical Fingerprint hash codes.
26 27 28 29 30 31 32 |
# File 'lib/echowrap/api/song.rb', line 26 def song_identify(={}) if .key?(:query) objects_from_response(Echowrap::Song, :post, '/api/v4/song/identify', :songs, ).first else objects_from_response(Echowrap::Song, :get, '/api/v4/song/identify', :songs, ).first end end |
#song_profile(options = {}) ⇒ Echowrap::Song
Get info about songs given a song id or track id.
47 48 49 |
# File 'lib/echowrap/api/song.rb', line 47 def song_profile(={}) objects_from_response(Echowrap::Song, :get, '/api/v4/song/profile', :songs, ).first end |
#song_search(options = {}) ⇒ Array, Array<Echowrap::Song>
Search for songs given different query types
105 106 107 |
# File 'lib/echowrap/api/song.rb', line 105 def song_search(={}) objects_from_response(Echowrap::Song, :get, '/api/v4/song/search', :songs, ) end |