Sha256: bc777b1bac5efd81ea88fb3ad3fbf6380ba4a234f7c14e62bbfe7a13c1d3dfe8

Contents?: true

Size: 413 Bytes

Versions: 6

Compression:

Stored size: 413 Bytes

Contents

class Lastfm
  module MethodCategory
    class Radio < Base
      write_method :tune, [:station]
      method_with_authentication :get_playlist, [], [] do |response|
        playlist = response.xml['playlist']
        tracklist = playlist['trackList']['track']

        unless tracklist.is_a?(Array)
          playlist['trackList']['track'] = [tracklist]
        end

        playlist
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lastfm-1.17.0 lib/lastfm/method_category/radio.rb
lastfm-1.16.0 lib/lastfm/method_category/radio.rb
lastfm-1.15.1 lib/lastfm/method_category/radio.rb
lastfm-1.15.0 lib/lastfm/method_category/radio.rb
lastfm-1.14.1 lib/lastfm/method_category/radio.rb
lastfm-1.14.0 lib/lastfm/method_category/radio.rb