Sha256: 114560ef9d6c45d7fff803c8b941e24b17d38f3035df4bca3314a5af03faedab

Contents?: true

Size: 1.26 KB

Versions: 15

Compression:

Stored size: 1.26 KB

Contents

class Lastfm
  module MethodCategory
    class Chart < Base
      regular_method(
        :get_hyped_artists,
        :optional => [
          [:page, nil],
          [:limit, nil]
        ]
      ) do |response|
        response.xml['artists']['artist']
      end

      regular_method(
        :get_hyped_tracks,
        :optional => [
          [:page, nil],
          [:limit, nil]
        ]
      ) do |response|
        response.xml['tracks']['track']
      end

      regular_method(
        :get_loved_tracks,
        :optional => [
          [:page, nil],
          [:limit, nil]
        ]
      ) do |response|
        response.xml['tracks']['track']
      end

      regular_method(
        :get_top_artists,
        :optional => [
          [:page, nil],
          [:limit, nil]
        ]
      ) do |response|
        response.xml['artists']['artist']
      end

      regular_method(
        :get_top_tags,
        :optional => [
          [:page, nil],
          [:limit, nil]
        ]
      ) do |response|
        response.xml['tags']['tag']
      end

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
lastfm-1.27.4 lib/lastfm/method_category/chart.rb
lastfm-1.27.3 lib/lastfm/method_category/chart.rb
lastfm-1.27.2 lib/lastfm/method_category/chart.rb
lastfm-1.27.1 lib/lastfm/method_category/chart.rb
lastfm-1.27.0 lib/lastfm/method_category/chart.rb
lastfm-1.26.0 lib/lastfm/method_category/chart.rb
lastfm-1.25.0 lib/lastfm/method_category/chart.rb
lastfm-1.24.0 lib/lastfm/method_category/chart.rb
lastfm-1.23.0 lib/lastfm/method_category/chart.rb
lastfm-1.22.0 lib/lastfm/method_category/chart.rb
lastfm-1.21.0 lib/lastfm/method_category/chart.rb
lastfm-1.20.1 lib/lastfm/method_category/chart.rb
lastfm-1.19.1 lib/lastfm/method_category/chart.rb
lastfm-1.19.0 lib/lastfm/method_category/chart.rb
lastfm-1.18.0 lib/lastfm/method_category/chart.rb