lib/lastfm.rb in lastfm-1.3.0 vs lib/lastfm.rb in lastfm-1.4.0
- old
+ new
@@ -4,17 +4,19 @@
require 'active_support/core_ext/string/inflections'
require 'lastfm/util'
require 'lastfm/response'
require 'lastfm/method_category/base'
-require 'lastfm/method_category/auth'
-require 'lastfm/method_category/track'
-require 'lastfm/method_category/artist'
require 'lastfm/method_category/album'
-require 'lastfm/method_category/user'
+require 'lastfm/method_category/artist'
+require 'lastfm/method_category/auth'
+require 'lastfm/method_category/event'
require 'lastfm/method_category/geo'
require 'lastfm/method_category/library'
+require 'lastfm/method_category/tag'
+require 'lastfm/method_category/track'
+require 'lastfm/method_category/user'
class Lastfm
API_ROOT = 'http://ws.audioscrobbler.com/2.0'
include HTTParty
@@ -35,35 +37,43 @@
def initialize(api_key, api_secret)
@api_key = api_key
@api_secret = api_secret
end
- def auth
- MethodCategory::Auth.new(self)
+ def album
+ MethodCategory::Album.new(self)
end
- def track
- MethodCategory::Track.new(self)
- end
-
def artist
MethodCategory::Artist.new(self)
end
-
- def album
- MethodCategory::Album.new(self)
+
+ def auth
+ MethodCategory::Auth.new(self)
end
- def user
- MethodCategory::User.new(self)
+ def event
+ MethodCategory::Event.new(self)
end
def geo
MethodCategory::Geo.new(self)
end
def library
MethodCategory::Library.new(self)
+ end
+
+ def tag
+ MethodCategory::Tag.new(self)
+ end
+
+ def track
+ MethodCategory::Track.new(self)
+ end
+
+ def user
+ MethodCategory::User.new(self)
end
def request(method, params = {}, http_method = :get, with_signature = false, with_session = false)
params[:method] = method
params[:api_key] = @api_key