Class: Lastfm::MethodCategory::User

Inherits:
Base
  • Object
show all
Defined in:
lib/lastfm/method_category/user.rb

Instance Method Summary collapse

Methods inherited from Base

__define_method, any_params, #initialize, method_for_authentication, method_for_secure_authentication, method_with_authentication, regular_method, #request, #request_for_authentication, #request_for_secure_authentication, #request_with_authentication, write_method, #write_request

Constructor Details

This class inherits a constructor from Lastfm::MethodCategory::Base

Instance Method Details

#get_info(*args) ⇒ Object


16
17
18
19
20
21
22
23
24
25
# File 'lib/lastfm/method_category/user.rb', line 16

def get_info(*args)
  method = :get_info.to_s.camelize(:lower)
  response = if args.any?
    options = Lastfm::Util.build_options(args, [:user], [])
    request(method, options)
  else
    request_with_authentication(method)
  end
  response.xml['user'][0]
end