Module: FbGraph::Connections::Events

Included in:
Page, User
Defined in:
lib/fb_graph/connections/events.rb

Instance Method Summary collapse

Instance Method Details

#event!(options = {}) ⇒ Object



11
12
13
14
# File 'lib/fb_graph/connections/events.rb', line 11

def event!(options = {})
  event = post(options.merge(:connection => 'events'))
  Event.new(event.delete(:id), options.merge(event))
end

#events(options = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/fb_graph/connections/events.rb', line 4

def events(options = {})
  events = FbGraph::Collection.new(get(options.merge(:connection => 'events')))
  events.map! do |event|
    Event.new(event.delete(:id), event)
  end
end