Class: Adparlor::Facebook::GraphApi::PageAndPlace

Inherits:
GraphObject
  • Object
show all
Includes:
Fields::PageAndPlace, Traits::Methods
Defined in:
lib/adparlor/facebook/graph_api/page_and_place.rb

Constant Summary

Constants included from Fields::PageAndPlace

Fields::PageAndPlace::FIELDS

Constants included from Fields::FieldDecorator

Fields::FieldDecorator::GLOBAL_FIELDS

Instance Attribute Summary

Attributes inherited from GraphObject

#access_token

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

included

Constructor Details

This class inherits a constructor from Adparlor::Facebook::GraphApi::GraphObject

Instance Method Details

#ads_postsObject



13
14
15
# File 'lib/adparlor/facebook/graph_api/page_and_place.rb', line 13

def ads_posts
  @ads_posts ||= CollectionProxy.new Post, "/#{id}/ads_posts", access_token, nil, include_inline_create: true
end

#leadgen_formsObject



25
26
27
# File 'lib/adparlor/facebook/graph_api/page_and_place.rb', line 25

def leadgen_forms
  @leadgen_forms ||= CollectionProxy.new(LeadgenForm, "/#{id}/leadgen_forms", access_token)
end

#page_backed_instagram_accountsObject



21
22
23
# File 'lib/adparlor/facebook/graph_api/page_and_place.rb', line 21

def page_backed_instagram_accounts
  @page_backed_instagram_accounts ||= CollectionProxy.new(InstagramAccount, "/#{id}/page_backed_instagram_accounts", access_token)
end

#pictureObject



17
18
19
# File 'lib/adparlor/facebook/graph_api/page_and_place.rb', line 17

def picture
  @picture ||= CollectionProxy.new(Picture, "/#{id}/picture", access_token)
end

#promotable_postsObject



9
10
11
# File 'lib/adparlor/facebook/graph_api/page_and_place.rb', line 9

def promotable_posts
  @promotable_posts ||= CollectionProxy.new(Post, "/#{id}/promotable_posts", access_token)
end