google-adwords-api 0.7.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +6 -0
- data/README +12 -9
- data/adwords_api.yml +3 -17
- data/examples/v201206/account_management/create_account.rb +3 -0
- data/examples/v201206/account_management/get_account_alerts.rb +3 -0
- data/examples/v201206/account_management/get_account_hierarchy.rb +3 -0
- data/examples/v201206/account_management/get_client_customer_id.rb +3 -0
- data/examples/v201206/account_management/get_client_unit_usage.rb +3 -0
- data/examples/v201206/reporting/parallel_report_download.rb +3 -0
- data/examples/v201209/account_management/create_account.rb +3 -0
- data/examples/v201209/account_management/get_account_alerts.rb +3 -0
- data/examples/v201209/account_management/get_account_hierarchy.rb +3 -0
- data/examples/v201209/account_management/get_client_customer_id.rb +3 -0
- data/examples/v201209/account_management/get_client_unit_usage.rb +3 -0
- data/examples/{v201109/misc/use_oauth2.rb → v201209/misc/use_oauth2_jwt.rb} +19 -23
- data/examples/v201209/reporting/parallel_report_download.rb +3 -0
- data/lib/adwords_api.rb +8 -3
- data/lib/adwords_api/api_config.rb +0 -132
- data/lib/adwords_api/credential_handler.rb +3 -17
- data/lib/adwords_api/report_header_handler.rb +1 -2
- data/lib/adwords_api/report_utils.rb +1 -8
- data/lib/adwords_api/version.rb +1 -1
- data/test/adwords_api/test_adwords_api.rb +23 -9
- data/test/adwords_api/test_api_config.rb +0 -8
- data/test/adwords_api/test_credential_handler.rb +45 -9
- data/test/adwords_api/test_report_utils.rb +3 -2
- data/test/{suite_exampletests_v201109.rb → suite_integration.rb} +14 -11
- data/test/templates/v201209/basic_operations_get_campaigns.def +114 -0
- data/test/test_utils.rb +105 -0
- metadata +8 -250
- data/examples/v201109/account_management/create_account.rb +0 -80
- data/examples/v201109/account_management/get_account_alerts.rb +0 -111
- data/examples/v201109/account_management/get_account_changes.rb +0 -137
- data/examples/v201109/account_management/get_account_hierarchy.rb +0 -93
- data/examples/v201109/account_management/get_client_customer_id.rb +0 -85
- data/examples/v201109/account_management/get_client_unit_usage.rb +0 -87
- data/examples/v201109/basic_operations/add_ad_groups.rb +0 -111
- data/examples/v201109/basic_operations/add_campaigns.rb +0 -125
- data/examples/v201109/basic_operations/add_keywords.rb +0 -108
- data/examples/v201109/basic_operations/add_text_ads.rb +0 -105
- data/examples/v201109/basic_operations/delete_ad.rb +0 -85
- data/examples/v201109/basic_operations/delete_ad_group.rb +0 -102
- data/examples/v201109/basic_operations/delete_campaign.rb +0 -103
- data/examples/v201109/basic_operations/delete_keyword.rb +0 -90
- data/examples/v201109/basic_operations/get_ad_groups.rb +0 -98
- data/examples/v201109/basic_operations/get_campaigns.rb +0 -93
- data/examples/v201109/basic_operations/get_keywords.rb +0 -104
- data/examples/v201109/basic_operations/get_text_ads.rb +0 -106
- data/examples/v201109/basic_operations/pause_ad.rb +0 -84
- data/examples/v201109/basic_operations/update_ad_group.rb +0 -81
- data/examples/v201109/basic_operations/update_campaign.rb +0 -84
- data/examples/v201109/basic_operations/update_keyword.rb +0 -99
- data/examples/v201109/campaign_management/add_experiment.rb +0 -158
- data/examples/v201109/campaign_management/add_keywords_in_bulk.rb +0 -150
- data/examples/v201109/campaign_management/add_location_extension.rb +0 -117
- data/examples/v201109/campaign_management/add_location_extension_override.rb +0 -83
- data/examples/v201109/campaign_management/get_all_disapproved_ads.rb +0 -93
- data/examples/v201109/campaign_management/promote_experiment.rb +0 -77
- data/examples/v201109/campaign_management/set_ad_parameters.rb +0 -114
- data/examples/v201109/campaign_management/validate_text_ad.rb +0 -106
- data/examples/v201109/error_handling/handle_captcha_challenge.rb +0 -93
- data/examples/v201109/error_handling/handle_partial_failures.rb +0 -126
- data/examples/v201109/error_handling/handle_policy_violation_error.rb +0 -137
- data/examples/v201109/error_handling/handle_two_factor_authorization_error.rb +0 -87
- data/examples/v201109/misc/get_all_images_and_videos.rb +0 -100
- data/examples/v201109/misc/upload_image.rb +0 -89
- data/examples/v201109/misc/use_oauth.rb +0 -100
- data/examples/v201109/optimization/estimate_keyword_traffic.rb +0 -129
- data/examples/v201109/optimization/get_keyword_bid_simulations.rb +0 -92
- data/examples/v201109/optimization/get_keyword_ideas.rb +0 -106
- data/examples/v201109/optimization/get_placement_ideas.rb +0 -104
- data/examples/v201109/remarketing/add_audience.rb +0 -115
- data/examples/v201109/remarketing/add_conversion_tracker.rb +0 -97
- data/examples/v201109/reporting/download_criteria_report.rb +0 -79
- data/examples/v201109/reporting/get_campaign_stats.rb +0 -105
- data/examples/v201109/reporting/get_defined_reports.rb +0 -75
- data/examples/v201109/reporting/get_report_fields.rb +0 -71
- data/examples/v201109/reporting/parallel_report_download.rb +0 -159
- data/examples/v201109/targeting/add_campaign_targeting_criteria.rb +0 -118
- data/examples/v201109/targeting/get_campaign_targeting_criteria.rb +0 -102
- data/examples/v201109/targeting/get_targetable_languages_and_carriers.rb +0 -86
- data/examples/v201109/targeting/lookup_location.rb +0 -103
- data/examples/v201109_1/account_management/create_account.rb +0 -80
- data/examples/v201109_1/account_management/get_account_alerts.rb +0 -111
- data/examples/v201109_1/account_management/get_account_changes.rb +0 -137
- data/examples/v201109_1/account_management/get_account_hierarchy.rb +0 -93
- data/examples/v201109_1/account_management/get_client_customer_id.rb +0 -85
- data/examples/v201109_1/account_management/get_client_unit_usage.rb +0 -87
- data/examples/v201109_1/basic_operations/add_ad_groups.rb +0 -111
- data/examples/v201109_1/basic_operations/add_campaigns.rb +0 -140
- data/examples/v201109_1/basic_operations/add_keywords.rb +0 -108
- data/examples/v201109_1/basic_operations/add_text_ads.rb +0 -105
- data/examples/v201109_1/basic_operations/delete_ad.rb +0 -85
- data/examples/v201109_1/basic_operations/delete_ad_group.rb +0 -102
- data/examples/v201109_1/basic_operations/delete_campaign.rb +0 -103
- data/examples/v201109_1/basic_operations/delete_keyword.rb +0 -90
- data/examples/v201109_1/basic_operations/get_ad_groups.rb +0 -98
- data/examples/v201109_1/basic_operations/get_campaigns.rb +0 -93
- data/examples/v201109_1/basic_operations/get_keywords.rb +0 -104
- data/examples/v201109_1/basic_operations/get_text_ads.rb +0 -106
- data/examples/v201109_1/basic_operations/pause_ad.rb +0 -84
- data/examples/v201109_1/basic_operations/update_ad_group.rb +0 -81
- data/examples/v201109_1/basic_operations/update_campaign.rb +0 -84
- data/examples/v201109_1/basic_operations/update_keyword.rb +0 -99
- data/examples/v201109_1/campaign_management/add_experiment.rb +0 -158
- data/examples/v201109_1/campaign_management/add_keywords_in_bulk.rb +0 -150
- data/examples/v201109_1/campaign_management/add_location_extension.rb +0 -117
- data/examples/v201109_1/campaign_management/add_location_extension_override.rb +0 -83
- data/examples/v201109_1/campaign_management/get_all_disapproved_ads.rb +0 -93
- data/examples/v201109_1/campaign_management/promote_experiment.rb +0 -77
- data/examples/v201109_1/campaign_management/set_ad_parameters.rb +0 -114
- data/examples/v201109_1/campaign_management/validate_text_ad.rb +0 -106
- data/examples/v201109_1/error_handling/handle_captcha_challenge.rb +0 -93
- data/examples/v201109_1/error_handling/handle_partial_failures.rb +0 -126
- data/examples/v201109_1/error_handling/handle_policy_violation_error.rb +0 -137
- data/examples/v201109_1/error_handling/handle_two_factor_authorization_error.rb +0 -87
- data/examples/v201109_1/misc/get_all_images_and_videos.rb +0 -100
- data/examples/v201109_1/misc/upload_image.rb +0 -89
- data/examples/v201109_1/misc/use_oauth.rb +0 -100
- data/examples/v201109_1/misc/use_oauth2.rb +0 -97
- data/examples/v201109_1/optimization/estimate_keyword_traffic.rb +0 -129
- data/examples/v201109_1/optimization/get_keyword_bid_simulations.rb +0 -92
- data/examples/v201109_1/optimization/get_keyword_ideas.rb +0 -112
- data/examples/v201109_1/optimization/get_placement_ideas.rb +0 -104
- data/examples/v201109_1/remarketing/add_audience.rb +0 -115
- data/examples/v201109_1/remarketing/add_conversion_tracker.rb +0 -97
- data/examples/v201109_1/reporting/download_criteria_report.rb +0 -79
- data/examples/v201109_1/reporting/get_campaign_stats.rb +0 -105
- data/examples/v201109_1/reporting/get_defined_reports.rb +0 -75
- data/examples/v201109_1/reporting/get_report_fields.rb +0 -71
- data/examples/v201109_1/reporting/parallel_report_download.rb +0 -159
- data/examples/v201109_1/targeting/add_campaign_targeting_criteria.rb +0 -118
- data/examples/v201109_1/targeting/get_campaign_targeting_criteria.rb +0 -102
- data/examples/v201109_1/targeting/get_targetable_languages_and_carriers.rb +0 -86
- data/examples/v201109_1/targeting/lookup_location.rb +0 -103
- data/examples/v201206/misc/use_oauth.rb +0 -100
- data/examples/v201209/misc/use_oauth.rb +0 -100
- data/lib/adwords_api/v201109/ad_extension_override_service.rb +0 -38
- data/lib/adwords_api/v201109/ad_extension_override_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/ad_group_ad_service.rb +0 -38
- data/lib/adwords_api/v201109/ad_group_ad_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/ad_group_criterion_service.rb +0 -38
- data/lib/adwords_api/v201109/ad_group_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/ad_group_service.rb +0 -38
- data/lib/adwords_api/v201109/ad_group_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/ad_param_service.rb +0 -38
- data/lib/adwords_api/v201109/ad_param_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/alert_service.rb +0 -34
- data/lib/adwords_api/v201109/alert_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/budget_order_service.rb +0 -42
- data/lib/adwords_api/v201109/budget_order_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/bulk_mutate_job_service.rb +0 -38
- data/lib/adwords_api/v201109/bulk_mutate_job_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/campaign_ad_extension_service.rb +0 -38
- data/lib/adwords_api/v201109/campaign_ad_extension_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/campaign_criterion_service.rb +0 -38
- data/lib/adwords_api/v201109/campaign_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/campaign_service.rb +0 -38
- data/lib/adwords_api/v201109/campaign_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/campaign_target_service.rb +0 -38
- data/lib/adwords_api/v201109/campaign_target_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/constant_data_service.rb +0 -38
- data/lib/adwords_api/v201109/constant_data_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/conversion_tracker_service.rb +0 -38
- data/lib/adwords_api/v201109/conversion_tracker_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/create_account_service.rb +0 -34
- data/lib/adwords_api/v201109/create_account_service_registry.rb +0 -47
- data/lib/adwords_api/v201109/customer_sync_service.rb +0 -34
- data/lib/adwords_api/v201109/customer_sync_service_registry.rb +0 -47
- data/lib/adwords_api/v201109/data_service.rb +0 -38
- data/lib/adwords_api/v201109/data_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/experiment_service.rb +0 -38
- data/lib/adwords_api/v201109/experiment_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/geo_location_service.rb +0 -34
- data/lib/adwords_api/v201109/geo_location_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/info_service.rb +0 -34
- data/lib/adwords_api/v201109/info_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/location_criterion_service.rb +0 -34
- data/lib/adwords_api/v201109/location_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/media_service.rb +0 -38
- data/lib/adwords_api/v201109/media_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/mutate_job_service.rb +0 -42
- data/lib/adwords_api/v201109/mutate_job_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/report_definition_service.rb +0 -38
- data/lib/adwords_api/v201109/report_definition_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/serviced_account_service.rb +0 -34
- data/lib/adwords_api/v201109/serviced_account_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/targeting_idea_service.rb +0 -38
- data/lib/adwords_api/v201109/targeting_idea_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/traffic_estimator_service.rb +0 -34
- data/lib/adwords_api/v201109/traffic_estimator_service_registry.rb +0 -46
- data/lib/adwords_api/v201109/user_list_service.rb +0 -38
- data/lib/adwords_api/v201109/user_list_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/ad_extension_override_service.rb +0 -38
- data/lib/adwords_api/v201109_1/ad_extension_override_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/ad_group_ad_service.rb +0 -38
- data/lib/adwords_api/v201109_1/ad_group_ad_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/ad_group_criterion_service.rb +0 -38
- data/lib/adwords_api/v201109_1/ad_group_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/ad_group_service.rb +0 -38
- data/lib/adwords_api/v201109_1/ad_group_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/ad_param_service.rb +0 -38
- data/lib/adwords_api/v201109_1/ad_param_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/alert_service.rb +0 -34
- data/lib/adwords_api/v201109_1/alert_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/budget_order_service.rb +0 -42
- data/lib/adwords_api/v201109_1/budget_order_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/bulk_mutate_job_service.rb +0 -38
- data/lib/adwords_api/v201109_1/bulk_mutate_job_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/campaign_ad_extension_service.rb +0 -38
- data/lib/adwords_api/v201109_1/campaign_ad_extension_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/campaign_criterion_service.rb +0 -38
- data/lib/adwords_api/v201109_1/campaign_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/campaign_service.rb +0 -38
- data/lib/adwords_api/v201109_1/campaign_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/campaign_target_service.rb +0 -38
- data/lib/adwords_api/v201109_1/campaign_target_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/constant_data_service.rb +0 -38
- data/lib/adwords_api/v201109_1/constant_data_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/conversion_tracker_service.rb +0 -38
- data/lib/adwords_api/v201109_1/conversion_tracker_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/create_account_service.rb +0 -34
- data/lib/adwords_api/v201109_1/create_account_service_registry.rb +0 -47
- data/lib/adwords_api/v201109_1/customer_service.rb +0 -34
- data/lib/adwords_api/v201109_1/customer_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/customer_sync_service.rb +0 -34
- data/lib/adwords_api/v201109_1/customer_sync_service_registry.rb +0 -47
- data/lib/adwords_api/v201109_1/data_service.rb +0 -38
- data/lib/adwords_api/v201109_1/data_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/experiment_service.rb +0 -38
- data/lib/adwords_api/v201109_1/experiment_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/geo_location_service.rb +0 -34
- data/lib/adwords_api/v201109_1/geo_location_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/info_service.rb +0 -34
- data/lib/adwords_api/v201109_1/info_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/location_criterion_service.rb +0 -34
- data/lib/adwords_api/v201109_1/location_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/managed_customer_service.rb +0 -38
- data/lib/adwords_api/v201109_1/managed_customer_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/media_service.rb +0 -38
- data/lib/adwords_api/v201109_1/media_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/mutate_job_service.rb +0 -42
- data/lib/adwords_api/v201109_1/mutate_job_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/report_definition_service.rb +0 -38
- data/lib/adwords_api/v201109_1/report_definition_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/serviced_account_service.rb +0 -34
- data/lib/adwords_api/v201109_1/serviced_account_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/targeting_idea_service.rb +0 -38
- data/lib/adwords_api/v201109_1/targeting_idea_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/traffic_estimator_service.rb +0 -34
- data/lib/adwords_api/v201109_1/traffic_estimator_service_registry.rb +0 -46
- data/lib/adwords_api/v201109_1/user_list_service.rb +0 -38
- data/lib/adwords_api/v201109_1/user_list_service_registry.rb +0 -46
- data/test/examples/v201109/test_account_management.rb +0 -60
- data/test/examples/v201109/test_basic_operations.rb +0 -172
- data/test/examples/v201109/test_campaign_management.rb +0 -116
- data/test/examples/v201109/test_error_handling.rb +0 -63
- data/test/examples/v201109/test_misc.rb +0 -45
- data/test/examples/v201109/test_optimization.rb +0 -63
- data/test/examples/v201109/test_remarketing.rb +0 -39
- data/test/examples/v201109/test_reporting.rb +0 -72
- data/test/examples/v201109/test_targeting.rb +0 -60
- data/test/examples/v201109/utils.rb +0 -238
- data/test/examples/v201109_1/test_account_management.rb +0 -60
- data/test/examples/v201109_1/test_basic_operations.rb +0 -172
- data/test/examples/v201109_1/test_campaign_management.rb +0 -116
- data/test/examples/v201109_1/test_error_handling.rb +0 -63
- data/test/examples/v201109_1/test_misc.rb +0 -45
- data/test/examples/v201109_1/test_optimization.rb +0 -63
- data/test/examples/v201109_1/test_remarketing.rb +0 -39
- data/test/examples/v201109_1/test_reporting.rb +0 -72
- data/test/examples/v201109_1/test_targeting.rb +0 -60
- data/test/examples/v201109_1/utils.rb +0 -238
- data/test/suite_exampletests_v201109_1.rb +0 -37
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.8.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-ads-common
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.9.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.9.0
|
30
30
|
description: google-adwords-api is a AdWords API client library for Ruby
|
31
31
|
email:
|
32
32
|
- api.dklimkin@gmail.com
|
@@ -38,124 +38,8 @@ files:
|
|
38
38
|
- lib/adwords_api/version.rb
|
39
39
|
- lib/adwords_api/report_utils.rb
|
40
40
|
- lib/adwords_api/credential_handler.rb
|
41
|
-
- lib/adwords_api/v201109_1/mutate_job_service.rb
|
42
|
-
- lib/adwords_api/v201109_1/conversion_tracker_service_registry.rb
|
43
|
-
- lib/adwords_api/v201109_1/info_service_registry.rb
|
44
|
-
- lib/adwords_api/v201109_1/ad_extension_override_service_registry.rb
|
45
|
-
- lib/adwords_api/v201109_1/campaign_target_service.rb
|
46
|
-
- lib/adwords_api/v201109_1/customer_service.rb
|
47
|
-
- lib/adwords_api/v201109_1/experiment_service_registry.rb
|
48
|
-
- lib/adwords_api/v201109_1/alert_service_registry.rb
|
49
|
-
- lib/adwords_api/v201109_1/campaign_criterion_service.rb
|
50
|
-
- lib/adwords_api/v201109_1/budget_order_service.rb
|
51
|
-
- lib/adwords_api/v201109_1/ad_group_ad_service_registry.rb
|
52
|
-
- lib/adwords_api/v201109_1/customer_sync_service_registry.rb
|
53
|
-
- lib/adwords_api/v201109_1/budget_order_service_registry.rb
|
54
|
-
- lib/adwords_api/v201109_1/experiment_service.rb
|
55
|
-
- lib/adwords_api/v201109_1/alert_service.rb
|
56
|
-
- lib/adwords_api/v201109_1/customer_sync_service.rb
|
57
|
-
- lib/adwords_api/v201109_1/serviced_account_service_registry.rb
|
58
|
-
- lib/adwords_api/v201109_1/location_criterion_service_registry.rb
|
59
|
-
- lib/adwords_api/v201109_1/targeting_idea_service.rb
|
60
|
-
- lib/adwords_api/v201109_1/geo_location_service.rb
|
61
|
-
- lib/adwords_api/v201109_1/ad_group_criterion_service.rb
|
62
|
-
- lib/adwords_api/v201109_1/managed_customer_service.rb
|
63
|
-
- lib/adwords_api/v201109_1/campaign_target_service_registry.rb
|
64
|
-
- lib/adwords_api/v201109_1/user_list_service_registry.rb
|
65
|
-
- lib/adwords_api/v201109_1/constant_data_service_registry.rb
|
66
|
-
- lib/adwords_api/v201109_1/ad_group_ad_service.rb
|
67
|
-
- lib/adwords_api/v201109_1/traffic_estimator_service_registry.rb
|
68
|
-
- lib/adwords_api/v201109_1/campaign_service.rb
|
69
|
-
- lib/adwords_api/v201109_1/conversion_tracker_service.rb
|
70
|
-
- lib/adwords_api/v201109_1/media_service_registry.rb
|
71
|
-
- lib/adwords_api/v201109_1/campaign_ad_extension_service_registry.rb
|
72
|
-
- lib/adwords_api/v201109_1/campaign_service_registry.rb
|
73
|
-
- lib/adwords_api/v201109_1/bulk_mutate_job_service.rb
|
74
|
-
- lib/adwords_api/v201109_1/user_list_service.rb
|
75
|
-
- lib/adwords_api/v201109_1/location_criterion_service.rb
|
76
|
-
- lib/adwords_api/v201109_1/ad_group_service.rb
|
77
|
-
- lib/adwords_api/v201109_1/ad_group_service_registry.rb
|
78
|
-
- lib/adwords_api/v201109_1/ad_param_service.rb
|
79
|
-
- lib/adwords_api/v201109_1/traffic_estimator_service.rb
|
80
|
-
- lib/adwords_api/v201109_1/info_service.rb
|
81
|
-
- lib/adwords_api/v201109_1/data_service_registry.rb
|
82
|
-
- lib/adwords_api/v201109_1/serviced_account_service.rb
|
83
|
-
- lib/adwords_api/v201109_1/create_account_service.rb
|
84
|
-
- lib/adwords_api/v201109_1/ad_extension_override_service.rb
|
85
|
-
- lib/adwords_api/v201109_1/report_definition_service.rb
|
86
|
-
- lib/adwords_api/v201109_1/ad_param_service_registry.rb
|
87
|
-
- lib/adwords_api/v201109_1/mutate_job_service_registry.rb
|
88
|
-
- lib/adwords_api/v201109_1/constant_data_service.rb
|
89
|
-
- lib/adwords_api/v201109_1/ad_group_criterion_service_registry.rb
|
90
|
-
- lib/adwords_api/v201109_1/customer_service_registry.rb
|
91
|
-
- lib/adwords_api/v201109_1/campaign_ad_extension_service.rb
|
92
|
-
- lib/adwords_api/v201109_1/campaign_criterion_service_registry.rb
|
93
|
-
- lib/adwords_api/v201109_1/managed_customer_service_registry.rb
|
94
|
-
- lib/adwords_api/v201109_1/report_definition_service_registry.rb
|
95
|
-
- lib/adwords_api/v201109_1/media_service.rb
|
96
|
-
- lib/adwords_api/v201109_1/geo_location_service_registry.rb
|
97
|
-
- lib/adwords_api/v201109_1/targeting_idea_service_registry.rb
|
98
|
-
- lib/adwords_api/v201109_1/create_account_service_registry.rb
|
99
|
-
- lib/adwords_api/v201109_1/bulk_mutate_job_service_registry.rb
|
100
|
-
- lib/adwords_api/v201109_1/data_service.rb
|
101
41
|
- lib/adwords_api/report_header_handler.rb
|
102
42
|
- lib/adwords_api/api_config.rb
|
103
|
-
- lib/adwords_api/v201109/mutate_job_service.rb
|
104
|
-
- lib/adwords_api/v201109/conversion_tracker_service_registry.rb
|
105
|
-
- lib/adwords_api/v201109/info_service_registry.rb
|
106
|
-
- lib/adwords_api/v201109/ad_extension_override_service_registry.rb
|
107
|
-
- lib/adwords_api/v201109/campaign_target_service.rb
|
108
|
-
- lib/adwords_api/v201109/experiment_service_registry.rb
|
109
|
-
- lib/adwords_api/v201109/alert_service_registry.rb
|
110
|
-
- lib/adwords_api/v201109/campaign_criterion_service.rb
|
111
|
-
- lib/adwords_api/v201109/budget_order_service.rb
|
112
|
-
- lib/adwords_api/v201109/ad_group_ad_service_registry.rb
|
113
|
-
- lib/adwords_api/v201109/customer_sync_service_registry.rb
|
114
|
-
- lib/adwords_api/v201109/budget_order_service_registry.rb
|
115
|
-
- lib/adwords_api/v201109/experiment_service.rb
|
116
|
-
- lib/adwords_api/v201109/alert_service.rb
|
117
|
-
- lib/adwords_api/v201109/customer_sync_service.rb
|
118
|
-
- lib/adwords_api/v201109/serviced_account_service_registry.rb
|
119
|
-
- lib/adwords_api/v201109/location_criterion_service_registry.rb
|
120
|
-
- lib/adwords_api/v201109/targeting_idea_service.rb
|
121
|
-
- lib/adwords_api/v201109/geo_location_service.rb
|
122
|
-
- lib/adwords_api/v201109/ad_group_criterion_service.rb
|
123
|
-
- lib/adwords_api/v201109/campaign_target_service_registry.rb
|
124
|
-
- lib/adwords_api/v201109/user_list_service_registry.rb
|
125
|
-
- lib/adwords_api/v201109/constant_data_service_registry.rb
|
126
|
-
- lib/adwords_api/v201109/ad_group_ad_service.rb
|
127
|
-
- lib/adwords_api/v201109/traffic_estimator_service_registry.rb
|
128
|
-
- lib/adwords_api/v201109/campaign_service.rb
|
129
|
-
- lib/adwords_api/v201109/conversion_tracker_service.rb
|
130
|
-
- lib/adwords_api/v201109/media_service_registry.rb
|
131
|
-
- lib/adwords_api/v201109/campaign_ad_extension_service_registry.rb
|
132
|
-
- lib/adwords_api/v201109/campaign_service_registry.rb
|
133
|
-
- lib/adwords_api/v201109/bulk_mutate_job_service.rb
|
134
|
-
- lib/adwords_api/v201109/user_list_service.rb
|
135
|
-
- lib/adwords_api/v201109/location_criterion_service.rb
|
136
|
-
- lib/adwords_api/v201109/ad_group_service.rb
|
137
|
-
- lib/adwords_api/v201109/ad_group_service_registry.rb
|
138
|
-
- lib/adwords_api/v201109/ad_param_service.rb
|
139
|
-
- lib/adwords_api/v201109/traffic_estimator_service.rb
|
140
|
-
- lib/adwords_api/v201109/info_service.rb
|
141
|
-
- lib/adwords_api/v201109/data_service_registry.rb
|
142
|
-
- lib/adwords_api/v201109/serviced_account_service.rb
|
143
|
-
- lib/adwords_api/v201109/create_account_service.rb
|
144
|
-
- lib/adwords_api/v201109/ad_extension_override_service.rb
|
145
|
-
- lib/adwords_api/v201109/report_definition_service.rb
|
146
|
-
- lib/adwords_api/v201109/ad_param_service_registry.rb
|
147
|
-
- lib/adwords_api/v201109/mutate_job_service_registry.rb
|
148
|
-
- lib/adwords_api/v201109/constant_data_service.rb
|
149
|
-
- lib/adwords_api/v201109/ad_group_criterion_service_registry.rb
|
150
|
-
- lib/adwords_api/v201109/campaign_ad_extension_service.rb
|
151
|
-
- lib/adwords_api/v201109/campaign_criterion_service_registry.rb
|
152
|
-
- lib/adwords_api/v201109/report_definition_service_registry.rb
|
153
|
-
- lib/adwords_api/v201109/media_service.rb
|
154
|
-
- lib/adwords_api/v201109/geo_location_service_registry.rb
|
155
|
-
- lib/adwords_api/v201109/targeting_idea_service_registry.rb
|
156
|
-
- lib/adwords_api/v201109/create_account_service_registry.rb
|
157
|
-
- lib/adwords_api/v201109/bulk_mutate_job_service_registry.rb
|
158
|
-
- lib/adwords_api/v201109/data_service.rb
|
159
43
|
- lib/adwords_api/errors.rb
|
160
44
|
- lib/adwords_api/client_login_header_handler.rb
|
161
45
|
- lib/adwords_api/v201209/mutate_job_service.rb
|
@@ -267,27 +151,7 @@ files:
|
|
267
151
|
- lib/adwords_api/v201206/bulk_mutate_job_service_registry.rb
|
268
152
|
- lib/adwords_api/v201206/data_service.rb
|
269
153
|
- lib/adwords_api.rb
|
270
|
-
- test/
|
271
|
-
- test/examples/v201109_1/utils.rb
|
272
|
-
- test/examples/v201109_1/test_error_handling.rb
|
273
|
-
- test/examples/v201109_1/test_targeting.rb
|
274
|
-
- test/examples/v201109_1/test_misc.rb
|
275
|
-
- test/examples/v201109_1/test_remarketing.rb
|
276
|
-
- test/examples/v201109_1/test_account_management.rb
|
277
|
-
- test/examples/v201109_1/test_optimization.rb
|
278
|
-
- test/examples/v201109_1/test_reporting.rb
|
279
|
-
- test/examples/v201109_1/test_basic_operations.rb
|
280
|
-
- test/examples/v201109_1/test_campaign_management.rb
|
281
|
-
- test/examples/v201109/utils.rb
|
282
|
-
- test/examples/v201109/test_error_handling.rb
|
283
|
-
- test/examples/v201109/test_targeting.rb
|
284
|
-
- test/examples/v201109/test_misc.rb
|
285
|
-
- test/examples/v201109/test_remarketing.rb
|
286
|
-
- test/examples/v201109/test_account_management.rb
|
287
|
-
- test/examples/v201109/test_optimization.rb
|
288
|
-
- test/examples/v201109/test_reporting.rb
|
289
|
-
- test/examples/v201109/test_basic_operations.rb
|
290
|
-
- test/examples/v201109/test_campaign_management.rb
|
154
|
+
- test/suite_integration.rb
|
291
155
|
- test/examples/v201209/utils.rb
|
292
156
|
- test/examples/v201209/test_error_handling.rb
|
293
157
|
- test/examples/v201209/test_targeting.rb
|
@@ -309,7 +173,6 @@ files:
|
|
309
173
|
- test/examples/v201206/test_basic_operations.rb
|
310
174
|
- test/examples/v201206/test_campaign_management.rb
|
311
175
|
- test/suite_exampletests_v201209.rb
|
312
|
-
- test/suite_exampletests_v201109.rb
|
313
176
|
- test/bugs/test_issue_00000063.rb
|
314
177
|
- test/bugs/test_issue_00000031.rb
|
315
178
|
- test/coverage.rb
|
@@ -319,113 +182,9 @@ files:
|
|
319
182
|
- test/adwords_api/test_credential_handler.rb
|
320
183
|
- test/adwords_api/test_api_config.rb
|
321
184
|
- test/adwords_api/test_utils.rb
|
185
|
+
- test/templates/v201209/basic_operations_get_campaigns.def
|
322
186
|
- test/suite_exampletests_v201206.rb
|
323
|
-
-
|
324
|
-
- examples/v201109_1/reporting/get_defined_reports.rb
|
325
|
-
- examples/v201109_1/reporting/get_campaign_stats.rb
|
326
|
-
- examples/v201109_1/reporting/parallel_report_download.rb
|
327
|
-
- examples/v201109_1/reporting/get_report_fields.rb
|
328
|
-
- examples/v201109_1/error_handling/handle_policy_violation_error.rb
|
329
|
-
- examples/v201109_1/error_handling/handle_two_factor_authorization_error.rb
|
330
|
-
- examples/v201109_1/error_handling/handle_captcha_challenge.rb
|
331
|
-
- examples/v201109_1/error_handling/handle_partial_failures.rb
|
332
|
-
- examples/v201109_1/targeting/lookup_location.rb
|
333
|
-
- examples/v201109_1/targeting/get_targetable_languages_and_carriers.rb
|
334
|
-
- examples/v201109_1/targeting/add_campaign_targeting_criteria.rb
|
335
|
-
- examples/v201109_1/targeting/get_campaign_targeting_criteria.rb
|
336
|
-
- examples/v201109_1/campaign_management/validate_text_ad.rb
|
337
|
-
- examples/v201109_1/campaign_management/add_experiment.rb
|
338
|
-
- examples/v201109_1/campaign_management/set_ad_parameters.rb
|
339
|
-
- examples/v201109_1/campaign_management/add_location_extension.rb
|
340
|
-
- examples/v201109_1/campaign_management/add_keywords_in_bulk.rb
|
341
|
-
- examples/v201109_1/campaign_management/promote_experiment.rb
|
342
|
-
- examples/v201109_1/campaign_management/get_all_disapproved_ads.rb
|
343
|
-
- examples/v201109_1/campaign_management/add_location_extension_override.rb
|
344
|
-
- examples/v201109_1/account_management/get_account_hierarchy.rb
|
345
|
-
- examples/v201109_1/account_management/get_account_changes.rb
|
346
|
-
- examples/v201109_1/account_management/get_client_unit_usage.rb
|
347
|
-
- examples/v201109_1/account_management/get_client_customer_id.rb
|
348
|
-
- examples/v201109_1/account_management/get_account_alerts.rb
|
349
|
-
- examples/v201109_1/account_management/create_account.rb
|
350
|
-
- examples/v201109_1/optimization/estimate_keyword_traffic.rb
|
351
|
-
- examples/v201109_1/optimization/get_keyword_bid_simulations.rb
|
352
|
-
- examples/v201109_1/optimization/get_keyword_ideas.rb
|
353
|
-
- examples/v201109_1/optimization/get_placement_ideas.rb
|
354
|
-
- examples/v201109_1/basic_operations/update_campaign.rb
|
355
|
-
- examples/v201109_1/basic_operations/get_campaigns.rb
|
356
|
-
- examples/v201109_1/basic_operations/get_ad_groups.rb
|
357
|
-
- examples/v201109_1/basic_operations/add_campaigns.rb
|
358
|
-
- examples/v201109_1/basic_operations/delete_ad_group.rb
|
359
|
-
- examples/v201109_1/basic_operations/delete_keyword.rb
|
360
|
-
- examples/v201109_1/basic_operations/delete_ad.rb
|
361
|
-
- examples/v201109_1/basic_operations/add_ad_groups.rb
|
362
|
-
- examples/v201109_1/basic_operations/update_ad_group.rb
|
363
|
-
- examples/v201109_1/basic_operations/get_keywords.rb
|
364
|
-
- examples/v201109_1/basic_operations/delete_campaign.rb
|
365
|
-
- examples/v201109_1/basic_operations/get_text_ads.rb
|
366
|
-
- examples/v201109_1/basic_operations/add_keywords.rb
|
367
|
-
- examples/v201109_1/basic_operations/add_text_ads.rb
|
368
|
-
- examples/v201109_1/basic_operations/pause_ad.rb
|
369
|
-
- examples/v201109_1/basic_operations/update_keyword.rb
|
370
|
-
- examples/v201109_1/misc/upload_image.rb
|
371
|
-
- examples/v201109_1/misc/get_all_images_and_videos.rb
|
372
|
-
- examples/v201109_1/misc/use_oauth.rb
|
373
|
-
- examples/v201109_1/misc/use_oauth2.rb
|
374
|
-
- examples/v201109_1/remarketing/add_conversion_tracker.rb
|
375
|
-
- examples/v201109_1/remarketing/add_audience.rb
|
376
|
-
- examples/v201109/reporting/download_criteria_report.rb
|
377
|
-
- examples/v201109/reporting/get_defined_reports.rb
|
378
|
-
- examples/v201109/reporting/get_campaign_stats.rb
|
379
|
-
- examples/v201109/reporting/parallel_report_download.rb
|
380
|
-
- examples/v201109/reporting/get_report_fields.rb
|
381
|
-
- examples/v201109/error_handling/handle_policy_violation_error.rb
|
382
|
-
- examples/v201109/error_handling/handle_two_factor_authorization_error.rb
|
383
|
-
- examples/v201109/error_handling/handle_captcha_challenge.rb
|
384
|
-
- examples/v201109/error_handling/handle_partial_failures.rb
|
385
|
-
- examples/v201109/targeting/lookup_location.rb
|
386
|
-
- examples/v201109/targeting/get_targetable_languages_and_carriers.rb
|
387
|
-
- examples/v201109/targeting/add_campaign_targeting_criteria.rb
|
388
|
-
- examples/v201109/targeting/get_campaign_targeting_criteria.rb
|
389
|
-
- examples/v201109/campaign_management/validate_text_ad.rb
|
390
|
-
- examples/v201109/campaign_management/add_experiment.rb
|
391
|
-
- examples/v201109/campaign_management/set_ad_parameters.rb
|
392
|
-
- examples/v201109/campaign_management/add_location_extension.rb
|
393
|
-
- examples/v201109/campaign_management/add_keywords_in_bulk.rb
|
394
|
-
- examples/v201109/campaign_management/promote_experiment.rb
|
395
|
-
- examples/v201109/campaign_management/get_all_disapproved_ads.rb
|
396
|
-
- examples/v201109/campaign_management/add_location_extension_override.rb
|
397
|
-
- examples/v201109/account_management/get_account_hierarchy.rb
|
398
|
-
- examples/v201109/account_management/get_account_changes.rb
|
399
|
-
- examples/v201109/account_management/get_client_unit_usage.rb
|
400
|
-
- examples/v201109/account_management/get_client_customer_id.rb
|
401
|
-
- examples/v201109/account_management/get_account_alerts.rb
|
402
|
-
- examples/v201109/account_management/create_account.rb
|
403
|
-
- examples/v201109/optimization/estimate_keyword_traffic.rb
|
404
|
-
- examples/v201109/optimization/get_keyword_bid_simulations.rb
|
405
|
-
- examples/v201109/optimization/get_keyword_ideas.rb
|
406
|
-
- examples/v201109/optimization/get_placement_ideas.rb
|
407
|
-
- examples/v201109/basic_operations/update_campaign.rb
|
408
|
-
- examples/v201109/basic_operations/get_campaigns.rb
|
409
|
-
- examples/v201109/basic_operations/get_ad_groups.rb
|
410
|
-
- examples/v201109/basic_operations/add_campaigns.rb
|
411
|
-
- examples/v201109/basic_operations/delete_ad_group.rb
|
412
|
-
- examples/v201109/basic_operations/delete_keyword.rb
|
413
|
-
- examples/v201109/basic_operations/delete_ad.rb
|
414
|
-
- examples/v201109/basic_operations/add_ad_groups.rb
|
415
|
-
- examples/v201109/basic_operations/update_ad_group.rb
|
416
|
-
- examples/v201109/basic_operations/get_keywords.rb
|
417
|
-
- examples/v201109/basic_operations/delete_campaign.rb
|
418
|
-
- examples/v201109/basic_operations/get_text_ads.rb
|
419
|
-
- examples/v201109/basic_operations/add_keywords.rb
|
420
|
-
- examples/v201109/basic_operations/add_text_ads.rb
|
421
|
-
- examples/v201109/basic_operations/pause_ad.rb
|
422
|
-
- examples/v201109/basic_operations/update_keyword.rb
|
423
|
-
- examples/v201109/misc/upload_image.rb
|
424
|
-
- examples/v201109/misc/get_all_images_and_videos.rb
|
425
|
-
- examples/v201109/misc/use_oauth.rb
|
426
|
-
- examples/v201109/misc/use_oauth2.rb
|
427
|
-
- examples/v201109/remarketing/add_conversion_tracker.rb
|
428
|
-
- examples/v201109/remarketing/add_audience.rb
|
187
|
+
- test/test_utils.rb
|
429
188
|
- examples/v201209/reporting/download_criteria_report.rb
|
430
189
|
- examples/v201209/reporting/get_campaign_stats.rb
|
431
190
|
- examples/v201209/reporting/parallel_report_download.rb
|
@@ -477,8 +236,8 @@ files:
|
|
477
236
|
- examples/v201209/basic_operations/pause_ad.rb
|
478
237
|
- examples/v201209/basic_operations/update_keyword.rb
|
479
238
|
- examples/v201209/misc/upload_image.rb
|
239
|
+
- examples/v201209/misc/use_oauth2_jwt.rb
|
480
240
|
- examples/v201209/misc/get_all_images_and_videos.rb
|
481
|
-
- examples/v201209/misc/use_oauth.rb
|
482
241
|
- examples/v201209/misc/use_oauth2.rb
|
483
242
|
- examples/v201209/remarketing/add_conversion_tracker.rb
|
484
243
|
- examples/v201209/remarketing/add_audience.rb
|
@@ -533,7 +292,6 @@ files:
|
|
533
292
|
- examples/v201206/basic_operations/update_keyword.rb
|
534
293
|
- examples/v201206/misc/upload_image.rb
|
535
294
|
- examples/v201206/misc/get_all_images_and_videos.rb
|
536
|
-
- examples/v201206/misc/use_oauth.rb
|
537
295
|
- examples/v201206/misc/use_oauth2.rb
|
538
296
|
- examples/v201206/remarketing/add_conversion_tracker.rb
|
539
297
|
- examples/v201206/remarketing/add_audience.rb
|
@@ -1,80 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Encoding: utf-8
|
3
|
-
#
|
4
|
-
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
-
#
|
6
|
-
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
|
-
#
|
8
|
-
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
-
# you may not use this file except in compliance with the License.
|
10
|
-
# You may obtain a copy of the License at
|
11
|
-
#
|
12
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
-
#
|
14
|
-
# Unless required by applicable law or agreed to in writing, software
|
15
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
17
|
-
# implied.
|
18
|
-
# See the License for the specific language governing permissions and
|
19
|
-
# limitations under the License.
|
20
|
-
#
|
21
|
-
# This example illustrates how to create an account. Note by default this
|
22
|
-
# account will only be accessible via parent MCC.
|
23
|
-
#
|
24
|
-
# Tags: CreateAccountService.mutate
|
25
|
-
|
26
|
-
require 'adwords_api'
|
27
|
-
require 'adwords_api/utils'
|
28
|
-
|
29
|
-
def create_account()
|
30
|
-
# AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
|
31
|
-
# when called without parameters.
|
32
|
-
adwords = AdwordsApi::Api.new
|
33
|
-
|
34
|
-
# To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
|
35
|
-
# the configuration file or provide your own logger:
|
36
|
-
# adwords.logger = Logger.new('adwords_xml.log')
|
37
|
-
|
38
|
-
create_account_srv = adwords.service(:CreateAccountService, API_VERSION)
|
39
|
-
|
40
|
-
# Prepare operation to create an account.
|
41
|
-
operation = {
|
42
|
-
:operator => 'ADD',
|
43
|
-
:operand => {
|
44
|
-
:currency_code => 'EUR',
|
45
|
-
:date_time_zone => 'Europe/London'
|
46
|
-
},
|
47
|
-
:descriptive_name => 'Account created with CreateAccountService'
|
48
|
-
}
|
49
|
-
|
50
|
-
# Create the account. It is possible to create multiple accounts with one
|
51
|
-
# request by sending an array of operations.
|
52
|
-
response = create_account_srv.mutate([operation])
|
53
|
-
|
54
|
-
new_account = response.first
|
55
|
-
puts "Account with customer ID '%s' was successfully created." %
|
56
|
-
AdwordsApi::Utils.format_id(new_account[:customer_id])
|
57
|
-
end
|
58
|
-
|
59
|
-
if __FILE__ == $0
|
60
|
-
API_VERSION = :v201109
|
61
|
-
|
62
|
-
begin
|
63
|
-
create_account()
|
64
|
-
|
65
|
-
# HTTP errors.
|
66
|
-
rescue AdsCommon::Errors::HttpError => e
|
67
|
-
puts "HTTP Error: %s" % e
|
68
|
-
|
69
|
-
# API errors.
|
70
|
-
rescue AdwordsApi::Errors::ApiException => e
|
71
|
-
puts "Message: %s" % e.message
|
72
|
-
puts 'Errors:'
|
73
|
-
e.errors.each_with_index do |error, index|
|
74
|
-
puts "\tError [%d]:" % (index + 1)
|
75
|
-
error.each do |field, value|
|
76
|
-
puts "\t\t%s: %s" % [field, value]
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
@@ -1,111 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Encoding: utf-8
|
3
|
-
#
|
4
|
-
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
-
#
|
6
|
-
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
|
-
#
|
8
|
-
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
-
# you may not use this file except in compliance with the License.
|
10
|
-
# You may obtain a copy of the License at
|
11
|
-
#
|
12
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
-
#
|
14
|
-
# Unless required by applicable law or agreed to in writing, software
|
15
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
17
|
-
# implied.
|
18
|
-
# See the License for the specific language governing permissions and
|
19
|
-
# limitations under the License.
|
20
|
-
#
|
21
|
-
# This example gets all alerts for all clients of an MCC account. The effective
|
22
|
-
# user (clientCustomerId, or authToken) must be an MCC user to get results.
|
23
|
-
#
|
24
|
-
# Tags: AlertService.get
|
25
|
-
|
26
|
-
require 'adwords_api'
|
27
|
-
require 'adwords_api/utils'
|
28
|
-
|
29
|
-
def get_account_alerts()
|
30
|
-
# AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
|
31
|
-
# when called without parameters.
|
32
|
-
adwords = AdwordsApi::Api.new
|
33
|
-
|
34
|
-
# To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
|
35
|
-
# the configuration file or provide your own logger:
|
36
|
-
# adwords.logger = Logger.new('adwords_xml.log')
|
37
|
-
|
38
|
-
alert_srv = adwords.service(:AlertService, API_VERSION)
|
39
|
-
|
40
|
-
# Create the selector.
|
41
|
-
selector = {
|
42
|
-
:query => {
|
43
|
-
:filter_spec => 'ALL',
|
44
|
-
:client_spec => 'ALL',
|
45
|
-
:trigger_time_spec => 'ALL_TIME',
|
46
|
-
:severities => ['GREEN', 'YELLOW', 'RED'],
|
47
|
-
:types => [
|
48
|
-
'ACCOUNT_BUDGET_BURN_RATE', 'ACCOUNT_BUDGET_ENDING',
|
49
|
-
'ACCOUNT_ON_TARGET', 'CAMPAIGN_ENDED', 'CAMPAIGN_ENDING',
|
50
|
-
'CREDIT_CARD_EXPIRING', 'DECLINED_PAYMENT', 'MANAGER_LINK_PENDING',
|
51
|
-
'MISSING_BANK_REFERENCE_NUMBER', 'PAYMENT_NOT_ENTERED',
|
52
|
-
'TV_ACCOUNT_BUDGET_ENDING', 'TV_ACCOUNT_ON_TARGET',
|
53
|
-
'TV_ZERO_DAILY_SPENDING_LIMIT', 'USER_INVITE_ACCEPTED',
|
54
|
-
'USER_INVITE_PENDING', 'ZERO_DAILY_SPENDING_LIMIT'
|
55
|
-
]
|
56
|
-
},
|
57
|
-
:paging => {
|
58
|
-
:start_index => 0,
|
59
|
-
:number_results => PAGE_SIZE
|
60
|
-
}
|
61
|
-
}
|
62
|
-
|
63
|
-
# Set initial values.
|
64
|
-
offset, page = 0, {}
|
65
|
-
|
66
|
-
# Get alerts.
|
67
|
-
begin
|
68
|
-
page = alert_srv.get(selector)
|
69
|
-
if page[:entries]
|
70
|
-
page[:entries].each_with_index do |alert, index|
|
71
|
-
puts "%d) Customer ID is '%s', alert type is '%s', severity is '%s'."
|
72
|
-
[AdwordsApi::Utils.format_id(alert[:client_customer_id]),
|
73
|
-
alert[:alert_type], alert[:alert_severity]]
|
74
|
-
alert[:details].each do |detail|
|
75
|
-
puts "\t- triggered at %s" % detail[:trigger_time]
|
76
|
-
end
|
77
|
-
end
|
78
|
-
# Increment values to request the next page.
|
79
|
-
offset += PAGE_SIZE
|
80
|
-
selector[:paging][:start_index] = offset
|
81
|
-
end
|
82
|
-
end while page[:total_num_entries] > offset
|
83
|
-
|
84
|
-
if page.include?(:total_num_entries)
|
85
|
-
puts "\tTotal number of alerts: %d." % page[:total_num_entries]
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
if __FILE__ == $0
|
90
|
-
API_VERSION = :v201109
|
91
|
-
PAGE_SIZE = 500
|
92
|
-
|
93
|
-
begin
|
94
|
-
get_account_alerts()
|
95
|
-
|
96
|
-
# HTTP errors.
|
97
|
-
rescue AdsCommon::Errors::HttpError => e
|
98
|
-
puts "HTTP Error: %s" % e
|
99
|
-
|
100
|
-
# API errors.
|
101
|
-
rescue AdwordsApi::Errors::ApiException => e
|
102
|
-
puts "Message: %s" % e.message
|
103
|
-
puts 'Errors:'
|
104
|
-
e.errors.each_with_index do |error, index|
|
105
|
-
puts "\tError [%d]:" % (index + 1)
|
106
|
-
error.each do |field, value|
|
107
|
-
puts "\t\t%s: %s" % [field, value]
|
108
|
-
end
|
109
|
-
end
|
110
|
-
end
|
111
|
-
end
|