Sha256: c2e95bb50431e23cbfdefb564a9646cf2241044b6d5d58c5313ce30f015a79de

Contents?: true

Size: 594 Bytes

Versions: 26

Compression:

Stored size: 594 Bytes

Contents

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

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

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
fb_graph-1.2.1 lib/fb_graph/connections/events.rb
fb_graph-1.2.0 lib/fb_graph/connections/events.rb
fb_graph-1.1.7 lib/fb_graph/connections/events.rb
fb_graph-1.1.6 lib/fb_graph/connections/events.rb
fb_graph-1.1.5 lib/fb_graph/connections/events.rb
fb_graph-1.1.4 lib/fb_graph/connections/events.rb
fb_graph-1.1.3 lib/fb_graph/connections/events.rb
fb_graph-1.1.2 lib/fb_graph/connections/events.rb
fb_graph-1.1.1 lib/fb_graph/connections/events.rb
fb_graph-1.1.0 lib/fb_graph/connections/events.rb
fb_graph-1.0.7 lib/fb_graph/connections/events.rb
fb_graph-1.0.6 lib/fb_graph/connections/events.rb
fb_graph-1.0.5 lib/fb_graph/connections/events.rb
palidanx-fb_graph-1.0.4 lib/fb_graph/connections/events.rb
fb_graph-1.0.4 lib/fb_graph/connections/events.rb
fb_graph-1.0.3 lib/fb_graph/connections/events.rb
fb_graph-1.0.2 lib/fb_graph/connections/events.rb
fb_graph-1.0.1 lib/fb_graph/connections/events.rb
fb_graph-1.0.0 lib/fb_graph/connections/events.rb
fb_graph-0.8.0 lib/fb_graph/connections/events.rb