Sha256: 08f52072f7604a1814a12937a64de4d691fc3a4174f9d14dbda4e4ade9d2f282
Contents?: true
Size: 708 Bytes
Versions: 59
Compression:
Stored size: 708 Bytes
Contents
module FbGraph module Connections module Insights def insights(options = {}) options[:access_token] ||= self.access_token insights = self.connection :insights, options.merge( :connection_scope => connection_scope(options) ) insights.map! do |insight| Insight.new insight[:id], insight.merge( :access_token => options[:access_token] ) end end private def connection_scope(options) if metrics = options.delete(:metrics) File.join [metrics, options.delete(:period)].compact.collect(&:to_s) else options[:connection_scope] end end end end end
Version data entries
59 entries across 59 versions & 1 rubygems