Class: Adparlor::Facebook::GraphApi::CustomAudience
- Inherits:
-
GraphObject
- Object
- GraphObject
- Adparlor::Facebook::GraphApi::CustomAudience
- Includes:
- Fields::CustomAudience, Traits::Methods
- Defined in:
- lib/adparlor/facebook/graph_api/custom_audience.rb
Constant Summary
Constants included from Fields::CustomAudience
Fields::CustomAudience::CREATE_FIELDS, Fields::CustomAudience::FIELDS, Fields::CustomAudience::UPDATE_FIELDS
Constants included from Fields::FieldDecorator
Fields::FieldDecorator::GLOBAL_FIELDS
Instance Attribute Summary
Attributes inherited from GraphObject
Instance Method Summary collapse
Methods included from Traits::Methods
#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
Methods included from Fields::FieldDecorator
Constructor Details
This class inherits a constructor from Adparlor::Facebook::GraphApi::GraphObject
Instance Method Details
#adaccounts ⇒ Object
21 22 23 |
# File 'lib/adparlor/facebook/graph_api/custom_audience.rb', line 21 def adaccounts @adaccounts ||= CollectionProxy.new(AdAccount, "/#{id}/adaccounts", access_token) end |
#path ⇒ Object
11 12 13 14 |
# File 'lib/adparlor/facebook/graph_api/custom_audience.rb', line 11 def path raise FbError.new('required parameter account_id missing', 500) unless account_id "/act_#{account_id}/customaudiences" end |
#update_path ⇒ Object
16 17 18 19 |
# File 'lib/adparlor/facebook/graph_api/custom_audience.rb', line 16 def update_path raise FbError.new('required parameter id missing', 500) unless id "/#{id}" end |
#users ⇒ Object
25 26 27 |
# File 'lib/adparlor/facebook/graph_api/custom_audience.rb', line 25 def users @users ||= CollectionProxy.new CustomAudienceUser, "#{id}/users", access_token end |