X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli.rb/blobdiff_plain/4f3dbb13d02f6eb2ac2b8fea1879e9d5150166b1..178ffe1377a571b7ce0a73186c03b5e296ac8922:/lib/lyricli/sources/rdio.rb?ds=sidebyside diff --git a/lib/lyricli/sources/rdio.rb b/lib/lyricli/sources/rdio.rb index 40884b7..76d0ed1 100644 --- a/lib/lyricli/sources/rdio.rb +++ b/lib/lyricli/sources/rdio.rb @@ -1,5 +1,7 @@ module Lyricli module Sources + + # This is the Source for rdio class Rdio class << self @@ -32,12 +34,13 @@ module Lyricli # 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