Sha256: 370c7b485c4fa8aabe9c98a7605ba6ff1b110f2d400a464d7be9ecd76ef692f5

Contents?: true

Size: 629 Bytes

Versions: 4

Compression:

Stored size: 629 Bytes

Contents

module FbGraph
  module Connections
    module Events
      def events(options = {})
        events = FbGraph::Collection.new(get(options.merge(:connection => 'events')))
        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

4 entries across 4 versions & 1 rubygems

Version Path
fb_graph-0.4.2 lib/fb_graph/connections/events.rb
fb_graph-0.4.1 lib/fb_graph/connections/events.rb
fb_graph-0.4.0 lib/fb_graph/connections/events.rb
fb_graph-0.3.0 lib/fb_graph/connections/events.rb