Class: FbGraph::AdGroupStat
Instance Attribute Summary (collapse)
-
- (Object) actions
Returns the value of attribute actions.
-
- (Object) adgroup_id
Returns the value of attribute adgroup_id.
-
- (Object) clicks
Returns the value of attribute clicks.
-
- (Object) connections
Returns the value of attribute connections.
-
- (Object) end_time
Returns the value of attribute end_time.
-
- (Object) impressions
Returns the value of attribute impressions.
-
- (Object) social_clicks
Returns the value of attribute social_clicks.
-
- (Object) social_impressions
Returns the value of attribute social_impressions.
-
- (Object) social_spent
Returns the value of attribute social_spent.
-
- (Object) social_unique_clicks
Returns the value of attribute social_unique_clicks.
-
- (Object) social_unique_impressions
Returns the value of attribute social_unique_impressions.
-
- (Object) spent
Returns the value of attribute spent.
-
- (Object) start_time
Returns the value of attribute start_time.
-
- (Object) unique_clicks
Returns the value of attribute unique_clicks.
-
- (Object) unique_impressions
Returns the value of attribute unique_impressions.
Attributes inherited from Node
#access_token, #endpoint, #identifier, #raw_attributes
Instance Method Summary (collapse)
-
- (AdGroupStat) initialize(identifier, attributes = {})
constructor
A new instance of AdGroupStat.
Methods inherited from Node
#connection, #destroy, fetch, #fetch, #update
Methods included from Comparison
Constructor Details
- (AdGroupStat) initialize(identifier, attributes = {})
A new instance of AdGroupStat
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/fb_graph/ad_group_stat.rb', line 6 def initialize(identifier, attributes = {}) super %w(adgroup_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 |
Instance Attribute Details
- (Object) actions
Returns the value of attribute actions
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def actions @actions end |
- (Object) adgroup_id
Returns the value of attribute adgroup_id
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def adgroup_id @adgroup_id end |
- (Object) clicks
Returns the value of attribute clicks
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def clicks @clicks end |
- (Object) connections
Returns the value of attribute connections
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def connections @connections end |
- (Object) end_time
Returns the value of attribute end_time
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def end_time @end_time end |
- (Object) impressions
Returns the value of attribute impressions
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def impressions @impressions end |
- (Object) social_clicks
Returns the value of attribute social_clicks
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def @social_clicks end |
- (Object) social_impressions
Returns the value of attribute social_impressions
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def @social_impressions end |
- (Object) social_spent
Returns the value of attribute social_spent
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def @social_spent end |
- (Object) social_unique_clicks
Returns the value of attribute social_unique_clicks
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def @social_unique_clicks end |
- (Object) social_unique_impressions
Returns the value of attribute social_unique_impressions
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def @social_unique_impressions end |
- (Object) spent
Returns the value of attribute spent
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def spent @spent end |
- (Object) start_time
Returns the value of attribute start_time
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def start_time @start_time end |
- (Object) unique_clicks
Returns the value of attribute unique_clicks
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def unique_clicks @unique_clicks end |
- (Object) unique_impressions
Returns the value of attribute unique_impressions
3 4 5 |
# File 'lib/fb_graph/ad_group_stat.rb', line 3 def unique_impressions @unique_impressions end |