Sha256: 8b08d355e14bd773b690fdbd1176378272ff6e027cb4ce49726f4979ebac76f7

Contents?: true

Size: 600 Bytes

Versions: 2

Compression:

Stored size: 600 Bytes

Contents

class Lastfm
  class MethodCategory
    def initialize(lastfm)
      @lastfm = lastfm
    end

    def write_request(method, params = {})
      request(method, params, :post, true, true)
    end

    def request_with_authentication(method, params = {})
      request(method, params, :get, true, true)
    end

    def request_for_authentication(method, params = {})
      request(method, params, :get, true)
    end

    def request(*args)
      method, *rest = args
      method = [self.class.name.split(/::/).last.downcase, method].join('.')

      @lastfm.request(method, *rest)
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
claudiob-lastfm-0.0.1 lib/lastfm/method_category.rb
lastfm-0.0.1 lib/lastfm/method_category.rb