Sha256: 085051f8fa20553aa083aabbe942368e88e0381558a3538793a5f18941a0df29
Contents?: true
Size: 931 Bytes
Versions: 59
Compression:
Stored size: 931 Bytes
Contents
module FbGraph module Connections module AdCampaignStats # When retrieving stats at the AdAccount level we use the 'adcampaignstats' connection # This returns an Array of statistics def ad_campaign_stats(options = {}) ad_campaign_stats = self.connection :adcampaignstats, options ad_campaign_stats.map! do |ad_campaign_stat| AdCampaignStat.new ad_campaign_stat[:id], ad_campaign_stat.merge( :access_token => options[:access_token] || self.access_token ) end end # Note: This could also be a connection on the AdCampaign model, but it has a different connection name # 'stats' instead of 'adcampaignstats' # In addition, it returns a single JSON response that does not conform to the standard connections # array structure, making it difficult to parse with the underlying fb_graph Connection object. end end end
Version data entries
59 entries across 59 versions & 1 rubygems