Skip to content

Commit

Permalink
Allowing requests with no CID specified, and updating some examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcloonan committed Jun 4, 2015
1 parent e1a1ac3 commit a3eba94
Show file tree
Hide file tree
Showing 24 changed files with 71 additions and 437 deletions.
3 changes: 3 additions & 0 deletions adwords_api/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.15.1:
- Allowing requests without CID specified for use with CustomerService.

0.15.0:
- Removed deprecated API version v201406.
- Updated Feeds migration example to account for platform restrictions.
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def create_ad_words_session(client_id, client_secret, refresh_token,
:oauth2_client_id => client_id,
:oauth2_client_secret => client_secret,
:developer_token => developer_token,
:client_customer_id => client_customer_id
:client_customer_id => client_customer_id,
:user_agent => user_agent,
:oauth2_token => {
:refresh_token => refresh_token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def estimate_keyword_traffic()
)
mean_avg_position = calculate_mean(
estimate[:min][:average_position],
estimate[:max][:average_position])
estimate[:max][:average_position]
)
mean_clicks = calculate_mean(
estimate[:min][:clicks_per_day],
Expand All @@ -107,6 +107,7 @@ def estimate_keyword_traffic()
puts "\tEstimated ad position: %s" % format_mean(mean_avg_position)
puts "\tEstimated daily clicks: %s" % format_mean(mean_clicks)
puts "\tEstimated daily cost: %s" % format_mean(mean_total_cost)
end
else
puts 'No traffic estimates were returned.'
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def add_conversion_tracker()
:conversion_page_language => 'en',
:background_color => '#0000FF',
:default_revenue_value => 23.41,
:always_use_default_revenue_value = true
:always_use_default_revenue_value => true
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ def get_account_changes()
campaign[:added_ad_extensions].pretty_inspect.chomp
puts "\tAdded campaign criteria: '%s'" %
campaign[:added_campaign_criteria].pretty_inspect.chomp
puts "\tDeleted ad extensions: '%s'" %
campaign[:deleted_ad_extensions].pretty_inspect.chomp
puts "\tDeleted campaign criteria: '%s'" %
campaign[:deleted_campaign_criteria].pretty_inspect.chomp
puts "\tRemoved ad extensions: '%s'" %
campaign[:removed_ad_extensions].pretty_inspect.chomp
puts "\tRemoved campaign criteria: '%s'" %
campaign[:removed_campaign_criteria].pretty_inspect.chomp

if campaign[:changed_ad_groups]
campaign[:changed_ad_groups].each do |ad_group|
Expand All @@ -98,8 +98,8 @@ def get_account_changes()
ad_group[:changed_ads].pretty_inspect.chomp
puts "\t\tCriteria changed: '%s'" %
ad_group[:changed_criteria].pretty_inspect.chomp
puts "\t\tCriteria deleted: '%s'" %
ad_group[:deleted_criteria].pretty_inspect.chomp
puts "\t\tCriteria removed: '%s'" %
ad_group[:removed_criteria].pretty_inspect.chomp
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ def add_ad_customizers(feed_name, ad_group_ids)
# All set! We can now create ads with customizations.
text_ad = {
:xsi_type => 'TextAd',
:headline => 'Luxury Cruise to {=CustomizerFeed.Name}',
:description1 => 'Only {=CustomizerFeed.Price}',
:description2 => 'Offer ends in {=countdown(CustomizerFeed.Date)}!',
:headline => 'Luxury Cruise to {=%s.Name}' % feed_name,
:description1 => 'Only {=%s.Price}' % feed_name,
:description2 => 'Offer ends in {=countdown(%s.Date)}!' % feed_name,
:final_urls => ['http://www.example.com'],
:display_url => 'www.example.com'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ def add_text_ad_with_upgraded_urls(ad_group_id)
puts "\tFinal URLs: %s" % [text_ad[:final_urls].join(', ')]
puts "\tFinal Mobile URLs: %s" % [text_ad[:final_mobile_urls].join(', ')]
puts "\tTracking URL template: %s" % [text_ad[:tracking_url_template]]
custom_parameters = text_ad[:custom_parameters].map do |custom_parameter|
"%s=%s" % [custom_parameter[:key], custom_parameter[:value]]
end
custom_parameters =
text_ad[:url_custom_parameters][:parameters].map do |custom_parameter|
"%s=%s" % [custom_parameter[:key], custom_parameter[:value]]
end
puts "\tCustom parameters: %s" % [custom_parameters.join(', ')]
end
else
Expand Down

This file was deleted.

Loading

0 comments on commit a3eba94

Please sign in to comment.