Module: Foursquared::Events

Included in:
Client
Defined in:
lib/foursquared/events.rb

Overview

Events module

Instance Method Summary collapse

Instance Method Details

#add_eventObject

Create an event for a venue that you manage.

Parameters:

  • options (Hash)


24
25
26
27
# File 'lib/foursquared/events.rb', line 24

def add_event
  response = post("/events/categories")["response"]
  Foursquared::Response::Event.new(self, response["event"])
end

#event(event_id) ⇒ Foursquared::Response::Event

Return the event with the give ID



6
7
8
9
# File 'lib/foursquared/events.rb', line 6

def event event_id
  response = get("/events/#{event_id}")["response"]
  Foursquared::Response::Event.new(self,response["event"])
end

#event_categoriesArray

Return the available event categories

Returns:

  • (Array)

    An array of event categories



13
14
15
16
# File 'lib/foursquared/events.rb', line 13

def event_categories
  response = get("/events/categories")["response"]
  response["categories"].collect{|category| Foursquared::Response::Category.new(self, category)}
end