Module: FbGraph2::Edge::Insights

Included in:
Domain, Page, Post
Defined in:
lib/fb_graph2/edge/insights.rb

Instance Method Summary collapse

Instance Method Details

#insights(params = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/fb_graph2/edge/insights.rb', line 4

def insights(params = {})
  insights = self.edge :insights, params.except(:metrics), edge_scope: params[:metrics]
  insights.collect! do |insight|
    Insight.new(insight[:id], insight).authenticate self.access_token
  end
end