Sha256: 55c14a231d2ae7531e8075d97dde0c8b4fef615863578a4d8e927b147efcc0b7
Contents?: true
Size: 914 Bytes
Versions: 55
Compression:
Stored size: 914 Bytes
Contents
module FbGraph class AdCampaignStat < Node attr_accessor :start_time, :end_time, :campaign_id, :impressions, :clicks, :spent, :social_impressions, :social_clicks, :social_spent, :actions, :unique_impressions, :social_unique_impressions, :unique_clicks, :social_unique_clicks, :connections def initialize(identifier, attributes = {}) super %w(campaign_id impressions clicks spent social_impressions social_clicks social_spent actions unique_impressions social_unique_impressions unique_clicks social_unique_clicks connections).each do |field| send("#{field}=", attributes[field.to_sym]) end %w(start_time end_time).each do |field| if val = attributes[field.to_sym] # Handles integer timestamps and ISO8601 strings time = Time.parse(val) rescue Time.at(val.to_i) send("#{field}=", time) end end end end end
Version data entries
55 entries across 55 versions & 1 rubygems