Module: GSGraph::Connections::Events

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

Instance Method Summary collapse

Instance Method Details

#event!(options = {}) ⇒ Object



13
14
15
16
17
18
# File 'lib/gs_graph/connections/events.rb', line 13

def event!(options = {})
  event = post options.merge(:connection => :events)
  Event.new event[:id], options.merge(event).merge(
    :access_token => options[:access_token] || self.access_token
  )
end

#events(options = {}) ⇒ Object



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

def events(options = {})
  events = self.connection :events, options
  events.map! do |event|
    Event.new event[:id], event.merge(
      :access_token => options[:access_token] || self.access_token
    )
  end
end