X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli.rb/blobdiff_plain/4f3dbb13d02f6eb2ac2b8fea1879e9d5150166b1..92c7bc006fd44f4dcd29ebaad7ee16c18aa099fc:/lib/lyricli/sources/rdio.rb?ds=inline diff --git a/lib/lyricli/sources/rdio.rb b/lib/lyricli/sources/rdio.rb index 40884b7..0be89f3 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 @@ -65,7 +68,6 @@ module Lyricli @config["rdio_auth_token"] = token token end - end end end