Sha256: 5a2cfcf44da0ab5e826d3e45588ac705172ac7d1844938f30372cb6d561d7cff

Contents?: true

Size: 474 Bytes

Versions: 2

Compression:

Stored size: 474 Bytes

Contents

module FbGraph
  module Connections
    module Insights
      def insights(options = {})
        options[:access_token] ||= self.access_token
        options[:access_token] ||= get_access_token(options[:secret]) if respond_to?(:get_access_token)
        insights = self.connection(:insights, options)
        insights.map! do |insight|
          Insight.new(insight.delete(:id), insight.merge(:access_token => options[:access_token]))
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fb_graph-1.1.1 lib/fb_graph/connections/insights.rb
fb_graph-1.1.0 lib/fb_graph/connections/insights.rb