module Lyricli
module Sources
+
+ # This is the Source for rdio
class Rdio
class << self
# The current_track method should return the name of the current
# artist and song.
+ #
# @return [Hash] A hash containing the current `:song` and `:artist`.
def current_track
response = @rdio.call('currentUser', {'extras' => 'lastSongPlayed'})
artist = response["result"]["lastSongPlayed"]["artist"]
song = response["result"]["lastSongPlayed"]["name"]
- {artist: artist, song: song}
+ {:artist => artist, :song => song}
end
# The reset method resets any configurations it may have