google-adwords-api 0.20.1 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/README.md +3 -3
- data/examples/v201607/campaign_management/add_draft.rb +0 -1
- data/examples/v201607/campaign_management/add_trial.rb +0 -1
- data/examples/v201607/extensions/add_prices.rb +42 -44
- data/lib/adwords_api/api_config.rb +0 -86
- data/lib/adwords_api/credential_handler.rb +4 -0
- data/lib/adwords_api/errors.rb +11 -0
- data/lib/adwords_api/version.rb +1 -1
- data/test/adwords_api/test_credential_handler.rb +1 -1
- metadata +2 -165
- data/examples/v201601/account_management/create_account.rb +0 -88
- data/examples/v201601/account_management/get_account_changes.rb +0 -139
- data/examples/v201601/account_management/get_account_hierarchy.rb +0 -132
- data/examples/v201601/advanced_operations/add_ad_customizers.rb +0 -184
- data/examples/v201601/advanced_operations/add_ad_group_bid_modifier.rb +0 -101
- data/examples/v201601/advanced_operations/add_click_to_download_ad.rb +0 -133
- data/examples/v201601/advanced_operations/add_html5_ad.rb +0 -137
- data/examples/v201601/advanced_operations/add_text_ad_with_upgraded_urls.rb +0 -134
- data/examples/v201601/advanced_operations/create_and_attach_shared_keyword_set.rb +0 -141
- data/examples/v201601/advanced_operations/find_and_remove_criteria_from_shared_set.rb +0 -174
- data/examples/v201601/advanced_operations/get_ad_group_bid_modifiers.rb +0 -102
- data/examples/v201601/advanced_operations/use_shared_bidding_strategy.rb +0 -147
- data/examples/v201601/basic_operations/add_ad_groups.rb +0 -142
- data/examples/v201601/basic_operations/add_campaigns.rb +0 -139
- data/examples/v201601/basic_operations/add_keywords.rb +0 -114
- data/examples/v201601/basic_operations/add_text_ads.rb +0 -109
- data/examples/v201601/basic_operations/get_ad_groups.rb +0 -102
- data/examples/v201601/basic_operations/get_campaigns.rb +0 -97
- data/examples/v201601/basic_operations/get_campaigns_with_awql.rb +0 -89
- data/examples/v201601/basic_operations/get_keywords.rb +0 -109
- data/examples/v201601/basic_operations/get_text_ads.rb +0 -110
- data/examples/v201601/basic_operations/pause_ad.rb +0 -88
- data/examples/v201601/basic_operations/remove_ad.rb +0 -89
- data/examples/v201601/basic_operations/remove_ad_group.rb +0 -85
- data/examples/v201601/basic_operations/remove_campaign.rb +0 -87
- data/examples/v201601/basic_operations/remove_keyword.rb +0 -94
- data/examples/v201601/basic_operations/update_ad_group.rb +0 -85
- data/examples/v201601/basic_operations/update_campaign.rb +0 -86
- data/examples/v201601/basic_operations/update_keyword.rb +0 -106
- data/examples/v201601/campaign_management/add_campaign_labels.rb +0 -82
- data/examples/v201601/campaign_management/add_complete_campaigns_using_batch_job.rb +0 -356
- data/examples/v201601/campaign_management/add_experiment.rb +0 -162
- data/examples/v201601/campaign_management/add_keywords_in_bulk.rb +0 -153
- data/examples/v201601/campaign_management/add_keywords_using_incremental_batch_job.rb +0 -179
- data/examples/v201601/campaign_management/get_all_disapproved_ads.rb +0 -97
- data/examples/v201601/campaign_management/get_all_disapproved_ads_with_awql.rb +0 -89
- data/examples/v201601/campaign_management/get_campaigns_by_label.rb +0 -108
- data/examples/v201601/campaign_management/promote_experiment.rb +0 -81
- data/examples/v201601/campaign_management/set_ad_parameters.rb +0 -118
- data/examples/v201601/campaign_management/set_criterion_bid_modifier.rb +0 -104
- data/examples/v201601/campaign_management/validate_text_ad.rb +0 -110
- data/examples/v201601/error_handling/handle_partial_failures.rb +0 -130
- data/examples/v201601/error_handling/handle_policy_violation_error.rb +0 -141
- data/examples/v201601/extensions/add_google_my_business_location_extensions.rb +0 -193
- data/examples/v201601/extensions/add_site_links.rb +0 -164
- data/examples/v201601/extensions/add_site_links_using_feeds.rb +0 -281
- data/examples/v201601/migration/migrate_to_extension_settings.rb +0 -386
- data/examples/v201601/migration/upgrade_ad_url.rb +0 -93
- data/examples/v201601/misc/get_all_images_and_videos.rb +0 -104
- data/examples/v201601/misc/setup_oauth2.rb +0 -84
- data/examples/v201601/misc/upload_image.rb +0 -93
- data/examples/v201601/misc/upload_media_bundle.rb +0 -90
- data/examples/v201601/misc/use_oauth2_jwt.rb +0 -93
- data/examples/v201601/misc/use_runtime_config.rb +0 -92
- data/examples/v201601/optimization/estimate_keyword_traffic.rb +0 -146
- data/examples/v201601/optimization/get_keyword_bid_simulations.rb +0 -95
- data/examples/v201601/optimization/get_keyword_ideas.rb +0 -126
- data/examples/v201601/remarketing/add_audience.rb +0 -118
- data/examples/v201601/remarketing/add_conversion_tracker.rb +0 -97
- data/examples/v201601/remarketing/add_crm_based_user_list.rb +0 -119
- data/examples/v201601/remarketing/add_rule_based_user_lists.rb +0 -167
- data/examples/v201601/remarketing/upload_offline_conversions.rb +0 -98
- data/examples/v201601/reporting/download_criteria_report.rb +0 -92
- data/examples/v201601/reporting/download_criteria_report_with_awql.rb +0 -93
- data/examples/v201601/reporting/get_report_fields.rb +0 -75
- data/examples/v201601/reporting/parallel_report_download.rb +0 -164
- data/examples/v201601/reporting/stream_criteria_report_results.rb +0 -97
- data/examples/v201601/shopping_campaigns/add_product_partition_tree.rb +0 -267
- data/examples/v201601/shopping_campaigns/add_product_scope.rb +0 -129
- data/examples/v201601/shopping_campaigns/add_shopping_campaign.rb +0 -129
- data/examples/v201601/shopping_campaigns/get_product_category_taxonomy.rb +0 -115
- data/examples/v201601/targeting/add_campaign_targeting_criteria.rb +0 -180
- data/examples/v201601/targeting/add_demographic_targeting_criteria.rb +0 -112
- data/examples/v201601/targeting/get_campaign_targeting_criteria.rb +0 -106
- data/examples/v201601/targeting/get_targetable_languages_and_carriers.rb +0 -89
- data/examples/v201601/targeting/lookup_location.rb +0 -108
- data/examples/v201605/migration/upgrade_ad_url.rb +0 -93
- data/examples/v201607/migration/upgrade_ad_url.rb +0 -93
- data/lib/adwords_api/v201601/account_label_service.rb +0 -46
- data/lib/adwords_api/v201601/account_label_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/ad_customizer_feed_service.rb +0 -46
- data/lib/adwords_api/v201601/ad_customizer_feed_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/ad_group_ad_service.rb +0 -70
- data/lib/adwords_api/v201601/ad_group_ad_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/ad_group_bid_modifier_service.rb +0 -54
- data/lib/adwords_api/v201601/ad_group_bid_modifier_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/ad_group_criterion_service.rb +0 -62
- data/lib/adwords_api/v201601/ad_group_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/ad_group_extension_setting_service.rb +0 -54
- data/lib/adwords_api/v201601/ad_group_extension_setting_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/ad_group_feed_service.rb +0 -54
- data/lib/adwords_api/v201601/ad_group_feed_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/ad_group_service.rb +0 -62
- data/lib/adwords_api/v201601/ad_group_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/ad_param_service.rb +0 -46
- data/lib/adwords_api/v201601/ad_param_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/adwords_user_list_service.rb +0 -54
- data/lib/adwords_api/v201601/adwords_user_list_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/batch_job_service.rb +0 -54
- data/lib/adwords_api/v201601/batch_job_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/bidding_strategy_service.rb +0 -54
- data/lib/adwords_api/v201601/bidding_strategy_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/budget_order_service.rb +0 -54
- data/lib/adwords_api/v201601/budget_order_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/budget_service.rb +0 -54
- data/lib/adwords_api/v201601/budget_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/campaign_criterion_service.rb +0 -54
- data/lib/adwords_api/v201601/campaign_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/campaign_extension_setting_service.rb +0 -54
- data/lib/adwords_api/v201601/campaign_extension_setting_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/campaign_feed_service.rb +0 -54
- data/lib/adwords_api/v201601/campaign_feed_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/campaign_service.rb +0 -62
- data/lib/adwords_api/v201601/campaign_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/campaign_shared_set_service.rb +0 -54
- data/lib/adwords_api/v201601/campaign_shared_set_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/constant_data_service.rb +0 -110
- data/lib/adwords_api/v201601/constant_data_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/conversion_tracker_service.rb +0 -54
- data/lib/adwords_api/v201601/conversion_tracker_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/customer_extension_setting_service.rb +0 -54
- data/lib/adwords_api/v201601/customer_extension_setting_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/customer_feed_service.rb +0 -54
- data/lib/adwords_api/v201601/customer_feed_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/customer_service.rb +0 -54
- data/lib/adwords_api/v201601/customer_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/customer_sync_service.rb +0 -38
- data/lib/adwords_api/v201601/customer_sync_service_registry.rb +0 -47
- data/lib/adwords_api/v201601/data_service.rb +0 -78
- data/lib/adwords_api/v201601/data_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/experiment_service.rb +0 -46
- data/lib/adwords_api/v201601/experiment_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/feed_item_service.rb +0 -54
- data/lib/adwords_api/v201601/feed_item_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/feed_mapping_service.rb +0 -54
- data/lib/adwords_api/v201601/feed_mapping_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/feed_service.rb +0 -54
- data/lib/adwords_api/v201601/feed_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/label_service.rb +0 -54
- data/lib/adwords_api/v201601/label_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/location_criterion_service.rb +0 -46
- data/lib/adwords_api/v201601/location_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/managed_customer_service.rb +0 -78
- data/lib/adwords_api/v201601/managed_customer_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/media_service.rb +0 -54
- data/lib/adwords_api/v201601/media_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/mutate_job_service.rb +0 -54
- data/lib/adwords_api/v201601/mutate_job_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/offline_conversion_feed_service.rb +0 -38
- data/lib/adwords_api/v201601/offline_conversion_feed_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/report_definition_service.rb +0 -38
- data/lib/adwords_api/v201601/report_definition_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/shared_criterion_service.rb +0 -54
- data/lib/adwords_api/v201601/shared_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/shared_set_service.rb +0 -54
- data/lib/adwords_api/v201601/shared_set_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/targeting_idea_service.rb +0 -38
- data/lib/adwords_api/v201601/targeting_idea_service_registry.rb +0 -46
- data/lib/adwords_api/v201601/traffic_estimator_service.rb +0 -38
- data/lib/adwords_api/v201601/traffic_estimator_service_registry.rb +0 -46
- data/test/templates/v201601/basic_operations_get_campaigns.def +0 -116
- data/test/templates/v201601/basic_operations_update_keyword.def +0 -125
- data/test/templates/v201601/misc_use_oauth2_jwt.def +0 -131
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d73022e994632c2dc38905e4023f36a312485bfb
|
4
|
+
data.tar.gz: f987ecd040907e791cd475e686baa73b8894b0d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2c2e11cdb4970db90341a168c87a62089d1c8977ffb4057cde289f7bfdb4a8b55c0bc22792408be0eb99fc4eeec2636f6524c4b729149ee5f5a27802955f5c3
|
7
|
+
data.tar.gz: 50445dba9264e6e0050ce45318c8173ce04738d4cf1a575e9ad1e17ceb8bab369aed1a45f1d747b110455a15dc643f46c607635f8ecfced822a996ae7ecb4281
|
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -69,7 +69,7 @@ The basics of making a request are:
|
|
69
69
|
|
70
70
|
3. Specify which service you're looking to use, and which version:
|
71
71
|
|
72
|
-
campaign_srv = adwords.service(:CampaignService, :
|
72
|
+
campaign_srv = adwords.service(:CampaignService, :v201607)
|
73
73
|
|
74
74
|
4. You should now be able to just use the API methods in the returned object:
|
75
75
|
|
@@ -191,7 +191,7 @@ To target a specific version:
|
|
191
191
|
|
192
192
|
For example:
|
193
193
|
|
194
|
-
$ rake generate[
|
194
|
+
$ rake generate[v201607]
|
195
195
|
|
196
196
|
To target a specific service in a specific version:
|
197
197
|
|
@@ -199,7 +199,7 @@ To target a specific service in a specific version:
|
|
199
199
|
|
200
200
|
For example:
|
201
201
|
|
202
|
-
$ rake generate[
|
202
|
+
$ rake generate[v201607,CampaignService]
|
203
203
|
|
204
204
|
To build the gems:
|
205
205
|
|
@@ -64,48 +64,30 @@ def add_prices(campaign_id)
|
|
64
64
|
},
|
65
65
|
# To create a price extension, at least three table rows are needed.
|
66
66
|
:table_rows => [
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
:currency_code => 'USD'
|
92
|
-
},
|
93
|
-
:price_unit => 'PER_MONTH'
|
94
|
-
},
|
95
|
-
{
|
96
|
-
:header => 'Skin Care Package',
|
97
|
-
:description => 'Four times a month',
|
98
|
-
:final_urls => {
|
99
|
-
:urls => ['http://www.example.com/skincarepackage']
|
100
|
-
},
|
101
|
-
:price => {
|
102
|
-
:money => {
|
103
|
-
:micro_amount => 250 * MICROS_PER_DOLLAR
|
104
|
-
},
|
105
|
-
:currency_code => 'USD'
|
106
|
-
},
|
107
|
-
:price_unit => 'PER_MONTH'
|
108
|
-
}
|
67
|
+
create_price_table_row(
|
68
|
+
'Scrubs',
|
69
|
+
'Body Scrub, Salt Scrub',
|
70
|
+
'http://www.example.com/scrubs',
|
71
|
+
60000000,
|
72
|
+
'USD',
|
73
|
+
'PER_HOUR'
|
74
|
+
),
|
75
|
+
create_price_table_row(
|
76
|
+
'Hair Cuts',
|
77
|
+
'Once a month',
|
78
|
+
'http://www.example.com/haircuts',
|
79
|
+
75000000,
|
80
|
+
'USD',
|
81
|
+
'PER_MONTH'
|
82
|
+
),
|
83
|
+
create_price_table_row(
|
84
|
+
'Skin Care Package',
|
85
|
+
'Four times a month',
|
86
|
+
'http://www.example.com/skincarepackage',
|
87
|
+
250000000,
|
88
|
+
'USD',
|
89
|
+
'PER_MONTH'
|
90
|
+
)
|
109
91
|
]
|
110
92
|
}
|
111
93
|
|
@@ -128,11 +110,27 @@ def add_prices(campaign_id)
|
|
128
110
|
new_extension_setting[:extension_type]
|
129
111
|
end
|
130
112
|
|
113
|
+
def create_price_table_row(
|
114
|
+
header, description, final_url, price_in_micros, currency_code, price_unit)
|
115
|
+
return {
|
116
|
+
:header => header,
|
117
|
+
:description => description,
|
118
|
+
:final_urls => {
|
119
|
+
:urls => [final_url]
|
120
|
+
},
|
121
|
+
:price => {
|
122
|
+
:money => {
|
123
|
+
:micro_amount => price_in_micros
|
124
|
+
},
|
125
|
+
:currency_code => currency_code
|
126
|
+
},
|
127
|
+
:price_unit => price_unit
|
128
|
+
}
|
129
|
+
end
|
130
|
+
|
131
131
|
if __FILE__ == $0
|
132
132
|
API_VERSION = :v201607
|
133
133
|
|
134
|
-
MICROS_PER_DOLLAR = 1000000
|
135
|
-
|
136
134
|
begin
|
137
135
|
# Campaign ID to add site link to.
|
138
136
|
campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
|
@@ -43,49 +43,6 @@ module AdwordsApi
|
|
43
43
|
|
44
44
|
# Configure the services available to each version
|
45
45
|
@@service_config = {
|
46
|
-
:v201601 => [
|
47
|
-
:AccountLabelService,
|
48
|
-
:AdCustomizerFeedService,
|
49
|
-
:AdGroupAdService,
|
50
|
-
:AdGroupBidModifierService,
|
51
|
-
:AdGroupCriterionService,
|
52
|
-
:AdGroupExtensionSettingService,
|
53
|
-
:AdGroupFeedService,
|
54
|
-
:AdGroupService,
|
55
|
-
:AdParamService,
|
56
|
-
:AdwordsUserListService,
|
57
|
-
:BatchJobService,
|
58
|
-
:BiddingStrategyService,
|
59
|
-
:BudgetOrderService,
|
60
|
-
:BudgetService,
|
61
|
-
:CampaignCriterionService,
|
62
|
-
:CampaignExtensionSettingService,
|
63
|
-
:CampaignFeedService,
|
64
|
-
:CampaignService,
|
65
|
-
:CampaignSharedSetService,
|
66
|
-
:ConstantDataService,
|
67
|
-
:ConversionTrackerService,
|
68
|
-
:CustomerExtensionSettingService,
|
69
|
-
:CustomerFeedService,
|
70
|
-
:CustomerService,
|
71
|
-
:CustomerSyncService,
|
72
|
-
:DataService,
|
73
|
-
:ExperimentService,
|
74
|
-
:FeedItemService,
|
75
|
-
:FeedMappingService,
|
76
|
-
:FeedService,
|
77
|
-
:LabelService,
|
78
|
-
:LocationCriterionService,
|
79
|
-
:ManagedCustomerService,
|
80
|
-
:MediaService,
|
81
|
-
:MutateJobService,
|
82
|
-
:OfflineConversionFeedService,
|
83
|
-
:ReportDefinitionService,
|
84
|
-
:SharedCriterionService,
|
85
|
-
:SharedSetService,
|
86
|
-
:TargetingIdeaService,
|
87
|
-
:TrafficEstimatorService
|
88
|
-
],
|
89
46
|
:v201603 => [
|
90
47
|
:AccountLabelService,
|
91
48
|
:AdCustomizerFeedService,
|
@@ -231,7 +188,6 @@ module AdwordsApi
|
|
231
188
|
:PRODUCTION => {
|
232
189
|
:oauth_scope => 'https://www.googleapis.com/auth/adwords',
|
233
190
|
:header_ns => 'https://adwords.google.com/api/adwords/cm/',
|
234
|
-
:v201601 => 'https://adwords.google.com/api/adwords/',
|
235
191
|
:v201603 => 'https://adwords.google.com/api/adwords/',
|
236
192
|
:v201605 => 'https://adwords.google.com/api/adwords/',
|
237
193
|
:v201607 => 'https://adwords.google.com/api/adwords/'
|
@@ -241,48 +197,6 @@ module AdwordsApi
|
|
241
197
|
# Configure the subdirectories for each version / service pair.
|
242
198
|
# A missing pair means that only the base URL is used.
|
243
199
|
@@subdir_config = {
|
244
|
-
# v201601
|
245
|
-
[:v201601, :AccountLabelService] => 'mcm/',
|
246
|
-
[:v201601, :AdCustomizerFeedService] => 'cm/',
|
247
|
-
[:v201601, :AdGroupAdService] => 'cm/',
|
248
|
-
[:v201601, :AdGroupBidModifierService] => 'cm/',
|
249
|
-
[:v201601, :AdGroupCriterionService] => 'cm/',
|
250
|
-
[:v201601, :AdGroupExtensionSettingService] => 'cm/',
|
251
|
-
[:v201601, :AdGroupFeedService] => 'cm/',
|
252
|
-
[:v201601, :AdGroupService] => 'cm/',
|
253
|
-
[:v201601, :AdParamService] => 'cm/',
|
254
|
-
[:v201601, :BatchJobService] => 'cm/',
|
255
|
-
[:v201601, :BudgetOrderService] => 'billing/',
|
256
|
-
[:v201601, :CampaignCriterionService] => 'cm/',
|
257
|
-
[:v201601, :CampaignExtensionSettingService] => 'cm/',
|
258
|
-
[:v201601, :CampaignFeedService] => 'cm/',
|
259
|
-
[:v201601, :CampaignService] => 'cm/',
|
260
|
-
[:v201601, :CampaignSharedSetService] => 'cm/',
|
261
|
-
[:v201601, :ConstantDataService] => 'cm/',
|
262
|
-
[:v201601, :ConversionTrackerService] => 'cm/',
|
263
|
-
[:v201601, :CustomerExtensionSettingService] => 'cm/',
|
264
|
-
[:v201601, :CustomerSyncService] => 'ch/',
|
265
|
-
[:v201601, :DataService] => 'cm/',
|
266
|
-
[:v201601, :ExperimentService] => 'cm/',
|
267
|
-
[:v201601, :FeedItemService] => 'cm/',
|
268
|
-
[:v201601, :FeedMappingService] => 'cm/',
|
269
|
-
[:v201601, :FeedService] => 'cm/',
|
270
|
-
[:v201601, :LocationCriterionService] => 'cm/',
|
271
|
-
[:v201601, :MediaService] => 'cm/',
|
272
|
-
[:v201601, :MutateJobService] => 'cm/',
|
273
|
-
[:v201601, :OfflineConversionFeedService] => 'cm/',
|
274
|
-
[:v201601, :ReportDefinitionService] => 'cm/',
|
275
|
-
[:v201601, :SharedCriterionService] => 'cm/',
|
276
|
-
[:v201601, :SharedSetService] => 'cm/',
|
277
|
-
[:v201601, :TargetingIdeaService] => 'o/',
|
278
|
-
[:v201601, :TrafficEstimatorService] => 'o/',
|
279
|
-
[:v201601, :ManagedCustomerService] => 'mcm/',
|
280
|
-
[:v201601, :CustomerService] => 'mcm/',
|
281
|
-
[:v201601, :CustomerFeedService] => 'cm/',
|
282
|
-
[:v201601, :BudgetService] => 'cm/',
|
283
|
-
[:v201601, :BiddingStrategyService] => 'cm/',
|
284
|
-
[:v201601, :AdwordsUserListService] => 'rm/',
|
285
|
-
[:v201601, :LabelService] => 'cm/',
|
286
200
|
# v201603
|
287
201
|
[:v201603, :AccountLabelService] => 'mcm/',
|
288
202
|
[:v201603, :AdCustomizerFeedService] => 'cm/',
|
@@ -54,6 +54,10 @@ module AdwordsApi
|
|
54
54
|
# Generates string to use as user agent in headers.
|
55
55
|
def generate_user_agent(extra_ids = [])
|
56
56
|
agent_app = @config.read('authentication.user_agent')
|
57
|
+
if !agent_app.nil? && !agent_app.ascii_only?
|
58
|
+
raise AdwordsApi::Errors::InvalidUserAgentError.new(
|
59
|
+
'User agent contains non-ASCII characters.', agent_app)
|
60
|
+
end
|
57
61
|
extra_ids << ['AwApi-Ruby/%s' % AdwordsApi::ApiConfig::CLIENT_LIB_VERSION]
|
58
62
|
super(extra_ids, agent_app)
|
59
63
|
end
|
data/lib/adwords_api/errors.rb
CHANGED
@@ -93,7 +93,18 @@ module AdwordsApi
|
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
96
|
+
# Error for use an unsupported operation in a batch job.
|
96
97
|
class InvalidBatchJobOperationError < AdsCommon::Errors::ApiException
|
97
98
|
end
|
99
|
+
|
100
|
+
# Error for using an invalid user agent string.
|
101
|
+
class InvalidUserAgentError < AdsCommon::Errors::Error
|
102
|
+
attr_reader :user_agent
|
103
|
+
|
104
|
+
def initialize(message, user_agent)
|
105
|
+
super(message)
|
106
|
+
@user_agent = user_agent
|
107
|
+
end
|
108
|
+
end
|
98
109
|
end
|
99
110
|
end
|
data/lib/adwords_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-adwords-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danial Klimkin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-08-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-ads-common
|
@@ -64,82 +64,6 @@ files:
|
|
64
64
|
- ChangeLog
|
65
65
|
- README.md
|
66
66
|
- adwords_api.yml
|
67
|
-
- examples/v201601/account_management/create_account.rb
|
68
|
-
- examples/v201601/account_management/get_account_changes.rb
|
69
|
-
- examples/v201601/account_management/get_account_hierarchy.rb
|
70
|
-
- examples/v201601/advanced_operations/add_ad_customizers.rb
|
71
|
-
- examples/v201601/advanced_operations/add_ad_group_bid_modifier.rb
|
72
|
-
- examples/v201601/advanced_operations/add_click_to_download_ad.rb
|
73
|
-
- examples/v201601/advanced_operations/add_html5_ad.rb
|
74
|
-
- examples/v201601/advanced_operations/add_text_ad_with_upgraded_urls.rb
|
75
|
-
- examples/v201601/advanced_operations/create_and_attach_shared_keyword_set.rb
|
76
|
-
- examples/v201601/advanced_operations/find_and_remove_criteria_from_shared_set.rb
|
77
|
-
- examples/v201601/advanced_operations/get_ad_group_bid_modifiers.rb
|
78
|
-
- examples/v201601/advanced_operations/use_shared_bidding_strategy.rb
|
79
|
-
- examples/v201601/basic_operations/add_ad_groups.rb
|
80
|
-
- examples/v201601/basic_operations/add_campaigns.rb
|
81
|
-
- examples/v201601/basic_operations/add_keywords.rb
|
82
|
-
- examples/v201601/basic_operations/add_text_ads.rb
|
83
|
-
- examples/v201601/basic_operations/get_ad_groups.rb
|
84
|
-
- examples/v201601/basic_operations/get_campaigns.rb
|
85
|
-
- examples/v201601/basic_operations/get_campaigns_with_awql.rb
|
86
|
-
- examples/v201601/basic_operations/get_keywords.rb
|
87
|
-
- examples/v201601/basic_operations/get_text_ads.rb
|
88
|
-
- examples/v201601/basic_operations/pause_ad.rb
|
89
|
-
- examples/v201601/basic_operations/remove_ad.rb
|
90
|
-
- examples/v201601/basic_operations/remove_ad_group.rb
|
91
|
-
- examples/v201601/basic_operations/remove_campaign.rb
|
92
|
-
- examples/v201601/basic_operations/remove_keyword.rb
|
93
|
-
- examples/v201601/basic_operations/update_ad_group.rb
|
94
|
-
- examples/v201601/basic_operations/update_campaign.rb
|
95
|
-
- examples/v201601/basic_operations/update_keyword.rb
|
96
|
-
- examples/v201601/campaign_management/add_campaign_labels.rb
|
97
|
-
- examples/v201601/campaign_management/add_complete_campaigns_using_batch_job.rb
|
98
|
-
- examples/v201601/campaign_management/add_experiment.rb
|
99
|
-
- examples/v201601/campaign_management/add_keywords_in_bulk.rb
|
100
|
-
- examples/v201601/campaign_management/add_keywords_using_incremental_batch_job.rb
|
101
|
-
- examples/v201601/campaign_management/get_all_disapproved_ads.rb
|
102
|
-
- examples/v201601/campaign_management/get_all_disapproved_ads_with_awql.rb
|
103
|
-
- examples/v201601/campaign_management/get_campaigns_by_label.rb
|
104
|
-
- examples/v201601/campaign_management/promote_experiment.rb
|
105
|
-
- examples/v201601/campaign_management/set_ad_parameters.rb
|
106
|
-
- examples/v201601/campaign_management/set_criterion_bid_modifier.rb
|
107
|
-
- examples/v201601/campaign_management/validate_text_ad.rb
|
108
|
-
- examples/v201601/error_handling/handle_partial_failures.rb
|
109
|
-
- examples/v201601/error_handling/handle_policy_violation_error.rb
|
110
|
-
- examples/v201601/extensions/add_google_my_business_location_extensions.rb
|
111
|
-
- examples/v201601/extensions/add_site_links.rb
|
112
|
-
- examples/v201601/extensions/add_site_links_using_feeds.rb
|
113
|
-
- examples/v201601/migration/migrate_to_extension_settings.rb
|
114
|
-
- examples/v201601/migration/upgrade_ad_url.rb
|
115
|
-
- examples/v201601/misc/get_all_images_and_videos.rb
|
116
|
-
- examples/v201601/misc/setup_oauth2.rb
|
117
|
-
- examples/v201601/misc/upload_image.rb
|
118
|
-
- examples/v201601/misc/upload_media_bundle.rb
|
119
|
-
- examples/v201601/misc/use_oauth2_jwt.rb
|
120
|
-
- examples/v201601/misc/use_runtime_config.rb
|
121
|
-
- examples/v201601/optimization/estimate_keyword_traffic.rb
|
122
|
-
- examples/v201601/optimization/get_keyword_bid_simulations.rb
|
123
|
-
- examples/v201601/optimization/get_keyword_ideas.rb
|
124
|
-
- examples/v201601/remarketing/add_audience.rb
|
125
|
-
- examples/v201601/remarketing/add_conversion_tracker.rb
|
126
|
-
- examples/v201601/remarketing/add_crm_based_user_list.rb
|
127
|
-
- examples/v201601/remarketing/add_rule_based_user_lists.rb
|
128
|
-
- examples/v201601/remarketing/upload_offline_conversions.rb
|
129
|
-
- examples/v201601/reporting/download_criteria_report.rb
|
130
|
-
- examples/v201601/reporting/download_criteria_report_with_awql.rb
|
131
|
-
- examples/v201601/reporting/get_report_fields.rb
|
132
|
-
- examples/v201601/reporting/parallel_report_download.rb
|
133
|
-
- examples/v201601/reporting/stream_criteria_report_results.rb
|
134
|
-
- examples/v201601/shopping_campaigns/add_product_partition_tree.rb
|
135
|
-
- examples/v201601/shopping_campaigns/add_product_scope.rb
|
136
|
-
- examples/v201601/shopping_campaigns/add_shopping_campaign.rb
|
137
|
-
- examples/v201601/shopping_campaigns/get_product_category_taxonomy.rb
|
138
|
-
- examples/v201601/targeting/add_campaign_targeting_criteria.rb
|
139
|
-
- examples/v201601/targeting/add_demographic_targeting_criteria.rb
|
140
|
-
- examples/v201601/targeting/get_campaign_targeting_criteria.rb
|
141
|
-
- examples/v201601/targeting/get_targetable_languages_and_carriers.rb
|
142
|
-
- examples/v201601/targeting/lookup_location.rb
|
143
67
|
- examples/v201603/account_management/create_account.rb
|
144
68
|
- examples/v201603/account_management/get_account_changes.rb
|
145
69
|
- examples/v201603/account_management/get_account_hierarchy.rb
|
@@ -271,7 +195,6 @@ files:
|
|
271
195
|
- examples/v201605/extensions/add_site_links.rb
|
272
196
|
- examples/v201605/extensions/add_site_links_using_feeds.rb
|
273
197
|
- examples/v201605/migration/migrate_to_extension_settings.rb
|
274
|
-
- examples/v201605/migration/upgrade_ad_url.rb
|
275
198
|
- examples/v201605/misc/get_all_images_and_videos.rb
|
276
199
|
- examples/v201605/misc/setup_oauth2.rb
|
277
200
|
- examples/v201605/misc/upload_image.rb
|
@@ -354,7 +277,6 @@ files:
|
|
354
277
|
- examples/v201607/extensions/add_site_links.rb
|
355
278
|
- examples/v201607/extensions/add_site_links_using_feeds.rb
|
356
279
|
- examples/v201607/migration/migrate_to_extension_settings.rb
|
357
|
-
- examples/v201607/migration/upgrade_ad_url.rb
|
358
280
|
- examples/v201607/misc/get_all_images_and_videos.rb
|
359
281
|
- examples/v201607/misc/setup_oauth2.rb
|
360
282
|
- examples/v201607/misc/upload_image.rb
|
@@ -395,88 +317,6 @@ files:
|
|
395
317
|
- lib/adwords_api/report_utils.rb
|
396
318
|
- lib/adwords_api/utils.rb
|
397
319
|
- lib/adwords_api/utils_reporter.rb
|
398
|
-
- lib/adwords_api/v201601/account_label_service.rb
|
399
|
-
- lib/adwords_api/v201601/account_label_service_registry.rb
|
400
|
-
- lib/adwords_api/v201601/ad_customizer_feed_service.rb
|
401
|
-
- lib/adwords_api/v201601/ad_customizer_feed_service_registry.rb
|
402
|
-
- lib/adwords_api/v201601/ad_group_ad_service.rb
|
403
|
-
- lib/adwords_api/v201601/ad_group_ad_service_registry.rb
|
404
|
-
- lib/adwords_api/v201601/ad_group_bid_modifier_service.rb
|
405
|
-
- lib/adwords_api/v201601/ad_group_bid_modifier_service_registry.rb
|
406
|
-
- lib/adwords_api/v201601/ad_group_criterion_service.rb
|
407
|
-
- lib/adwords_api/v201601/ad_group_criterion_service_registry.rb
|
408
|
-
- lib/adwords_api/v201601/ad_group_extension_setting_service.rb
|
409
|
-
- lib/adwords_api/v201601/ad_group_extension_setting_service_registry.rb
|
410
|
-
- lib/adwords_api/v201601/ad_group_feed_service.rb
|
411
|
-
- lib/adwords_api/v201601/ad_group_feed_service_registry.rb
|
412
|
-
- lib/adwords_api/v201601/ad_group_service.rb
|
413
|
-
- lib/adwords_api/v201601/ad_group_service_registry.rb
|
414
|
-
- lib/adwords_api/v201601/ad_param_service.rb
|
415
|
-
- lib/adwords_api/v201601/ad_param_service_registry.rb
|
416
|
-
- lib/adwords_api/v201601/adwords_user_list_service.rb
|
417
|
-
- lib/adwords_api/v201601/adwords_user_list_service_registry.rb
|
418
|
-
- lib/adwords_api/v201601/batch_job_service.rb
|
419
|
-
- lib/adwords_api/v201601/batch_job_service_registry.rb
|
420
|
-
- lib/adwords_api/v201601/bidding_strategy_service.rb
|
421
|
-
- lib/adwords_api/v201601/bidding_strategy_service_registry.rb
|
422
|
-
- lib/adwords_api/v201601/budget_order_service.rb
|
423
|
-
- lib/adwords_api/v201601/budget_order_service_registry.rb
|
424
|
-
- lib/adwords_api/v201601/budget_service.rb
|
425
|
-
- lib/adwords_api/v201601/budget_service_registry.rb
|
426
|
-
- lib/adwords_api/v201601/campaign_criterion_service.rb
|
427
|
-
- lib/adwords_api/v201601/campaign_criterion_service_registry.rb
|
428
|
-
- lib/adwords_api/v201601/campaign_extension_setting_service.rb
|
429
|
-
- lib/adwords_api/v201601/campaign_extension_setting_service_registry.rb
|
430
|
-
- lib/adwords_api/v201601/campaign_feed_service.rb
|
431
|
-
- lib/adwords_api/v201601/campaign_feed_service_registry.rb
|
432
|
-
- lib/adwords_api/v201601/campaign_service.rb
|
433
|
-
- lib/adwords_api/v201601/campaign_service_registry.rb
|
434
|
-
- lib/adwords_api/v201601/campaign_shared_set_service.rb
|
435
|
-
- lib/adwords_api/v201601/campaign_shared_set_service_registry.rb
|
436
|
-
- lib/adwords_api/v201601/constant_data_service.rb
|
437
|
-
- lib/adwords_api/v201601/constant_data_service_registry.rb
|
438
|
-
- lib/adwords_api/v201601/conversion_tracker_service.rb
|
439
|
-
- lib/adwords_api/v201601/conversion_tracker_service_registry.rb
|
440
|
-
- lib/adwords_api/v201601/customer_extension_setting_service.rb
|
441
|
-
- lib/adwords_api/v201601/customer_extension_setting_service_registry.rb
|
442
|
-
- lib/adwords_api/v201601/customer_feed_service.rb
|
443
|
-
- lib/adwords_api/v201601/customer_feed_service_registry.rb
|
444
|
-
- lib/adwords_api/v201601/customer_service.rb
|
445
|
-
- lib/adwords_api/v201601/customer_service_registry.rb
|
446
|
-
- lib/adwords_api/v201601/customer_sync_service.rb
|
447
|
-
- lib/adwords_api/v201601/customer_sync_service_registry.rb
|
448
|
-
- lib/adwords_api/v201601/data_service.rb
|
449
|
-
- lib/adwords_api/v201601/data_service_registry.rb
|
450
|
-
- lib/adwords_api/v201601/experiment_service.rb
|
451
|
-
- lib/adwords_api/v201601/experiment_service_registry.rb
|
452
|
-
- lib/adwords_api/v201601/feed_item_service.rb
|
453
|
-
- lib/adwords_api/v201601/feed_item_service_registry.rb
|
454
|
-
- lib/adwords_api/v201601/feed_mapping_service.rb
|
455
|
-
- lib/adwords_api/v201601/feed_mapping_service_registry.rb
|
456
|
-
- lib/adwords_api/v201601/feed_service.rb
|
457
|
-
- lib/adwords_api/v201601/feed_service_registry.rb
|
458
|
-
- lib/adwords_api/v201601/label_service.rb
|
459
|
-
- lib/adwords_api/v201601/label_service_registry.rb
|
460
|
-
- lib/adwords_api/v201601/location_criterion_service.rb
|
461
|
-
- lib/adwords_api/v201601/location_criterion_service_registry.rb
|
462
|
-
- lib/adwords_api/v201601/managed_customer_service.rb
|
463
|
-
- lib/adwords_api/v201601/managed_customer_service_registry.rb
|
464
|
-
- lib/adwords_api/v201601/media_service.rb
|
465
|
-
- lib/adwords_api/v201601/media_service_registry.rb
|
466
|
-
- lib/adwords_api/v201601/mutate_job_service.rb
|
467
|
-
- lib/adwords_api/v201601/mutate_job_service_registry.rb
|
468
|
-
- lib/adwords_api/v201601/offline_conversion_feed_service.rb
|
469
|
-
- lib/adwords_api/v201601/offline_conversion_feed_service_registry.rb
|
470
|
-
- lib/adwords_api/v201601/report_definition_service.rb
|
471
|
-
- lib/adwords_api/v201601/report_definition_service_registry.rb
|
472
|
-
- lib/adwords_api/v201601/shared_criterion_service.rb
|
473
|
-
- lib/adwords_api/v201601/shared_criterion_service_registry.rb
|
474
|
-
- lib/adwords_api/v201601/shared_set_service.rb
|
475
|
-
- lib/adwords_api/v201601/shared_set_service_registry.rb
|
476
|
-
- lib/adwords_api/v201601/targeting_idea_service.rb
|
477
|
-
- lib/adwords_api/v201601/targeting_idea_service_registry.rb
|
478
|
-
- lib/adwords_api/v201601/traffic_estimator_service.rb
|
479
|
-
- lib/adwords_api/v201601/traffic_estimator_service_registry.rb
|
480
320
|
- lib/adwords_api/v201603/account_label_service.rb
|
481
321
|
- lib/adwords_api/v201603/account_label_service_registry.rb
|
482
322
|
- lib/adwords_api/v201603/ad_customizer_feed_service.rb
|
@@ -753,9 +593,6 @@ files:
|
|
753
593
|
- test/coverage.rb
|
754
594
|
- test/suite_integration.rb
|
755
595
|
- test/suite_unittests.rb
|
756
|
-
- test/templates/v201601/basic_operations_get_campaigns.def
|
757
|
-
- test/templates/v201601/basic_operations_update_keyword.def
|
758
|
-
- test/templates/v201601/misc_use_oauth2_jwt.def
|
759
596
|
- test/templates/v201603/basic_operations_get_campaigns.def
|
760
597
|
- test/templates/v201603/basic_operations_update_keyword.def
|
761
598
|
- test/templates/v201603/misc_use_oauth2_jwt.def
|