Sha256: 040551798100d57d7a0def1a716fe32ba42f22504f8eaa49c87207347711b07c

Contents?: true

Size: 946 Bytes

Versions: 16

Compression:

Stored size: 946 Bytes

Contents

module Adparlor
  module Facebook
    module GraphApi
      class Page < GraphObject
        include Fields::Page
        include Traits::Methods
        field_attrs FIELDS

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

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

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

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

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
adparlor-facebook-0.8.2 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.8.0 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.7.9 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.7.8 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.7.7 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.7.6 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.7.5 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.7.4 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.7.3 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.7.2 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.7.1 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.7.0 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.6.6 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.6.5 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.6.4 lib/adparlor/facebook/graph_api/page.rb
adparlor-facebook-0.6.3 lib/adparlor/facebook/graph_api/page.rb