Class: Songkick

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/songkick.rb

Defined Under Namespace

Classes: SongkickError

Constant Summary collapse

API_VERSION =
"3.0".freeze

Instance Method Summary collapse

Constructor Details

#initialize(apikey) ⇒ Songkick

Returns a new instance of Songkick.



11
12
13
# File 'lib/songkick.rb', line 11

def initialize(apikey)
  @apikey = apikey
end

Instance Method Details

#event(options = {}) ⇒ Object



24
25
26
# File 'lib/songkick.rb', line 24

def event(options={})
  self.class.get('/events.json', :query => options.merge(:apikey => @apikey))
end

#setlist(id, options = {}) ⇒ Object



32
33
34
# File 'lib/songkick.rb', line 32

def setlist(id, options={})
  self.class.get("/events/#{id}/setlists.json", :query => options.merge(:apikey => @apikey))
end

#user(user, options = {}) ⇒ Object



28
29
30
# File 'lib/songkick.rb', line 28

def user(user, options={})
  self.class.get("/users/#{user}/events.json", :query => options.merge(:apikey => @apikey))
end