1
0
Fork 0
mirror of https://github.com/nov/fb_graph2 synced 2023-03-27 23:22:15 -04:00

support insight metrics as edge_scope

close #78
This commit is contained in:
nov 2015-07-07 17:25:57 +09:00
parent b886fe0c06
commit 6cee5aaec7

View file

@ -2,7 +2,7 @@ module FbGraph2
class Edge
module Insights
def insights(params = {})
insights = self.edge :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