Sha256: d4a73e94d1c808e791e2d68a151f19a2c31b5faff965e41cb7c1104d47149aa5

Contents?: true

Size: 603 Bytes

Versions: 5

Compression:

Stored size: 603 Bytes

Contents

require 'rubygems'
require 'sem4r'
include Sem4r

adwords = Adwords.sandbox

#adwords = Adwords.sandbox(
#  :email => "<myaccount>@gmail.com",
#  :password => "secret",
#  :developer_token => "<myaccount>@gmail.com++EUR")

account = adwords.account.client_accounts[1]

campaign = account.create_campaign do
  name "new campaign #{Time.now.strftime('%m%d-%H%M%S')}"

  adgroup do
    name "new adgroup #{Time.now.strftime('%m%d-%H%M%S')}"
    keyword do
      text       "keyword"
      match      "BROAD"
    end
    placement do
      url "www.example.com"
    end
  end
end

campaign.p_adgroups(true)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sem4r-0.1.6 examples_blog/2009-12-12-create-campaign.rb
sem4r-0.1.5 examples_blog/2009-12-12-create-campaign.rb
sem4r-0.1.3 examples_blog/2009-12-12-create-campaign.rb
sem4r-0.1.2 examples_blog/2009-12-12-create-campaign.rb
sem4r-0.1.1 examples_blog/2009-12-12-create-campaign.rb