Sha256: 152c3117b4ba274c11f92420b0dbb5b7b0d19649d7c1636d82bc87609992bd9c

Contents?: true

Size: 1.12 KB

Versions: 7

Compression:

Stored size: 1.12 KB

Contents

class Lastfm
  module MethodCategory
    class Tag < Base
      regular_method(
        :get_top_artists,
        :required => [:tag],
        :optional => [
          [:limit, nil],
          [:page, nil]
        ]
      ) do |response|
        response.xml['topartists']['artist']
      end

      regular_method(
        :get_top_tracks,
        :required => [:tag],
        :optional => [
          [:limit, nil],
          [:page, nil]
        ]
      ) do |response|
        response.xml['toptracks']['track']
      end

      regular_method(
        :get_top_albums,
        :required => [:tag],
        :optional => [
          [:limit, nil],
          [:page, nil]
        ]
      ) do |response|
        response.xml['topalbums']['album']

      end
      
      regular_method(
        :search,
        :required => [:tag],
        :optional => [
          [:limit, nil],
          [:page, nil]
        ]
      ) do |response|
        response.xml['results']['tagmatches']['tag']
      end

      regular_method(
        :get_info,
        :required => [:tag]
      ) do |response|
        response.xml['tag']
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lastfm-1.27.4 lib/lastfm/method_category/tag.rb
lastfm-1.27.3 lib/lastfm/method_category/tag.rb
lastfm-1.27.2 lib/lastfm/method_category/tag.rb
lastfm-1.27.1 lib/lastfm/method_category/tag.rb
lastfm-1.27.0 lib/lastfm/method_category/tag.rb
lastfm-1.26.0 lib/lastfm/method_category/tag.rb
lastfm-1.25.0 lib/lastfm/method_category/tag.rb