Sha256: 0400bc615455eee719b27cdc62782c67580881e5ea2f47919be0c2f84adfae15

Contents?: true

Size: 1.08 KB

Versions: 20

Compression:

Stored size: 1.08 KB

Contents

module Adparlor
  module Facebook
    module GraphApi
      class AdSet < GraphObject
        include Fields::AdSet
        include Traits::Methods
        field_attrs FIELDS
        allow_method :create
        allow_local_method :create, :update, :destroy

        def path
          raise FbError.new('required parameter account_id missing', 500) unless account_id
          "/act_#{account_id}/adsets"
        end

        def update_path
          raise FbError.new('required parameter id missing', 500) unless id
          "/#{id}"
        end

        def activities
          @activities ||= CollectionProxy.new Activity, "/#{id}/activities", access_token
        end

        def adcreatives
          @adcreatives ||= CollectionProxy.new AdCreative, "/#{id}/adcreatives", access_token
        end

        def ads
          @ads ||= CollectionProxy.new Ad, "/#{id}/ads", access_token
        end

        def targetingsentencelines
          @targetingsentencelines ||= CollectionProxy.new TargetingSentenceLine, "/#{id}/targetingsentencelines", access_token
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

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