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