google-adwords-api 0.16.0 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/COPYING +1 -1
- data/ChangeLog +4 -0
- data/README.md +6 -7
- data/adwords_api.yml +1 -1
- data/examples/v201502/account_management/create_account.rb +0 -4
- data/examples/v201502/account_management/get_account_changes.rb +0 -4
- data/examples/v201502/account_management/get_account_hierarchy.rb +0 -4
- data/examples/v201502/advanced_operations/add_ad_customizers.rb +0 -5
- data/examples/v201502/advanced_operations/add_ad_group_bid_modifier.rb +0 -4
- data/examples/v201502/advanced_operations/add_click_to_download_ad.rb +0 -4
- data/examples/v201502/advanced_operations/add_text_ad_with_upgraded_urls.rb +0 -4
- data/examples/v201502/advanced_operations/create_and_attach_shared_keyword_set.rb +0 -4
- data/examples/v201502/advanced_operations/find_and_remove_criteria_from_shared_set.rb +0 -5
- data/examples/v201502/advanced_operations/get_ad_group_bid_modifiers.rb +0 -4
- data/examples/v201502/advanced_operations/upload_offline_conversions.rb +0 -4
- data/examples/v201502/advanced_operations/use_shared_bidding_strategy.rb +0 -5
- data/examples/v201502/basic_operations/add_ad_groups.rb +0 -4
- data/examples/v201502/basic_operations/add_campaigns.rb +0 -4
- data/examples/v201502/basic_operations/add_keywords.rb +0 -4
- data/examples/v201502/basic_operations/add_text_ads.rb +0 -4
- data/examples/v201502/basic_operations/get_ad_groups.rb +0 -4
- data/examples/v201502/basic_operations/get_campaigns.rb +0 -4
- data/examples/v201502/basic_operations/get_campaigns_with_awql.rb +0 -4
- data/examples/v201502/basic_operations/get_keywords.rb +0 -4
- data/examples/v201502/basic_operations/get_text_ads.rb +0 -4
- data/examples/v201502/basic_operations/pause_ad.rb +0 -4
- data/examples/v201502/basic_operations/remove_ad.rb +0 -4
- data/examples/v201502/basic_operations/remove_ad_group.rb +0 -4
- data/examples/v201502/basic_operations/remove_campaign.rb +0 -4
- data/examples/v201502/basic_operations/remove_keyword.rb +0 -4
- data/examples/v201502/basic_operations/update_ad_group.rb +0 -4
- data/examples/v201502/basic_operations/update_campaign.rb +0 -4
- data/examples/v201502/basic_operations/update_keyword.rb +0 -4
- data/examples/v201502/campaign_management/add_campaign_labels.rb +0 -4
- data/examples/v201502/campaign_management/add_experiment.rb +0 -4
- data/examples/v201502/campaign_management/add_keywords_in_bulk.rb +0 -5
- data/examples/v201502/campaign_management/get_all_disapproved_ads.rb +0 -4
- data/examples/v201502/campaign_management/get_all_disapproved_ads_with_awql.rb +0 -4
- data/examples/v201502/campaign_management/get_campaigns_by_label.rb +0 -4
- data/examples/v201502/campaign_management/promote_experiment.rb +0 -4
- data/examples/v201502/campaign_management/set_ad_parameters.rb +0 -4
- data/examples/v201502/campaign_management/set_criterion_bid_modifier.rb +0 -4
- data/examples/v201502/campaign_management/validate_text_ad.rb +0 -4
- data/examples/v201502/error_handling/handle_partial_failures.rb +0 -4
- data/examples/v201502/error_handling/handle_policy_violation_error.rb +0 -4
- data/examples/v201502/extensions/add_google_my_business_location_extensions.rb +0 -4
- data/examples/v201502/extensions/add_site_links.rb +0 -4
- data/examples/v201502/extensions/add_site_links_using_feeds.rb +0 -5
- data/examples/v201502/migration/migrate_to_extension_settings.rb +0 -6
- data/examples/v201502/migration/upgrade_ad_url.rb +0 -4
- data/examples/v201502/misc/create_ad_words_session_without_properties_file.rb +0 -2
- data/examples/v201502/misc/get_all_images_and_videos.rb +0 -4
- data/examples/v201502/misc/setup_oauth2.rb +0 -4
- data/examples/v201502/misc/upload_image.rb +0 -4
- data/examples/v201502/misc/use_oauth2_jwt.rb +0 -4
- data/examples/v201502/optimization/estimate_keyword_traffic.rb +0 -4
- data/examples/v201502/optimization/get_keyword_bid_simulations.rb +0 -4
- data/examples/v201502/optimization/get_keyword_ideas.rb +0 -4
- data/examples/v201502/remarketing/add_audience.rb +0 -4
- data/examples/v201502/remarketing/add_conversion_tracker.rb +0 -4
- data/examples/v201502/remarketing/add_rule_based_user_lists.rb +0 -4
- data/examples/v201502/reporting/download_criteria_report.rb +0 -2
- data/examples/v201502/reporting/download_criteria_report_with_awql.rb +0 -2
- data/examples/v201502/reporting/get_report_fields.rb +0 -4
- data/examples/v201502/reporting/parallel_report_download.rb +0 -2
- data/examples/v201502/shopping_campaigns/add_product_partition_tree.rb +0 -2
- data/examples/v201502/shopping_campaigns/add_product_scope.rb +0 -4
- data/examples/v201502/shopping_campaigns/add_shopping_campaign.rb +0 -4
- data/examples/v201502/shopping_campaigns/get_product_category_taxonomy.rb +6 -8
- data/examples/v201502/targeting/add_campaign_targeting_criteria.rb +0 -4
- data/examples/v201502/targeting/add_demographic_targeting_criteria.rb +0 -4
- data/examples/v201502/targeting/get_campaign_targeting_criteria.rb +0 -4
- data/examples/v201502/targeting/get_targetable_languages_and_carriers.rb +0 -5
- data/examples/v201502/targeting/lookup_location.rb +0 -4
- data/examples/v201506/account_management/create_account.rb +1 -5
- data/examples/v201506/account_management/get_account_changes.rb +1 -5
- data/examples/v201506/account_management/get_account_hierarchy.rb +1 -5
- data/examples/v201506/advanced_operations/add_ad_customizers.rb +1 -6
- data/examples/v201506/advanced_operations/add_ad_group_bid_modifier.rb +1 -5
- data/examples/v201506/advanced_operations/add_click_to_download_ad.rb +1 -5
- data/examples/v201506/advanced_operations/add_text_ad_with_upgraded_urls.rb +1 -5
- data/examples/v201506/advanced_operations/create_and_attach_shared_keyword_set.rb +8 -4
- data/examples/v201506/advanced_operations/find_and_remove_criteria_from_shared_set.rb +8 -5
- data/examples/v201506/advanced_operations/get_ad_group_bid_modifiers.rb +1 -5
- data/examples/v201506/advanced_operations/upload_offline_conversions.rb +1 -5
- data/examples/v201506/advanced_operations/use_shared_bidding_strategy.rb +1 -6
- data/examples/v201506/basic_operations/add_ad_groups.rb +1 -5
- data/examples/v201506/basic_operations/add_campaigns.rb +1 -5
- data/examples/v201506/basic_operations/add_keywords.rb +1 -5
- data/examples/v201506/basic_operations/add_text_ads.rb +1 -5
- data/examples/v201506/basic_operations/get_ad_groups.rb +1 -5
- data/examples/v201506/basic_operations/get_campaigns.rb +1 -5
- data/examples/v201506/basic_operations/get_campaigns_with_awql.rb +1 -5
- data/examples/v201506/basic_operations/get_keywords.rb +1 -5
- data/examples/v201506/basic_operations/get_text_ads.rb +1 -5
- data/examples/v201506/basic_operations/pause_ad.rb +1 -5
- data/examples/v201506/basic_operations/remove_ad.rb +1 -5
- data/examples/v201506/basic_operations/remove_ad_group.rb +1 -5
- data/examples/v201506/basic_operations/remove_campaign.rb +1 -5
- data/examples/v201506/basic_operations/remove_keyword.rb +1 -5
- data/examples/v201506/basic_operations/update_ad_group.rb +1 -5
- data/examples/v201506/basic_operations/update_campaign.rb +1 -5
- data/examples/v201506/basic_operations/update_keyword.rb +1 -5
- data/examples/v201506/campaign_management/add_campaign_labels.rb +1 -5
- data/examples/v201506/campaign_management/add_experiment.rb +1 -5
- data/examples/v201506/campaign_management/add_keywords_in_bulk.rb +1 -6
- data/examples/v201506/campaign_management/get_all_disapproved_ads.rb +1 -5
- data/examples/v201506/campaign_management/get_all_disapproved_ads_with_awql.rb +1 -5
- data/examples/v201506/campaign_management/get_campaigns_by_label.rb +1 -5
- data/examples/v201506/campaign_management/promote_experiment.rb +1 -5
- data/examples/v201506/campaign_management/set_ad_parameters.rb +1 -5
- data/examples/v201506/campaign_management/set_criterion_bid_modifier.rb +1 -5
- data/examples/v201506/campaign_management/validate_text_ad.rb +1 -5
- data/examples/v201506/error_handling/handle_partial_failures.rb +1 -5
- data/examples/v201506/error_handling/handle_policy_violation_error.rb +1 -5
- data/examples/v201506/extensions/add_google_my_business_location_extensions.rb +1 -5
- data/examples/v201506/extensions/add_site_links.rb +1 -5
- data/examples/v201506/extensions/add_site_links_using_feeds.rb +1 -6
- data/examples/v201506/migration/migrate_to_extension_settings.rb +1 -7
- data/examples/v201506/migration/upgrade_ad_url.rb +1 -5
- data/examples/v201506/misc/get_all_images_and_videos.rb +1 -5
- data/examples/v201506/misc/setup_oauth2.rb +0 -4
- data/examples/v201506/misc/upload_image.rb +1 -5
- data/examples/v201506/misc/use_oauth2_jwt.rb +0 -4
- data/examples/v201506/misc/use_runtime_config.rb +1 -3
- data/examples/v201506/optimization/estimate_keyword_traffic.rb +1 -5
- data/examples/v201506/optimization/get_keyword_bid_simulations.rb +1 -5
- data/examples/v201506/optimization/get_keyword_ideas.rb +1 -5
- data/examples/v201506/remarketing/add_audience.rb +1 -5
- data/examples/v201506/remarketing/add_conversion_tracker.rb +1 -5
- data/examples/v201506/remarketing/add_rule_based_user_lists.rb +1 -5
- data/examples/v201506/reporting/download_criteria_report.rb +1 -3
- data/examples/v201506/reporting/download_criteria_report_with_awql.rb +1 -3
- data/examples/v201506/reporting/get_report_fields.rb +1 -5
- data/examples/v201506/reporting/parallel_report_download.rb +1 -3
- data/examples/v201506/shopping_campaigns/add_product_partition_tree.rb +1 -3
- data/examples/v201506/shopping_campaigns/add_product_scope.rb +1 -5
- data/examples/v201506/shopping_campaigns/add_shopping_campaign.rb +1 -5
- data/examples/v201506/shopping_campaigns/get_product_category_taxonomy.rb +7 -9
- data/examples/v201506/targeting/add_campaign_targeting_criteria.rb +1 -5
- data/examples/v201506/targeting/add_demographic_targeting_criteria.rb +1 -5
- data/examples/v201506/targeting/get_campaign_targeting_criteria.rb +1 -5
- data/examples/v201506/targeting/get_targetable_languages_and_carriers.rb +1 -6
- data/examples/v201506/targeting/lookup_location.rb +1 -5
- data/lib/adwords_api.rb +0 -3
- data/lib/adwords_api/api_config.rb +0 -2
- data/lib/adwords_api/credential_handler.rb +0 -2
- data/lib/adwords_api/errors.rb +1 -2
- data/lib/adwords_api/report_header_handler.rb +0 -2
- data/lib/adwords_api/report_utils.rb +0 -2
- data/lib/adwords_api/utils.rb +0 -2
- data/lib/adwords_api/version.rb +1 -3
- data/test/adwords_api/test_adwords_api.rb +0 -2
- data/test/adwords_api/test_api_config.rb +0 -2
- data/test/adwords_api/test_choices.rb +0 -2
- data/test/adwords_api/test_credential_handler.rb +0 -2
- data/test/adwords_api/test_report_utils.rb +31 -23
- data/test/adwords_api/test_utils.rb +0 -2
- data/test/coverage.rb +0 -2
- data/test/suite_integration.rb +0 -2
- data/test/suite_unittests.rb +0 -2
- data/test/test_utils.rb +0 -2
- metadata +34 -8
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -19,8 +17,6 @@
|
|
19
17
|
# limitations under the License.
|
20
18
|
#
|
21
19
|
# This example retrieves keywords that are related to a given keyword.
|
22
|
-
#
|
23
|
-
# Tags: TargetingIdeaService.get
|
24
20
|
|
25
21
|
require 'adwords_api'
|
26
22
|
|
@@ -110,7 +106,7 @@ if __FILE__ == $0
|
|
110
106
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
111
107
|
"to retrieve and store OAuth2 tokens."
|
112
108
|
puts "See this wiki page for more details:\n\n " +
|
113
|
-
'
|
109
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
114
110
|
|
115
111
|
# HTTP errors.
|
116
112
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.sgomes@gmail.com (Sérgio Gomes)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -20,8 +18,6 @@
|
|
20
18
|
#
|
21
19
|
# This example illustrates how to create a user list (a.k.a. Audience) and shows
|
22
20
|
# its associated conversion tracker code snippet.
|
23
|
-
#
|
24
|
-
# Tags: UserListService.mutate, ConversionTrackerService.get
|
25
21
|
|
26
22
|
require 'adwords_api'
|
27
23
|
|
@@ -102,7 +98,7 @@ if __FILE__ == $0
|
|
102
98
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
103
99
|
"to retrieve and store OAuth2 tokens."
|
104
100
|
puts "See this wiki page for more details:\n\n " +
|
105
|
-
'
|
101
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
106
102
|
|
107
103
|
# HTTP errors.
|
108
104
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.sgomes@gmail.com (Sérgio Gomes)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -19,8 +17,6 @@
|
|
19
17
|
# limitations under the License.
|
20
18
|
#
|
21
19
|
# This example illustrates how to add an AdWords conversion tracker.
|
22
|
-
#
|
23
|
-
# Tags: ConversionTrackerService.mutate
|
24
20
|
|
25
21
|
require 'adwords_api'
|
26
22
|
|
@@ -84,7 +80,7 @@ if __FILE__ == $0
|
|
84
80
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
85
81
|
"to retrieve and store OAuth2 tokens."
|
86
82
|
puts "See this wiki page for more details:\n\n " +
|
87
|
-
'
|
83
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
88
84
|
|
89
85
|
# HTTP errors.
|
90
86
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.mcloonan@gmail.com (Michael Cloonan)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2014, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -21,8 +19,6 @@
|
|
21
19
|
# This example adds two rule-based remarketing user lists: one with no site
|
22
20
|
# visit data restrictions, and another that will only include users who visit
|
23
21
|
# your site in the next six months.
|
24
|
-
#
|
25
|
-
# Tags: AdwordsUserListService.mutate
|
26
22
|
|
27
23
|
require 'adwords_api'
|
28
24
|
|
@@ -151,7 +147,7 @@ if __FILE__ == $0
|
|
151
147
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
152
148
|
"to retrieve and store OAuth2 tokens."
|
153
149
|
puts "See this wiki page for more details:\n\n " +
|
154
|
-
'
|
150
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
155
151
|
|
156
152
|
# HTTP errors.
|
157
153
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -81,7 +79,7 @@ if __FILE__ == $0
|
|
81
79
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
82
80
|
"to retrieve and store OAuth2 tokens."
|
83
81
|
puts "See this wiki page for more details:\n\n " +
|
84
|
-
'
|
82
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
85
83
|
|
86
84
|
# HTTP errors.
|
87
85
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -82,7 +80,7 @@ if __FILE__ == $0
|
|
82
80
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
83
81
|
"to retrieve and store OAuth2 tokens."
|
84
82
|
puts "See this wiki page for more details:\n\n " +
|
85
|
-
'
|
83
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
86
84
|
|
87
85
|
# HTTP errors.
|
88
86
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.sgomes@gmail.com (Sérgio Gomes)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -19,8 +17,6 @@
|
|
19
17
|
# limitations under the License.
|
20
18
|
#
|
21
19
|
# This example gets the list of possible report fields for a report type.
|
22
|
-
#
|
23
|
-
# Tags: ReportDefinitionService.getReportFields
|
24
20
|
|
25
21
|
require 'adwords_api'
|
26
22
|
|
@@ -59,7 +55,7 @@ if __FILE__ == $0
|
|
59
55
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
60
56
|
"to retrieve and store OAuth2 tokens."
|
61
57
|
puts "See this wiki page for more details:\n\n " +
|
62
|
-
'
|
58
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
63
59
|
|
64
60
|
# HTTP errors.
|
65
61
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -155,7 +153,7 @@ if __FILE__ == $0
|
|
155
153
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
156
154
|
"to retrieve and store OAuth2 tokens."
|
157
155
|
puts "See this wiki page for more details:\n\n " +
|
158
|
-
'
|
156
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
159
157
|
|
160
158
|
# HTTP errors.
|
161
159
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.mcloonan@gmail.com (Michael Cloonan)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2014, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -249,7 +247,7 @@ if __FILE__ == $0
|
|
249
247
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
250
248
|
"to retrieve and store OAuth2 tokens."
|
251
249
|
puts "See this wiki page for more details:\n\n " +
|
252
|
-
'
|
250
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
253
251
|
|
254
252
|
# HTTP errors.
|
255
253
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.mcloonan@gmail.com (Michael Cloonan)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2014, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -20,8 +18,6 @@
|
|
20
18
|
#
|
21
19
|
# This example restricts the products that will be included in the campaign by
|
22
20
|
# setting a ProductScope.
|
23
|
-
#
|
24
|
-
# Tags: CampaignCriterionService.mutate
|
25
21
|
|
26
22
|
require 'adwords_api'
|
27
23
|
|
@@ -113,7 +109,7 @@ if __FILE__ == $0
|
|
113
109
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
114
110
|
"to retrieve and store OAuth2 tokens."
|
115
111
|
puts "See this wiki page for more details:\n\n " +
|
116
|
-
'
|
112
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
117
113
|
|
118
114
|
# HTTP errors.
|
119
115
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.mcloonan@gmail.com (Michael Cloonan)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2014, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -19,8 +17,6 @@
|
|
19
17
|
# limitations under the License.
|
20
18
|
#
|
21
19
|
# This example adds a Shopping campaign.
|
22
|
-
#
|
23
|
-
# Tags: CampaignService.mutate, AdGroupService.mutate, AdGroupAdService.mutate
|
24
20
|
|
25
21
|
require 'adwords_api'
|
26
22
|
require 'date'
|
@@ -113,7 +109,7 @@ if __FILE__ == $0
|
|
113
109
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
114
110
|
"to retrieve and store OAuth2 tokens."
|
115
111
|
puts "See this wiki page for more details:\n\n " +
|
116
|
-
'
|
112
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
117
113
|
|
118
114
|
# HTTP errors.
|
119
115
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.mcloonan@gmail.com (Michael Cloonan)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2014, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -19,8 +17,6 @@
|
|
19
17
|
# limitations under the License.
|
20
18
|
#
|
21
19
|
# This example fetches the set of valid ProductBiddingCategories.
|
22
|
-
#
|
23
|
-
# Tags: ConstantDataService.getProductBiddingCategoryData
|
24
20
|
|
25
21
|
require 'adwords_api'
|
26
22
|
|
@@ -46,18 +42,20 @@ def get_product_category_taxonomy()
|
|
46
42
|
constant_data_srv = adwords.service(:ConstantDataService, API_VERSION)
|
47
43
|
|
48
44
|
selector = {
|
49
|
-
:predicates =>
|
45
|
+
:predicates => [
|
46
|
+
{:field => 'Country', :operator => 'IN', :values => ['US']}
|
47
|
+
]
|
50
48
|
}
|
51
49
|
|
52
|
-
|
50
|
+
result = constant_data_srv.get_product_bidding_category_data(selector)
|
53
51
|
|
54
52
|
bidding_categories = {}
|
55
53
|
root_categories = []
|
56
54
|
|
57
|
-
result
|
55
|
+
result.each do |product_bidding_category|
|
58
56
|
id = product_bidding_category[:dimension_value][:value]
|
59
57
|
parent_id = nil
|
60
|
-
name = product_bidding_category[:display_value].first
|
58
|
+
name = product_bidding_category[:display_value].values.first()
|
61
59
|
|
62
60
|
if product_bidding_category[:parent_dimension_value]
|
63
61
|
parent_id = product_bidding_category[:parent_dimension_value][:value]
|
@@ -97,7 +95,7 @@ if __FILE__ == $0
|
|
97
95
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
98
96
|
"to retrieve and store OAuth2 tokens."
|
99
97
|
puts "See this wiki page for more details:\n\n " +
|
100
|
-
'
|
98
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
101
99
|
|
102
100
|
# HTTP errors.
|
103
101
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -20,8 +18,6 @@
|
|
20
18
|
#
|
21
19
|
# This example adds various types of targeting criteria to a campaign. To get
|
22
20
|
# campaigns list, run get_campaigns.rb.
|
23
|
-
#
|
24
|
-
# Tags: CampaignCriterionService.mutate
|
25
21
|
|
26
22
|
require 'adwords_api'
|
27
23
|
|
@@ -164,7 +160,7 @@ if __FILE__ == $0
|
|
164
160
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
165
161
|
"to retrieve and store OAuth2 tokens."
|
166
162
|
puts "See this wiki page for more details:\n\n " +
|
167
|
-
'
|
163
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
168
164
|
|
169
165
|
# HTTP errors.
|
170
166
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -20,8 +18,6 @@
|
|
20
18
|
#
|
21
19
|
# This example adds demographic criteria to an ad group. To get ad groups list,
|
22
20
|
# run get_ad_groups.rb.
|
23
|
-
#
|
24
|
-
# Tags: AdGroupCriterionService.mutate
|
25
21
|
|
26
22
|
require 'adwords_api'
|
27
23
|
|
@@ -96,7 +92,7 @@ if __FILE__ == $0
|
|
96
92
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
97
93
|
"to retrieve and store OAuth2 tokens."
|
98
94
|
puts "See this wiki page for more details:\n\n " +
|
99
|
-
'
|
95
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
100
96
|
|
101
97
|
# HTTP errors.
|
102
98
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -20,8 +18,6 @@
|
|
20
18
|
#
|
21
19
|
# This example illustrates how to retrieve all the campaign targets. To set
|
22
20
|
# campaign targets, run add_campaign_targeting_criteria.rb.
|
23
|
-
#
|
24
|
-
# Tags: CampaignCriterionService.get
|
25
21
|
|
26
22
|
require 'adwords_api'
|
27
23
|
|
@@ -90,7 +86,7 @@ if __FILE__ == $0
|
|
90
86
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
91
87
|
"to retrieve and store OAuth2 tokens."
|
92
88
|
puts "See this wiki page for more details:\n\n " +
|
93
|
-
'
|
89
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
94
90
|
|
95
91
|
# HTTP errors.
|
96
92
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -20,9 +18,6 @@
|
|
20
18
|
#
|
21
19
|
# This example illustrates how to retrieve all languages and carriers available
|
22
20
|
# for targeting.
|
23
|
-
#
|
24
|
-
# Tags: ConstantDataService.getLanguageCriterion
|
25
|
-
# Tags: ConstantDataService.getCarrierCriterion
|
26
21
|
|
27
22
|
require 'adwords_api'
|
28
23
|
|
@@ -74,7 +69,7 @@ if __FILE__ == $0
|
|
74
69
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
75
70
|
"to retrieve and store OAuth2 tokens."
|
76
71
|
puts "See this wiki page for more details:\n\n " +
|
77
|
-
'
|
72
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
78
73
|
|
79
74
|
# HTTP errors.
|
80
75
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Encoding: utf-8
|
3
3
|
#
|
4
|
-
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
-
#
|
6
4
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
5
|
#
|
8
6
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -19,8 +17,6 @@
|
|
19
17
|
# limitations under the License.
|
20
18
|
#
|
21
19
|
# This example gets location criteria by name.
|
22
|
-
#
|
23
|
-
# Tags: LocationCriterionService.get
|
24
20
|
|
25
21
|
require 'adwords_api'
|
26
22
|
|
@@ -92,7 +88,7 @@ if __FILE__ == $0
|
|
92
88
|
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
93
89
|
"to retrieve and store OAuth2 tokens."
|
94
90
|
puts "See this wiki page for more details:\n\n " +
|
95
|
-
'
|
91
|
+
'https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2'
|
96
92
|
|
97
93
|
# HTTP errors.
|
98
94
|
rescue AdsCommon::Errors::HttpError => e
|
data/lib/adwords_api.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
# Encoding: utf-8
|
2
2
|
#
|
3
|
-
# Authors:: api.sgomes@gmail.com (Sérgio Gomes)
|
4
|
-
# api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
-
#
|
6
3
|
# Copyright:: Copyright 2010, Google Inc. All Rights Reserved.
|
7
4
|
#
|
8
5
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|