google-adwords-api 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +5 -0
- data/README +3 -3
- data/examples/v201302/account_management/create_account.rb +8 -0
- data/examples/v201302/account_management/get_account_alerts.rb +8 -0
- data/examples/v201302/account_management/get_account_changes.rb +8 -0
- data/examples/v201302/account_management/get_account_hierarchy.rb +8 -0
- data/examples/v201302/advanced_operations/add_ad_group_bid_modifier.rb +8 -0
- data/examples/v201302/advanced_operations/add_click_to_download_ad.rb +8 -0
- data/examples/v201302/advanced_operations/add_site_links.rb +8 -0
- data/examples/v201302/advanced_operations/create_and_attach_shared_keyword_set.rb +8 -0
- data/examples/v201302/advanced_operations/find_and_remove_criteria_from_shared_set.rb +8 -0
- data/examples/v201302/advanced_operations/get_ad_group_bid_modifiers.rb +8 -0
- data/examples/v201302/basic_operations/add_ad_groups.rb +8 -0
- data/examples/v201302/basic_operations/add_campaigns.rb +8 -0
- data/examples/v201302/basic_operations/add_keywords.rb +8 -0
- data/examples/v201302/basic_operations/add_text_ads.rb +8 -0
- data/examples/v201302/basic_operations/delete_ad.rb +8 -0
- data/examples/v201302/basic_operations/delete_ad_group.rb +8 -0
- data/examples/v201302/basic_operations/delete_campaign.rb +8 -0
- data/examples/v201302/basic_operations/delete_keyword.rb +8 -0
- data/examples/v201302/basic_operations/get_ad_groups.rb +8 -0
- data/examples/v201302/basic_operations/get_campaigns.rb +8 -0
- data/examples/v201302/basic_operations/get_campaigns_with_awql.rb +8 -0
- data/examples/v201302/basic_operations/get_keywords.rb +8 -0
- data/examples/v201302/basic_operations/get_text_ads.rb +8 -0
- data/examples/v201302/basic_operations/pause_ad.rb +8 -0
- data/examples/v201302/basic_operations/update_ad_group.rb +8 -0
- data/examples/v201302/basic_operations/update_campaign.rb +8 -0
- data/examples/v201302/basic_operations/update_keyword.rb +8 -0
- data/examples/v201302/campaign_management/add_experiment.rb +8 -0
- data/examples/v201302/campaign_management/add_keywords_in_bulk.rb +8 -0
- data/examples/v201302/campaign_management/add_location_extension.rb +8 -0
- data/examples/v201302/campaign_management/add_location_extension_override.rb +8 -0
- data/examples/v201302/campaign_management/get_all_disapproved_ads.rb +8 -0
- data/examples/v201302/campaign_management/get_all_disapproved_ads_with_awql.rb +8 -0
- data/examples/v201302/campaign_management/promote_experiment.rb +8 -0
- data/examples/v201302/campaign_management/set_ad_parameters.rb +8 -0
- data/examples/v201302/campaign_management/set_criterion_bid_modifier.rb +8 -0
- data/examples/v201302/campaign_management/validate_text_ad.rb +8 -0
- data/examples/v201302/error_handling/handle_partial_failures.rb +8 -0
- data/examples/v201302/error_handling/handle_policy_violation_error.rb +8 -0
- data/examples/v201302/migration/set_campaign_enhanced.rb +8 -0
- data/examples/v201302/migration/upgrade_legacy_sitelinks.rb +8 -0
- data/examples/v201302/misc/get_all_images_and_videos.rb +8 -0
- data/examples/v201302/misc/{use_oauth2.rb → setup_oauth2.rb} +16 -25
- data/examples/v201302/misc/upload_image.rb +8 -0
- data/examples/v201302/optimization/estimate_keyword_traffic.rb +8 -0
- data/examples/v201302/optimization/get_keyword_bid_simulations.rb +8 -0
- data/examples/v201302/optimization/get_keyword_ideas.rb +8 -0
- data/examples/v201302/optimization/get_placement_ideas.rb +8 -0
- data/examples/v201302/remarketing/add_audience.rb +8 -0
- data/examples/v201302/remarketing/add_conversion_tracker.rb +8 -0
- data/examples/v201302/reporting/download_criteria_report.rb +8 -0
- data/examples/v201302/reporting/download_criteria_report_with_awql.rb +8 -0
- data/examples/v201302/reporting/get_campaign_stats.rb +8 -0
- data/examples/v201302/reporting/get_report_fields.rb +8 -0
- data/examples/v201302/reporting/parallel_report_download.rb +8 -0
- data/examples/v201302/targeting/add_campaign_targeting_criteria.rb +8 -0
- data/examples/v201302/targeting/add_demographic_targeting_criteria.rb +8 -0
- data/examples/v201302/targeting/get_campaign_targeting_criteria.rb +8 -0
- data/examples/v201302/targeting/get_targetable_languages_and_carriers.rb +8 -0
- data/examples/v201302/targeting/lookup_location.rb +8 -0
- data/examples/v201306/account_management/create_account.rb +95 -0
- data/examples/v201306/account_management/get_account_alerts.rb +122 -0
- data/examples/v201306/account_management/get_account_changes.rb +145 -0
- data/examples/v201306/account_management/get_account_hierarchy.rb +103 -0
- data/examples/v201306/advanced_operations/add_ad_group_bid_modifier.rb +105 -0
- data/examples/v201306/advanced_operations/add_click_to_download_ad.rb +137 -0
- data/examples/v201306/advanced_operations/add_site_links.rb +244 -0
- data/examples/v201306/advanced_operations/create_and_attach_shared_keyword_set.rb +147 -0
- data/examples/v201306/advanced_operations/find_and_remove_criteria_from_shared_set.rb +181 -0
- data/examples/v201306/advanced_operations/get_ad_group_bid_modifiers.rb +106 -0
- data/examples/v201306/basic_operations/add_ad_groups.rb +143 -0
- data/examples/v201306/basic_operations/add_campaigns.rb +162 -0
- data/examples/v201306/basic_operations/add_keywords.rb +116 -0
- data/examples/v201306/basic_operations/add_text_ads.rb +113 -0
- data/examples/v201306/basic_operations/delete_ad.rb +93 -0
- data/examples/v201306/basic_operations/delete_ad_group.rb +110 -0
- data/examples/v201306/basic_operations/delete_campaign.rb +111 -0
- data/examples/v201306/basic_operations/delete_keyword.rb +98 -0
- data/examples/v201306/basic_operations/get_ad_groups.rb +106 -0
- data/examples/v201306/basic_operations/get_campaigns.rb +101 -0
- data/examples/v201306/basic_operations/get_campaigns_with_awql.rb +93 -0
- data/examples/v201306/basic_operations/get_keywords.rb +112 -0
- data/examples/v201306/basic_operations/get_text_ads.rb +114 -0
- data/examples/v201306/basic_operations/pause_ad.rb +92 -0
- data/examples/v201306/basic_operations/update_ad_group.rb +89 -0
- data/examples/v201306/basic_operations/update_campaign.rb +90 -0
- data/examples/v201306/basic_operations/update_keyword.rb +110 -0
- data/examples/v201306/campaign_management/add_experiment.rb +166 -0
- data/examples/v201306/campaign_management/add_keywords_in_bulk.rb +158 -0
- data/examples/v201306/campaign_management/add_location_extension.rb +125 -0
- data/examples/v201306/campaign_management/add_location_extension_override.rb +91 -0
- data/examples/v201306/campaign_management/get_all_disapproved_ads.rb +101 -0
- data/examples/v201306/campaign_management/get_all_disapproved_ads_with_awql.rb +92 -0
- data/examples/v201306/campaign_management/promote_experiment.rb +85 -0
- data/examples/v201306/campaign_management/set_ad_parameters.rb +122 -0
- data/examples/v201306/campaign_management/set_criterion_bid_modifier.rb +110 -0
- data/examples/v201306/campaign_management/validate_text_ad.rb +114 -0
- data/examples/v201306/error_handling/handle_captcha_challenge.rb +93 -0
- data/examples/v201306/error_handling/handle_partial_failures.rb +134 -0
- data/examples/v201306/error_handling/handle_policy_violation_error.rb +145 -0
- data/examples/v201306/error_handling/handle_two_factor_authorization_error.rb +88 -0
- data/examples/v201306/migration/upgrade_legacy_sitelinks.rb +313 -0
- data/examples/v201306/misc/get_all_images_and_videos.rb +108 -0
- data/examples/v201306/misc/setup_oauth2.rb +88 -0
- data/examples/v201306/misc/upload_image.rb +97 -0
- data/examples/v201306/misc/use_oauth2_jwt.rb +93 -0
- data/examples/v201306/optimization/estimate_keyword_traffic.rb +137 -0
- data/examples/v201306/optimization/get_keyword_bid_simulations.rb +100 -0
- data/examples/v201306/optimization/get_keyword_ideas.rb +130 -0
- data/examples/v201306/optimization/get_placement_ideas.rb +112 -0
- data/examples/v201306/remarketing/add_audience.rb +123 -0
- data/examples/v201306/remarketing/add_conversion_tracker.rb +104 -0
- data/examples/v201306/reporting/download_criteria_report.rb +87 -0
- data/examples/v201306/reporting/download_criteria_report_with_awql.rb +86 -0
- data/examples/v201306/reporting/get_campaign_stats.rb +113 -0
- data/examples/v201306/reporting/get_report_fields.rb +79 -0
- data/examples/v201306/reporting/parallel_report_download.rb +171 -0
- data/examples/v201306/targeting/add_campaign_targeting_criteria.rb +123 -0
- data/examples/v201306/targeting/add_demographic_targeting_criteria.rb +116 -0
- data/examples/v201306/targeting/get_campaign_targeting_criteria.rb +110 -0
- data/examples/v201306/targeting/get_targetable_languages_and_carriers.rb +94 -0
- data/examples/v201306/targeting/lookup_location.rb +112 -0
- data/lib/adwords_api/api_config.rb +80 -4
- data/lib/adwords_api/v201306/ad_extension_override_service.rb +38 -0
- data/lib/adwords_api/v201306/ad_extension_override_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/ad_group_ad_service.rb +42 -0
- data/lib/adwords_api/v201306/ad_group_ad_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/ad_group_bid_modifier_service.rb +38 -0
- data/lib/adwords_api/v201306/ad_group_bid_modifier_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/ad_group_criterion_service.rb +42 -0
- data/lib/adwords_api/v201306/ad_group_criterion_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/ad_group_feed_service.rb +38 -0
- data/lib/adwords_api/v201306/ad_group_feed_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/ad_group_service.rb +42 -0
- data/lib/adwords_api/v201306/ad_group_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/ad_param_service.rb +38 -0
- data/lib/adwords_api/v201306/ad_param_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/adwords_user_list_service.rb +38 -0
- data/lib/adwords_api/v201306/adwords_user_list_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/alert_service.rb +34 -0
- data/lib/adwords_api/v201306/alert_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/bidding_strategy_service.rb +38 -0
- data/lib/adwords_api/v201306/bidding_strategy_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/budget_order_service.rb +42 -0
- data/lib/adwords_api/v201306/budget_order_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/budget_service.rb +38 -0
- data/lib/adwords_api/v201306/budget_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/campaign_ad_extension_service.rb +38 -0
- data/lib/adwords_api/v201306/campaign_ad_extension_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/campaign_criterion_service.rb +42 -0
- data/lib/adwords_api/v201306/campaign_criterion_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/campaign_feed_service.rb +38 -0
- data/lib/adwords_api/v201306/campaign_feed_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/campaign_service.rb +42 -0
- data/lib/adwords_api/v201306/campaign_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/campaign_shared_set_service.rb +38 -0
- data/lib/adwords_api/v201306/campaign_shared_set_service_registry.rb +47 -0
- data/lib/adwords_api/v201306/constant_data_service.rb +62 -0
- data/lib/adwords_api/v201306/constant_data_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/conversion_tracker_service.rb +38 -0
- data/lib/adwords_api/v201306/conversion_tracker_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/customer_service.rb +34 -0
- data/lib/adwords_api/v201306/customer_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/customer_sync_service.rb +34 -0
- data/lib/adwords_api/v201306/customer_sync_service_registry.rb +47 -0
- data/lib/adwords_api/v201306/data_service.rb +38 -0
- data/lib/adwords_api/v201306/data_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/experiment_service.rb +38 -0
- data/lib/adwords_api/v201306/experiment_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/feed_item_service.rb +38 -0
- data/lib/adwords_api/v201306/feed_item_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/feed_mapping_service.rb +38 -0
- data/lib/adwords_api/v201306/feed_mapping_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/feed_service.rb +38 -0
- data/lib/adwords_api/v201306/feed_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/geo_location_service.rb +34 -0
- data/lib/adwords_api/v201306/geo_location_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/location_criterion_service.rb +34 -0
- data/lib/adwords_api/v201306/location_criterion_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/managed_customer_service.rb +50 -0
- data/lib/adwords_api/v201306/managed_customer_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/media_service.rb +38 -0
- data/lib/adwords_api/v201306/media_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/mutate_job_service.rb +42 -0
- data/lib/adwords_api/v201306/mutate_job_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/report_definition_service.rb +34 -0
- data/lib/adwords_api/v201306/report_definition_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/shared_criterion_service.rb +38 -0
- data/lib/adwords_api/v201306/shared_criterion_service_registry.rb +47 -0
- data/lib/adwords_api/v201306/shared_set_service.rb +38 -0
- data/lib/adwords_api/v201306/shared_set_service_registry.rb +47 -0
- data/lib/adwords_api/v201306/targeting_idea_service.rb +38 -0
- data/lib/adwords_api/v201306/targeting_idea_service_registry.rb +46 -0
- data/lib/adwords_api/v201306/traffic_estimator_service.rb +34 -0
- data/lib/adwords_api/v201306/traffic_estimator_service_registry.rb +46 -0
- data/lib/adwords_api/version.rb +1 -1
- data/test/adwords_api/test_adwords_api.rb +1 -1
- data/test/adwords_api/test_api_config.rb +8 -8
- data/test/adwords_api/test_report_utils.rb +1 -1
- data/test/bugs/test_issue_00000031.rb +2 -2
- data/test/bugs/test_issue_00000063.rb +6 -6
- data/test/suite_exampletests_v201302.rb +1 -1
- data/test/suite_exampletests_v201306.rb +37 -0
- data/test/templates/v201209/basic_operations_get_campaigns.def +1 -1
- data/test/templates/v201302/basic_operations_get_campaigns.def +1 -1
- data/test/templates/v201302/misc_use_oauth2_jwt.def +1 -1
- data/test/templates/v201306/basic_operations_get_campaigns.def +114 -0
- data/test/templates/v201306/misc_use_oauth2_jwt.def +131 -0
- metadata +142 -5
data/ChangeLog
CHANGED
data/README
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
Welcome to the next generation Google-developed Ruby client library for the
|
4
4
|
AdWords and DoubleClick Ad Exchange Buyer API!
|
5
5
|
|
6
|
-
It contains full support for v201209 and
|
7
|
-
simplified programming interface that lets you handle everything in native
|
6
|
+
It contains full support for v201209, v201302 and v201306, with full stubs, and
|
7
|
+
a simplified programming interface that lets you handle everything in native
|
8
8
|
Ruby collections.
|
9
9
|
|
10
10
|
|
@@ -63,7 +63,7 @@ To obtain OAuth2 client credentials, follow instructions on the wiki:
|
|
63
63
|
|
64
64
|
Once the library instance is create, specify which service you're looking to
|
65
65
|
use, and which version:
|
66
|
-
campaign_srv = adwords.service(:CampaignService, :
|
66
|
+
campaign_srv = adwords.service(:CampaignService, :v201306)
|
67
67
|
|
68
68
|
and you should now be able to just use the API methods in the object you were
|
69
69
|
returned:
|
@@ -69,6 +69,14 @@ if __FILE__ == $0
|
|
69
69
|
begin
|
70
70
|
create_account()
|
71
71
|
|
72
|
+
# Authorization error.
|
73
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
74
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
75
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
76
|
+
"to retrieve and store OAuth2 tokens."
|
77
|
+
puts "See this wiki page for more details:\n\n " +
|
78
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
79
|
+
|
72
80
|
# HTTP errors.
|
73
81
|
rescue AdsCommon::Errors::HttpError => e
|
74
82
|
puts "HTTP Error: %s" % e
|
@@ -96,6 +96,14 @@ if __FILE__ == $0
|
|
96
96
|
begin
|
97
97
|
get_account_alerts()
|
98
98
|
|
99
|
+
# Authorization error.
|
100
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
101
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
102
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
103
|
+
"to retrieve and store OAuth2 tokens."
|
104
|
+
puts "See this wiki page for more details:\n\n " +
|
105
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
106
|
+
|
99
107
|
# HTTP errors.
|
100
108
|
rescue AdsCommon::Errors::HttpError => e
|
101
109
|
puts "HTTP Error: %s" % e
|
@@ -119,6 +119,14 @@ if __FILE__ == $0
|
|
119
119
|
begin
|
120
120
|
get_account_changes()
|
121
121
|
|
122
|
+
# Authorization error.
|
123
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
124
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
125
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
126
|
+
"to retrieve and store OAuth2 tokens."
|
127
|
+
puts "See this wiki page for more details:\n\n " +
|
128
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
129
|
+
|
122
130
|
# HTTP errors.
|
123
131
|
rescue AdsCommon::Errors::HttpError => e
|
124
132
|
puts "HTTP Error: %s" % e
|
@@ -77,6 +77,14 @@ if __FILE__ == $0
|
|
77
77
|
begin
|
78
78
|
get_account_hierarchy()
|
79
79
|
|
80
|
+
# Authorization error.
|
81
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
82
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
83
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
84
|
+
"to retrieve and store OAuth2 tokens."
|
85
|
+
puts "See this wiki page for more details:\n\n " +
|
86
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
87
|
+
|
80
88
|
# HTTP errors.
|
81
89
|
rescue AdsCommon::Errors::HttpError => e
|
82
90
|
puts "HTTP Error: %s" % e
|
@@ -79,6 +79,14 @@ if __FILE__ == $0
|
|
79
79
|
|
80
80
|
add_ad_group_bid_modifier(ad_group_id, bid_modifier)
|
81
81
|
|
82
|
+
# Authorization error.
|
83
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
84
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
85
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
86
|
+
"to retrieve and store OAuth2 tokens."
|
87
|
+
puts "See this wiki page for more details:\n\n " +
|
88
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
89
|
+
|
82
90
|
# HTTP errors.
|
83
91
|
rescue AdsCommon::Errors::HttpError => e
|
84
92
|
puts "HTTP Error: %s" % e
|
@@ -111,6 +111,14 @@ if __FILE__ == $0
|
|
111
111
|
ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
|
112
112
|
add_click_to_download_ad(ad_group_id)
|
113
113
|
|
114
|
+
# Authorization error.
|
115
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
116
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
117
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
118
|
+
"to retrieve and store OAuth2 tokens."
|
119
|
+
puts "See this wiki page for more details:\n\n " +
|
120
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
121
|
+
|
114
122
|
# HTTP errors.
|
115
123
|
rescue AdsCommon::Errors::HttpError => e
|
116
124
|
puts "HTTP Error: %s" % e
|
@@ -195,6 +195,14 @@ if __FILE__ == $0
|
|
195
195
|
campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
|
196
196
|
add_site_links(campaign_id)
|
197
197
|
|
198
|
+
# Authorization error.
|
199
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
200
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
201
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
202
|
+
"to retrieve and store OAuth2 tokens."
|
203
|
+
puts "See this wiki page for more details:\n\n " +
|
204
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
205
|
+
|
198
206
|
# HTTP errors.
|
199
207
|
rescue AdsCommon::Errors::HttpError => e
|
200
208
|
puts "HTTP Error: %s" % e
|
@@ -121,6 +121,14 @@ if __FILE__ == $0
|
|
121
121
|
|
122
122
|
create_and_attach_shared_keyword_set(campaign_id)
|
123
123
|
|
124
|
+
# Authorization error.
|
125
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
126
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
127
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
128
|
+
"to retrieve and store OAuth2 tokens."
|
129
|
+
puts "See this wiki page for more details:\n\n " +
|
130
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
131
|
+
|
124
132
|
# HTTP errors.
|
125
133
|
rescue AdsCommon::Errors::HttpError => e
|
126
134
|
puts "HTTP Error: %s" % e
|
@@ -155,6 +155,14 @@ if __FILE__ == $0
|
|
155
155
|
|
156
156
|
find_and_remove_criteria_from_shared_set(campaign_id)
|
157
157
|
|
158
|
+
# Authorization error.
|
159
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
160
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
161
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
162
|
+
"to retrieve and store OAuth2 tokens."
|
163
|
+
puts "See this wiki page for more details:\n\n " +
|
164
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
165
|
+
|
158
166
|
# HTTP errors.
|
159
167
|
rescue AdsCommon::Errors::HttpError => e
|
160
168
|
puts "HTTP Error: %s" % e
|
@@ -80,6 +80,14 @@ if __FILE__ == $0
|
|
80
80
|
|
81
81
|
get_ad_group_bid_modifiers(campaign_id)
|
82
82
|
|
83
|
+
# Authorization error.
|
84
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
85
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
86
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
87
|
+
"to retrieve and store OAuth2 tokens."
|
88
|
+
puts "See this wiki page for more details:\n\n " +
|
89
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
90
|
+
|
83
91
|
# HTTP errors.
|
84
92
|
rescue AdsCommon::Errors::HttpError => e
|
85
93
|
puts "HTTP Error: %s" % e
|
@@ -117,6 +117,14 @@ if __FILE__ == $0
|
|
117
117
|
campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
|
118
118
|
add_ad_groups(campaign_id)
|
119
119
|
|
120
|
+
# Authorization error.
|
121
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
122
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
123
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
124
|
+
"to retrieve and store OAuth2 tokens."
|
125
|
+
puts "See this wiki page for more details:\n\n " +
|
126
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
127
|
+
|
120
128
|
# HTTP errors.
|
121
129
|
rescue AdsCommon::Errors::HttpError => e
|
122
130
|
puts "HTTP Error: %s" % e
|
@@ -136,6 +136,14 @@ if __FILE__ == $0
|
|
136
136
|
begin
|
137
137
|
add_campaigns()
|
138
138
|
|
139
|
+
# Authorization error.
|
140
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
141
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
142
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
143
|
+
"to retrieve and store OAuth2 tokens."
|
144
|
+
puts "See this wiki page for more details:\n\n " +
|
145
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
146
|
+
|
139
147
|
# HTTP errors.
|
140
148
|
rescue AdsCommon::Errors::HttpError => e
|
141
149
|
puts "HTTP Error: %s" % e
|
@@ -90,6 +90,14 @@ if __FILE__ == $0
|
|
90
90
|
ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
|
91
91
|
add_keywords(ad_group_id)
|
92
92
|
|
93
|
+
# Authorization error.
|
94
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
95
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
96
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
97
|
+
"to retrieve and store OAuth2 tokens."
|
98
|
+
puts "See this wiki page for more details:\n\n " +
|
99
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
100
|
+
|
93
101
|
# HTTP errors.
|
94
102
|
rescue AdsCommon::Errors::HttpError => e
|
95
103
|
puts "HTTP Error: %s" % e
|
@@ -87,6 +87,14 @@ if __FILE__ == $0
|
|
87
87
|
ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
|
88
88
|
add_text_ads(ad_group_id)
|
89
89
|
|
90
|
+
# Authorization error.
|
91
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
92
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
93
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
94
|
+
"to retrieve and store OAuth2 tokens."
|
95
|
+
puts "See this wiki page for more details:\n\n " +
|
96
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
97
|
+
|
90
98
|
# HTTP errors.
|
91
99
|
rescue AdsCommon::Errors::HttpError => e
|
92
100
|
puts "HTTP Error: %s" % e
|
@@ -67,6 +67,14 @@ if __FILE__ == $0
|
|
67
67
|
ad_id = 'INSERT_AD_ID_HERE'.to_i
|
68
68
|
delete_ad(ad_group_id, ad_id)
|
69
69
|
|
70
|
+
# Authorization error.
|
71
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
72
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
73
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
74
|
+
"to retrieve and store OAuth2 tokens."
|
75
|
+
puts "See this wiki page for more details:\n\n " +
|
76
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
77
|
+
|
70
78
|
# HTTP errors.
|
71
79
|
rescue AdsCommon::Errors::HttpError => e
|
72
80
|
puts "HTTP Error: %s" % e
|
@@ -84,6 +84,14 @@ if __FILE__ == $0
|
|
84
84
|
ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
|
85
85
|
delete_ad_group(ad_group_id)
|
86
86
|
|
87
|
+
# Authorization error.
|
88
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
89
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
90
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
91
|
+
"to retrieve and store OAuth2 tokens."
|
92
|
+
puts "See this wiki page for more details:\n\n " +
|
93
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
94
|
+
|
87
95
|
# HTTP errors.
|
88
96
|
rescue AdsCommon::Errors::HttpError => e
|
89
97
|
puts "HTTP Error: %s" % e
|
@@ -85,6 +85,14 @@ if __FILE__ == $0
|
|
85
85
|
campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
|
86
86
|
delete_campaign(campaign_id)
|
87
87
|
|
88
|
+
# Authorization error.
|
89
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
90
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
91
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
92
|
+
"to retrieve and store OAuth2 tokens."
|
93
|
+
puts "See this wiki page for more details:\n\n " +
|
94
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
95
|
+
|
88
96
|
# HTTP errors.
|
89
97
|
rescue AdsCommon::Errors::HttpError => e
|
90
98
|
puts "HTTP Error: %s" % e
|
@@ -72,6 +72,14 @@ if __FILE__ == $0
|
|
72
72
|
criterion_id = 'INSERT_CRITERION_ID_HERE'.to_i
|
73
73
|
delete_keyword(ad_group_id, criterion_id)
|
74
74
|
|
75
|
+
# Authorization error.
|
76
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
77
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
78
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
79
|
+
"to retrieve and store OAuth2 tokens."
|
80
|
+
puts "See this wiki page for more details:\n\n " +
|
81
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
82
|
+
|
75
83
|
# HTTP errors.
|
76
84
|
rescue AdsCommon::Errors::HttpError => e
|
77
85
|
puts "HTTP Error: %s" % e
|
@@ -80,6 +80,14 @@ if __FILE__ == $0
|
|
80
80
|
campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
|
81
81
|
get_ad_groups(campaign_id)
|
82
82
|
|
83
|
+
# Authorization error.
|
84
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
85
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
86
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
87
|
+
"to retrieve and store OAuth2 tokens."
|
88
|
+
puts "See this wiki page for more details:\n\n " +
|
89
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
90
|
+
|
83
91
|
# HTTP errors.
|
84
92
|
rescue AdsCommon::Errors::HttpError => e
|
85
93
|
puts "HTTP Error: %s" % e
|
@@ -75,6 +75,14 @@ if __FILE__ == $0
|
|
75
75
|
begin
|
76
76
|
get_campaigns()
|
77
77
|
|
78
|
+
# Authorization error.
|
79
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
80
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
81
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
82
|
+
"to retrieve and store OAuth2 tokens."
|
83
|
+
puts "See this wiki page for more details:\n\n " +
|
84
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
85
|
+
|
78
86
|
# HTTP errors.
|
79
87
|
rescue AdsCommon::Errors::HttpError => e
|
80
88
|
puts "HTTP Error: %s" % e
|
@@ -67,6 +67,14 @@ if __FILE__ == $0
|
|
67
67
|
begin
|
68
68
|
get_campaigns_with_awql()
|
69
69
|
|
70
|
+
# Authorization error.
|
71
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
72
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
73
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
74
|
+
"to retrieve and store OAuth2 tokens."
|
75
|
+
puts "See this wiki page for more details:\n\n " +
|
76
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
77
|
+
|
70
78
|
# HTTP errors.
|
71
79
|
rescue AdsCommon::Errors::HttpError => e
|
72
80
|
puts 'HTTP Error: %s' % e
|
@@ -86,6 +86,14 @@ if __FILE__ == $0
|
|
86
86
|
ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
|
87
87
|
get_keywords(ad_group_id)
|
88
88
|
|
89
|
+
# Authorization error.
|
90
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
91
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
92
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
93
|
+
"to retrieve and store OAuth2 tokens."
|
94
|
+
puts "See this wiki page for more details:\n\n " +
|
95
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
96
|
+
|
89
97
|
# HTTP errors.
|
90
98
|
rescue AdsCommon::Errors::HttpError => e
|
91
99
|
puts "HTTP Error: %s" % e
|
@@ -88,6 +88,14 @@ if __FILE__ == $0
|
|
88
88
|
ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
|
89
89
|
get_text_ads(ad_group_id)
|
90
90
|
|
91
|
+
# Authorization error.
|
92
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
93
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
94
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
95
|
+
"to retrieve and store OAuth2 tokens."
|
96
|
+
puts "See this wiki page for more details:\n\n " +
|
97
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
98
|
+
|
91
99
|
# HTTP errors.
|
92
100
|
rescue AdsCommon::Errors::HttpError => e
|
93
101
|
puts "HTTP Error: %s" % e
|
@@ -66,6 +66,14 @@ if __FILE__ == $0
|
|
66
66
|
ad_id = 'INSERT_AD_ID_HERE'.to_i
|
67
67
|
pause_ad(ad_group_id, ad_id)
|
68
68
|
|
69
|
+
# Authorization error.
|
70
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
71
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
72
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
73
|
+
"to retrieve and store OAuth2 tokens."
|
74
|
+
puts "See this wiki page for more details:\n\n " +
|
75
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
76
|
+
|
69
77
|
# HTTP errors.
|
70
78
|
rescue AdsCommon::Errors::HttpError => e
|
71
79
|
puts "HTTP Error: %s" % e
|
@@ -63,6 +63,14 @@ if __FILE__ == $0
|
|
63
63
|
ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
|
64
64
|
update_ad_group(ad_group_id)
|
65
65
|
|
66
|
+
# Authorization error.
|
67
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
68
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
69
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
70
|
+
"to retrieve and store OAuth2 tokens."
|
71
|
+
puts "See this wiki page for more details:\n\n " +
|
72
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
73
|
+
|
66
74
|
# HTTP errors.
|
67
75
|
rescue AdsCommon::Errors::HttpError => e
|
68
76
|
puts "HTTP Error: %s" % e
|
@@ -64,6 +64,14 @@ if __FILE__ == $0
|
|
64
64
|
campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
|
65
65
|
update_campaign(campaign_id)
|
66
66
|
|
67
|
+
# Authorization error.
|
68
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
69
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
70
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
71
|
+
"to retrieve and store OAuth2 tokens."
|
72
|
+
puts "See this wiki page for more details:\n\n " +
|
73
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
74
|
+
|
67
75
|
# HTTP errors.
|
68
76
|
rescue AdsCommon::Errors::HttpError => e
|
69
77
|
puts "HTTP Error: %s" % e
|
@@ -84,6 +84,14 @@ if __FILE__ == $0
|
|
84
84
|
criterion_id = 'INSERT_CRITERION_ID_HERE'.to_i
|
85
85
|
update_keyword(ad_group_id, criterion_id)
|
86
86
|
|
87
|
+
# Authorization error.
|
88
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
89
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
90
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
91
|
+
"to retrieve and store OAuth2 tokens."
|
92
|
+
puts "See this wiki page for more details:\n\n " +
|
93
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
94
|
+
|
87
95
|
# HTTP errors.
|
88
96
|
rescue AdsCommon::Errors::HttpError => e
|
89
97
|
puts "HTTP Error: %s" % e
|