Class: Adparlor::Facebook::GraphApi::Ad
Constant Summary
Constants included
from Fields::Ad
Fields::Ad::CREATE_FIELDS, Fields::Ad::FIELDS, Fields::Ad::UPDATE_FIELDS
Fields::FieldDecorator::GLOBAL_FIELDS
Instance Attribute Summary
Attributes inherited from GraphObject
#access_token
Instance Method Summary
collapse
#create, #destroy, included, #update
Methods inherited from GraphObject
#batch, create, #create, data_pass_through, destroy, #destroy, get, #initialize, parse_data_for_collection, read, respond_for_data, #to_hash, #to_json, update, #update
Methods included from Api
#base_uri, #conn, #conn_multi, #delete, #get, #post, #proxy_api_key
included
Instance Method Details
#adcreatives ⇒ Object
21
22
23
|
# File 'lib/adparlor/facebook/graph_api/ad.rb', line 21
def adcreatives
@adcreatives ||= CollectionProxy.new AdCreative, "/#{id}/adcreatives", access_token
end
|
#path ⇒ Object
11
12
13
14
|
# File 'lib/adparlor/facebook/graph_api/ad.rb', line 11
def path
raise FbError.new('required parameter account_id missing', 500) unless account_id
"/act_#{account_id}/ads"
end
|
#previews ⇒ Object
29
30
31
|
# File 'lib/adparlor/facebook/graph_api/ad.rb', line 29
def previews
@previews ||= CollectionProxy.new(AdPreview, "/#{id}/previews", access_token)
end
|
#reachestimate ⇒ Object
33
34
35
|
# File 'lib/adparlor/facebook/graph_api/ad.rb', line 33
def reachestimate
@reachestimate ||= CollectionProxy.new ReachEstimate, "/#{id}/reachestimate", access_token
end
|
#targetingsentencelines ⇒ Object
37
38
39
|
# File 'lib/adparlor/facebook/graph_api/ad.rb', line 37
def targetingsentencelines
@targetingsentencelines ||= CollectionProxy.new TargetingSentenceLine, "/#{id}/targetingsentencelines", access_token
end
|
#update_path ⇒ Object
16
17
18
19
|
# File 'lib/adparlor/facebook/graph_api/ad.rb', line 16
def update_path
raise FbError.new('required parameter id missing', 500) unless id
"/#{id}"
end
|