Module: Foursquared::Events
- Included in:
- Client
- Defined in:
- lib/foursquared/events.rb
Overview
Events module
Instance Method Summary collapse
-
#add_event ⇒ Object
Create an event for a venue that you manage.
-
#event(event_id) ⇒ Foursquared::Response::Event
Return the event with the give ID.
-
#event_categories ⇒ Array
Return the available event categories.
Instance Method Details
#add_event ⇒ Object
Create an event for a venue that you manage.
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_categories ⇒ Array
Return the available 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 |