google-adwords-api 0.4.5 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +4 -0
- data/README +3 -3
- data/Rakefile +3 -3
- data/examples/v201109/{create_account.rb → account_management/create_account.rb} +2 -1
- data/examples/v201109/{get_campaign_alerts.rb → account_management/get_account_alerts.rb} +38 -21
- data/examples/v201109/{get_all_account_changes.rb → account_management/get_account_changes.rb} +40 -39
- data/examples/v201109/{get_account_hierarchy.rb → account_management/get_account_hierarchy.rb} +2 -1
- data/examples/v201109/{get_client_customer_id.rb → account_management/get_client_customer_id.rb} +2 -1
- data/examples/v201109/{get_unit_count.rb → account_management/get_client_unit_usage.rb} +15 -7
- data/examples/v201109/{add_ad_group.rb → basic_operations/add_ad_group.rb} +2 -1
- data/examples/v201109/{add_campaign.rb → basic_operations/add_campaign.rb} +2 -1
- data/examples/v201109/{add_ad_group_criteria.rb → basic_operations/add_keywords.rb} +32 -37
- data/examples/{v200909/update_ad.rb → v201109/basic_operations/add_text_ads.rb} +41 -25
- data/examples/v201109/{delete_ad.rb → basic_operations/delete_ad.rb} +5 -4
- data/examples/v201109/{delete_ad_group.rb → basic_operations/delete_ad_group.rb} +34 -8
- data/examples/v201109/{delete_campaign.rb → basic_operations/delete_campaign.rb} +32 -6
- data/examples/v201109/{delete_ad_group_criterion.rb → basic_operations/delete_keyword.rb} +15 -10
- data/examples/v201109/{get_all_ad_groups.rb → basic_operations/get_ad_groups.rb} +32 -18
- data/examples/v201109/{get_all_campaigns.rb → basic_operations/get_campaigns.rb} +31 -14
- data/examples/v201109/{get_all_active_ad_group_criteria.rb → basic_operations/get_keywords.rb} +41 -34
- data/examples/v201109/{get_all_ads.rb → basic_operations/get_text_ads.rb} +39 -22
- data/examples/v201109/{update_ad.rb → basic_operations/pause_ad.rb} +9 -10
- data/examples/v201109/{update_ad_group.rb → basic_operations/update_ad_group.rb} +2 -1
- data/examples/v201109/{update_campaign.rb → basic_operations/update_campaign.rb} +2 -1
- data/examples/v201109/{update_ad_group_criterion.rb → basic_operations/update_keyword.rb} +10 -9
- data/examples/v201109/{add_experiment.rb → campaign_management/add_experiment.rb} +4 -3
- data/examples/v201109/{perform_mutate_job.rb → campaign_management/add_keywords_in_bulk.rb} +17 -43
- data/examples/v201109/{add_campaign_ad_extension.rb → campaign_management/add_location_extension.rb} +28 -37
- data/examples/v201109/{add_ad_extension_override.rb → campaign_management/add_location_extension_override.rb} +12 -10
- data/examples/v201109/{get_all_disapproved_ads.rb → campaign_management/get_all_disapproved_ads.rb} +3 -2
- data/examples/v201109/{promote_experiment.rb → campaign_management/promote_experiment.rb} +4 -4
- data/examples/v201109/{set_ad_params.rb → campaign_management/set_ad_parameters.rb} +7 -7
- data/examples/{v201003/delete_ad.rb → v201109/campaign_management/validate_text_ad.rb} +40 -16
- data/examples/v201109/{handle_partial_failures.rb → error_handling/handle_partial_failures.rb} +2 -1
- data/examples/v201109/{handle_policy_violation_error.rb → error_handling/handle_policy_violation_error.rb} +2 -1
- data/examples/v201109/{handle_second_factor.rb → error_handling/handle_two_factor_authorization_error.rb} +5 -4
- data/examples/v201109/{get_all_images.rb → misc/get_all_images_and_videos.rb} +40 -20
- data/examples/v201109/{upload_image.rb → misc/upload_image.rb} +2 -1
- data/examples/v201109/{oauth_handling.rb → misc/use_oauth.rb} +10 -7
- data/examples/v201109/{get_traffic_estimates.rb → optimization/estimate_keyword_traffic.rb} +4 -3
- data/examples/v201109/{get_criterion_bid_landscape.rb → optimization/get_keyword_bid_simulations.rb} +21 -20
- data/examples/v201109/{get_related_keywords.rb → optimization/get_keyword_ideas.rb} +6 -5
- data/examples/v201109/{get_keyword_opportunities.rb → optimization/get_keyword_opportunities.rb} +2 -1
- data/examples/v201109/{get_related_placements.rb → optimization/get_placement_ideas.rb} +5 -4
- data/examples/v201109/{add_user_list.rb → remarketing/add_audience.rb} +6 -5
- data/examples/v201109/{add_conversion.rb → remarketing/add_conversion_tracker.rb} +8 -7
- data/examples/v201109/{download_adhoc_report.rb → reporting/download_criteria_report.rb} +19 -17
- data/examples/v201109/{download_report.rb → reporting/download_defined_report.rb} +7 -5
- data/examples/v201109/{get_all_report_definitions.rb → reporting/get_defined_reports.rb} +7 -6
- data/examples/v201109/{get_report_fields.rb → reporting/get_report_fields.rb} +2 -1
- data/examples/v201109/{parallel_report_download.rb → reporting/parallel_report_download.rb} +2 -1
- data/examples/v201109/{add_campaign_targeting_criteria.rb → targeting/add_campaign_targeting_criteria.rb} +22 -4
- data/examples/v201109/{add_negative_campaign_criterion.rb → targeting/get_campaign_targeting_criteria.rb} +43 -26
- data/examples/v201109/{get_all_carriers.rb → targeting/get_targetable_languages_and_carriers.rb} +19 -4
- data/examples/v201109/{get_location_criteria.rb → targeting/lookup_location.rb} +4 -3
- data/lib/adwords_api.rb +2 -2
- data/lib/adwords_api/api_config.rb +3 -130
- data/lib/adwords_api/client_login_header_handler.rb +1 -1
- data/lib/adwords_api/credential_handler.rb +2 -2
- data/lib/adwords_api/errors.rb +2 -2
- data/lib/adwords_api/extensions.rb +3 -2
- data/lib/adwords_api/report_utils.rb +1 -1
- data/lib/adwords_api/utils.rb +2 -2
- data/lib/adwords_api/v13_login_handler.rb +1 -1
- data/lib/adwords_api/v201109/ad_extension_override_service.rb +10 -8
- data/lib/adwords_api/v201109/ad_extension_override_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/ad_group_ad_service.rb +10 -8
- data/lib/adwords_api/v201109/ad_group_ad_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/ad_group_criterion_service.rb +10 -8
- data/lib/adwords_api/v201109/ad_group_criterion_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/ad_group_service.rb +10 -8
- data/lib/adwords_api/v201109/ad_group_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/ad_param_service.rb +10 -8
- data/lib/adwords_api/v201109/ad_param_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/alert_service.rb +6 -4
- data/lib/adwords_api/v201109/alert_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/bulk_mutate_job_service.rb +10 -8
- data/lib/adwords_api/v201109/bulk_mutate_job_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/bulk_opportunity_service.rb +6 -4
- data/lib/adwords_api/v201109/bulk_opportunity_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/campaign_ad_extension_service.rb +10 -8
- data/lib/adwords_api/v201109/campaign_ad_extension_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/campaign_criterion_service.rb +10 -8
- data/lib/adwords_api/v201109/campaign_criterion_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/campaign_service.rb +10 -8
- data/lib/adwords_api/v201109/campaign_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/campaign_target_service.rb +10 -8
- data/lib/adwords_api/v201109/campaign_target_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/constant_data_service.rb +6 -4
- data/lib/adwords_api/v201109/constant_data_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/conversion_tracker_service.rb +10 -8
- data/lib/adwords_api/v201109/conversion_tracker_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/create_account_service.rb +6 -4
- data/lib/adwords_api/v201109/create_account_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/customer_sync_service.rb +6 -4
- data/lib/adwords_api/v201109/customer_sync_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/data_service.rb +10 -8
- data/lib/adwords_api/v201109/data_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/experiment_service.rb +10 -8
- data/lib/adwords_api/v201109/experiment_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/geo_location_service.rb +6 -4
- data/lib/adwords_api/v201109/geo_location_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/info_service.rb +6 -4
- data/lib/adwords_api/v201109/info_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/location_criterion_service.rb +6 -4
- data/lib/adwords_api/v201109/location_criterion_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/media_service.rb +10 -8
- data/lib/adwords_api/v201109/media_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/mutate_job_service.rb +10 -8
- data/lib/adwords_api/v201109/mutate_job_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/report_definition_service.rb +10 -8
- data/lib/adwords_api/v201109/report_definition_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/serviced_account_service.rb +6 -4
- data/lib/adwords_api/v201109/serviced_account_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/targeting_idea_service.rb +10 -8
- data/lib/adwords_api/v201109/targeting_idea_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/traffic_estimator_service.rb +6 -4
- data/lib/adwords_api/v201109/traffic_estimator_service_registry.rb +8 -6
- data/lib/adwords_api/v201109/user_list_service.rb +10 -8
- data/lib/adwords_api/v201109/user_list_service_registry.rb +8 -6
- data/test/adwords_api/test_api_config.rb +2 -7
- data/test/adwords_api/test_report_utils.rb +2 -1
- data/test/adwords_api/test_utils.rb +1 -0
- data/test/bugs/test_issue_00000031.rb +2 -1
- metadata +116 -481
- data/examples/v200909/add_ad_extension_override.rb +0 -82
- data/examples/v200909/add_ad_group.rb +0 -89
- data/examples/v200909/add_ad_group_criteria.rb +0 -108
- data/examples/v200909/add_ads.rb +0 -121
- data/examples/v200909/add_campaign.rb +0 -92
- data/examples/v200909/add_campaign_ad_extension.rb +0 -121
- data/examples/v200909/add_negative_campaign_criterion.rb +0 -87
- data/examples/v200909/check_campaigns.rb +0 -123
- data/examples/v200909/delete_ad.rb +0 -85
- data/examples/v200909/delete_ad_group.rb +0 -77
- data/examples/v200909/delete_ad_group_criterion.rb +0 -86
- data/examples/v200909/delete_campaign.rb +0 -78
- data/examples/v200909/get_all_active_ad_group_criteria.rb +0 -84
- data/examples/v200909/get_all_ad_extension_overrides.rb +0 -82
- data/examples/v200909/get_all_ad_group_criteria.rb +0 -82
- data/examples/v200909/get_all_ad_groups.rb +0 -79
- data/examples/v200909/get_all_ad_params.rb +0 -80
- data/examples/v200909/get_all_ads.rb +0 -79
- data/examples/v200909/get_all_campaign_ad_extensions.rb +0 -81
- data/examples/v200909/get_all_campaign_targets.rb +0 -74
- data/examples/v200909/get_all_campaigns.rb +0 -74
- data/examples/v200909/get_all_disapproved_ads.rb +0 -85
- data/examples/v200909/get_all_paused_campaigns.rb +0 -77
- data/examples/v200909/get_conversion_optimizer_eligibility.rb +0 -103
- data/examples/v200909/get_geo_location_info.rb +0 -99
- data/examples/v200909/get_method_cost.rb +0 -87
- data/examples/v200909/get_operation_count.rb +0 -79
- data/examples/v200909/get_related_keywords.rb +0 -108
- data/examples/v200909/get_related_placements.rb +0 -107
- data/examples/v200909/get_total_usage_units_per_month.rb +0 -74
- data/examples/v200909/get_unit_count.rb +0 -79
- data/examples/v200909/perform_bulk_mutate_job.rb +0 -212
- data/examples/v200909/set_ad_params.rb +0 -115
- data/examples/v200909/set_campaign_targets.rb +0 -116
- data/examples/v200909/update_ad_group.rb +0 -81
- data/examples/v200909/update_ad_group_criterion.rb +0 -99
- data/examples/v200909/update_campaign.rb +0 -84
- data/examples/v201003/add_ad_extension_override.rb +0 -82
- data/examples/v201003/add_ad_group.rb +0 -89
- data/examples/v201003/add_ad_group_criteria.rb +0 -108
- data/examples/v201003/add_ads.rb +0 -174
- data/examples/v201003/add_campaign.rb +0 -92
- data/examples/v201003/add_campaign_ad_extension.rb +0 -121
- data/examples/v201003/add_keywords_performance_report_definition.rb +0 -99
- data/examples/v201003/add_negative_campaign_criterion.rb +0 -87
- data/examples/v201003/check_campaigns.rb +0 -123
- data/examples/v201003/delete_ad_group.rb +0 -77
- data/examples/v201003/delete_ad_group_criterion.rb +0 -86
- data/examples/v201003/delete_campaign.rb +0 -78
- data/examples/v201003/download_report.rb +0 -67
- data/examples/v201003/get_all_active_ad_group_criteria.rb +0 -84
- data/examples/v201003/get_all_ad_extension_overrides.rb +0 -82
- data/examples/v201003/get_all_ad_group_criteria.rb +0 -82
- data/examples/v201003/get_all_ad_groups.rb +0 -79
- data/examples/v201003/get_all_ad_params.rb +0 -80
- data/examples/v201003/get_all_ads.rb +0 -82
- data/examples/v201003/get_all_campaign_ad_extensions.rb +0 -81
- data/examples/v201003/get_all_campaign_targets.rb +0 -74
- data/examples/v201003/get_all_campaigns.rb +0 -74
- data/examples/v201003/get_all_disapproved_ads.rb +0 -85
- data/examples/v201003/get_all_images.rb +0 -80
- data/examples/v201003/get_all_paused_campaigns.rb +0 -77
- data/examples/v201003/get_all_report_definitions.rb +0 -75
- data/examples/v201003/get_all_videos.rb +0 -76
- data/examples/v201003/get_conversion_optimizer_eligibility.rb +0 -103
- data/examples/v201003/get_criterion_bid_landscape.rb +0 -96
- data/examples/v201003/get_geo_location_info.rb +0 -99
- data/examples/v201003/get_method_cost.rb +0 -87
- data/examples/v201003/get_operation_count.rb +0 -79
- data/examples/v201003/get_related_keywords.rb +0 -108
- data/examples/v201003/get_related_placements.rb +0 -107
- data/examples/v201003/get_report_fields.rb +0 -72
- data/examples/v201003/get_total_usage_units_per_month.rb +0 -74
- data/examples/v201003/get_unit_count.rb +0 -79
- data/examples/v201003/perform_bulk_mutate_job.rb +0 -212
- data/examples/v201003/set_ad_params.rb +0 -115
- data/examples/v201003/set_campaign_targets.rb +0 -116
- data/examples/v201003/update_ad.rb +0 -86
- data/examples/v201003/update_ad_group.rb +0 -81
- data/examples/v201003/update_ad_group_criterion.rb +0 -99
- data/examples/v201003/update_campaign.rb +0 -83
- data/examples/v201003/upload_image.rb +0 -90
- data/examples/v201008/add_ad_extension_override.rb +0 -82
- data/examples/v201008/add_ad_group.rb +0 -89
- data/examples/v201008/add_ad_group_criteria.rb +0 -108
- data/examples/v201008/add_ads.rb +0 -174
- data/examples/v201008/add_campaign.rb +0 -92
- data/examples/v201008/add_campaign_ad_extension.rb +0 -121
- data/examples/v201008/add_experiment.rb +0 -153
- data/examples/v201008/add_keywords_performance_report_definition.rb +0 -99
- data/examples/v201008/add_negative_campaign_criterion.rb +0 -87
- data/examples/v201008/add_user_list.rb +0 -87
- data/examples/v201008/check_campaigns.rb +0 -123
- data/examples/v201008/delete_ad.rb +0 -85
- data/examples/v201008/delete_ad_group.rb +0 -77
- data/examples/v201008/delete_ad_group_criterion.rb +0 -86
- data/examples/v201008/delete_bulk_mutate_job.rb +0 -87
- data/examples/v201008/delete_campaign.rb +0 -78
- data/examples/v201008/delete_experiment.rb +0 -78
- data/examples/v201008/delete_user_list.rb +0 -78
- data/examples/v201008/download_report.rb +0 -67
- data/examples/v201008/get_account_hierarchy.rb +0 -101
- data/examples/v201008/get_all_account_changes.rb +0 -135
- data/examples/v201008/get_all_active_ad_group_criteria.rb +0 -84
- data/examples/v201008/get_all_ad_extension_overrides.rb +0 -82
- data/examples/v201008/get_all_ad_group_criteria.rb +0 -82
- data/examples/v201008/get_all_ad_groups.rb +0 -79
- data/examples/v201008/get_all_ad_params.rb +0 -80
- data/examples/v201008/get_all_ads.rb +0 -82
- data/examples/v201008/get_all_campaign_ad_extensions.rb +0 -81
- data/examples/v201008/get_all_campaign_targets.rb +0 -74
- data/examples/v201008/get_all_campaigns.rb +0 -74
- data/examples/v201008/get_all_disapproved_ads.rb +0 -85
- data/examples/v201008/get_all_experiments.rb +0 -84
- data/examples/v201008/get_all_images.rb +0 -80
- data/examples/v201008/get_all_paused_campaigns.rb +0 -77
- data/examples/v201008/get_all_report_definitions.rb +0 -75
- data/examples/v201008/get_all_user_lists.rb +0 -75
- data/examples/v201008/get_all_videos.rb +0 -76
- data/examples/v201008/get_bulk_mutate_job.rb +0 -97
- data/examples/v201008/get_campaign_alerts.rb +0 -95
- data/examples/v201008/get_conversion_optimizer_eligibility.rb +0 -88
- data/examples/v201008/get_criterion_bid_landscape.rb +0 -96
- data/examples/v201008/get_geo_location_info.rb +0 -99
- data/examples/v201008/get_method_cost.rb +0 -87
- data/examples/v201008/get_operation_count.rb +0 -79
- data/examples/v201008/get_related_keywords.rb +0 -108
- data/examples/v201008/get_related_placements.rb +0 -107
- data/examples/v201008/get_report_fields.rb +0 -72
- data/examples/v201008/get_total_usage_units_per_month.rb +0 -74
- data/examples/v201008/get_traffic_estimates.rb +0 -147
- data/examples/v201008/get_unit_count.rb +0 -79
- data/examples/v201008/handle_partial_failures.rb +0 -127
- data/examples/v201008/handle_policy_violation_error.rb +0 -138
- data/examples/v201008/perform_bulk_mutate_job.rb +0 -212
- data/examples/v201008/promote_experiment.rb +0 -79
- data/examples/v201008/set_ad_params.rb +0 -115
- data/examples/v201008/set_campaign_targets.rb +0 -116
- data/examples/v201008/update_ad.rb +0 -86
- data/examples/v201008/update_ad_group.rb +0 -81
- data/examples/v201008/update_ad_group_criterion.rb +0 -99
- data/examples/v201008/update_campaign.rb +0 -84
- data/examples/v201008/update_user_list.rb +0 -82
- data/examples/v201008/upload_image.rb +0 -90
- data/examples/v201101/add_ad_extension_override.rb +0 -82
- data/examples/v201101/add_ad_group.rb +0 -89
- data/examples/v201101/add_ad_group_criteria.rb +0 -108
- data/examples/v201101/add_ads.rb +0 -174
- data/examples/v201101/add_campaign.rb +0 -99
- data/examples/v201101/add_campaign_ad_extension.rb +0 -121
- data/examples/v201101/add_conversion.rb +0 -88
- data/examples/v201101/add_experiment.rb +0 -153
- data/examples/v201101/add_keywords_performance_report_definition.rb +0 -99
- data/examples/v201101/add_negative_campaign_criterion.rb +0 -87
- data/examples/v201101/add_user_list.rb +0 -113
- data/examples/v201101/check_campaigns.rb +0 -123
- data/examples/v201101/delete_ad.rb +0 -85
- data/examples/v201101/delete_ad_group.rb +0 -77
- data/examples/v201101/delete_ad_group_criterion.rb +0 -86
- data/examples/v201101/delete_bulk_mutate_job.rb +0 -87
- data/examples/v201101/delete_campaign.rb +0 -78
- data/examples/v201101/delete_experiment.rb +0 -78
- data/examples/v201101/delete_user_list.rb +0 -78
- data/examples/v201101/download_report.rb +0 -67
- data/examples/v201101/get_account_hierarchy.rb +0 -102
- data/examples/v201101/get_ad_group_bid_landscape.rb +0 -94
- data/examples/v201101/get_all_account_changes.rb +0 -137
- data/examples/v201101/get_all_active_ad_group_criteria.rb +0 -97
- data/examples/v201101/get_all_ad_extension_overrides.rb +0 -82
- data/examples/v201101/get_all_ad_group_criteria.rb +0 -88
- data/examples/v201101/get_all_ad_groups.rb +0 -85
- data/examples/v201101/get_all_ad_params.rb +0 -80
- data/examples/v201101/get_all_ads.rb +0 -90
- data/examples/v201101/get_all_campaign_ad_extensions.rb +0 -87
- data/examples/v201101/get_all_campaign_targets.rb +0 -74
- data/examples/v201101/get_all_campaigns.rb +0 -77
- data/examples/v201101/get_all_conversions.rb +0 -79
- data/examples/v201101/get_all_disapproved_ads.rb +0 -93
- data/examples/v201101/get_all_experiments.rb +0 -89
- data/examples/v201101/get_all_images.rb +0 -82
- data/examples/v201101/get_all_paused_campaigns.rb +0 -83
- data/examples/v201101/get_all_report_definitions.rb +0 -75
- data/examples/v201101/get_all_user_lists.rb +0 -78
- data/examples/v201101/get_all_videos.rb +0 -78
- data/examples/v201101/get_bulk_mutate_job.rb +0 -97
- data/examples/v201101/get_campaign_alerts.rb +0 -95
- data/examples/v201101/get_conversion_optimizer_eligibility.rb +0 -93
- data/examples/v201101/get_criterion_bid_landscape.rb +0 -93
- data/examples/v201101/get_geo_location_info.rb +0 -99
- data/examples/v201101/get_keyword_opportunities.rb +0 -95
- data/examples/v201101/get_method_cost.rb +0 -87
- data/examples/v201101/get_operation_count.rb +0 -79
- data/examples/v201101/get_related_keywords.rb +0 -108
- data/examples/v201101/get_related_placements.rb +0 -107
- data/examples/v201101/get_report_fields.rb +0 -72
- data/examples/v201101/get_total_usage_units_per_month.rb +0 -74
- data/examples/v201101/get_traffic_estimates.rb +0 -148
- data/examples/v201101/get_unit_count.rb +0 -79
- data/examples/v201101/handle_partial_failures.rb +0 -127
- data/examples/v201101/handle_policy_violation_error.rb +0 -138
- data/examples/v201101/handle_second_factor.rb +0 -87
- data/examples/v201101/oauth_handling.rb +0 -95
- data/examples/v201101/perform_bulk_mutate_job.rb +0 -212
- data/examples/v201101/promote_experiment.rb +0 -79
- data/examples/v201101/set_ad_params.rb +0 -115
- data/examples/v201101/set_campaign_targets.rb +0 -102
- data/examples/v201101/update_ad.rb +0 -86
- data/examples/v201101/update_ad_group.rb +0 -81
- data/examples/v201101/update_ad_group_criterion.rb +0 -99
- data/examples/v201101/update_campaign.rb +0 -84
- data/examples/v201101/update_conversion.rb +0 -87
- data/examples/v201101/update_user_list.rb +0 -82
- data/examples/v201101/upload_image.rb +0 -90
- data/examples/v201109/add_ads.rb +0 -174
- data/examples/v201109/check_campaigns.rb +0 -123
- data/examples/v201109/delete_bulk_mutate_job.rb +0 -87
- data/examples/v201109/delete_experiment.rb +0 -78
- data/examples/v201109/delete_user_list.rb +0 -78
- data/examples/v201109/get_ad_group_bid_landscape.rb +0 -94
- data/examples/v201109/get_all_ad_extension_overrides.rb +0 -82
- data/examples/v201109/get_all_ad_group_criteria.rb +0 -90
- data/examples/v201109/get_all_ad_params.rb +0 -86
- data/examples/v201109/get_all_campaign_ad_extensions.rb +0 -87
- data/examples/v201109/get_all_campaign_targets.rb +0 -74
- data/examples/v201109/get_all_conversions.rb +0 -79
- data/examples/v201109/get_all_experiments.rb +0 -89
- data/examples/v201109/get_all_languages.rb +0 -73
- data/examples/v201109/get_all_paused_campaigns.rb +0 -83
- data/examples/v201109/get_all_user_lists.rb +0 -78
- data/examples/v201109/get_all_videos.rb +0 -78
- data/examples/v201109/get_bulk_mutate_job.rb +0 -97
- data/examples/v201109/get_conversion_optimizer_eligibility.rb +0 -93
- data/examples/v201109/get_geo_location_info.rb +0 -99
- data/examples/v201109/get_method_cost.rb +0 -87
- data/examples/v201109/get_operation_count.rb +0 -79
- data/examples/v201109/get_total_usage_units_per_month.rb +0 -74
- data/examples/v201109/oauth_report_download.rb +0 -97
- data/examples/v201109/perform_bulk_mutate_job.rb +0 -212
- data/examples/v201109/update_conversion.rb +0 -87
- data/examples/v201109/update_user_list.rb +0 -82
- data/lib/adwords_api/v13/account_service.rb +0 -48
- data/lib/adwords_api/v13/account_service_registry.rb +0 -41
- data/lib/adwords_api/v13/report_service.rb +0 -65
- data/lib/adwords_api/v13/report_service_registry.rb +0 -41
- data/lib/adwords_api/v200909/ad_extension_override_service.rb +0 -36
- data/lib/adwords_api/v200909/ad_extension_override_service_registry.rb +0 -44
- data/lib/adwords_api/v200909/ad_group_ad_service.rb +0 -36
- data/lib/adwords_api/v200909/ad_group_ad_service_registry.rb +0 -44
- data/lib/adwords_api/v200909/ad_group_criterion_service.rb +0 -36
- data/lib/adwords_api/v200909/ad_group_criterion_service_registry.rb +0 -44
- data/lib/adwords_api/v200909/ad_group_service.rb +0 -36
- data/lib/adwords_api/v200909/ad_group_service_registry.rb +0 -44
- data/lib/adwords_api/v200909/ad_param_service.rb +0 -36
- data/lib/adwords_api/v200909/ad_param_service_registry.rb +0 -44
- data/lib/adwords_api/v200909/bulk_mutate_job_service.rb +0 -36
- data/lib/adwords_api/v200909/bulk_mutate_job_service_registry.rb +0 -44
- data/lib/adwords_api/v200909/campaign_ad_extension_service.rb +0 -36
- data/lib/adwords_api/v200909/campaign_ad_extension_service_registry.rb +0 -44
- data/lib/adwords_api/v200909/campaign_criterion_service.rb +0 -36
- data/lib/adwords_api/v200909/campaign_criterion_service_registry.rb +0 -44
- data/lib/adwords_api/v200909/campaign_service.rb +0 -36
- data/lib/adwords_api/v200909/campaign_service_registry.rb +0 -44
- data/lib/adwords_api/v200909/campaign_target_service.rb +0 -36
- data/lib/adwords_api/v200909/campaign_target_service_registry.rb +0 -44
- data/lib/adwords_api/v200909/geo_location_service.rb +0 -32
- data/lib/adwords_api/v200909/geo_location_service_registry.rb +0 -44
- data/lib/adwords_api/v200909/info_service.rb +0 -32
- data/lib/adwords_api/v200909/info_service_registry.rb +0 -44
- data/lib/adwords_api/v200909/targeting_idea_service.rb +0 -36
- data/lib/adwords_api/v200909/targeting_idea_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/ad_extension_override_service.rb +0 -36
- data/lib/adwords_api/v201003/ad_extension_override_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/ad_group_ad_service.rb +0 -36
- data/lib/adwords_api/v201003/ad_group_ad_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/ad_group_criterion_service.rb +0 -36
- data/lib/adwords_api/v201003/ad_group_criterion_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/ad_group_service.rb +0 -36
- data/lib/adwords_api/v201003/ad_group_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/ad_param_service.rb +0 -36
- data/lib/adwords_api/v201003/ad_param_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/bid_landscape_service.rb +0 -32
- data/lib/adwords_api/v201003/bid_landscape_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/bulk_mutate_job_service.rb +0 -36
- data/lib/adwords_api/v201003/bulk_mutate_job_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/campaign_ad_extension_service.rb +0 -36
- data/lib/adwords_api/v201003/campaign_ad_extension_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/campaign_criterion_service.rb +0 -36
- data/lib/adwords_api/v201003/campaign_criterion_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/campaign_service.rb +0 -36
- data/lib/adwords_api/v201003/campaign_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/campaign_target_service.rb +0 -36
- data/lib/adwords_api/v201003/campaign_target_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/geo_location_service.rb +0 -32
- data/lib/adwords_api/v201003/geo_location_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/info_service.rb +0 -32
- data/lib/adwords_api/v201003/info_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/media_service.rb +0 -36
- data/lib/adwords_api/v201003/media_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/report_definition_service.rb +0 -49
- data/lib/adwords_api/v201003/report_definition_service_registry.rb +0 -44
- data/lib/adwords_api/v201003/targeting_idea_service.rb +0 -36
- data/lib/adwords_api/v201003/targeting_idea_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/ad_extension_override_service.rb +0 -36
- data/lib/adwords_api/v201008/ad_extension_override_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/ad_group_ad_service.rb +0 -36
- data/lib/adwords_api/v201008/ad_group_ad_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/ad_group_criterion_service.rb +0 -36
- data/lib/adwords_api/v201008/ad_group_criterion_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/ad_group_service.rb +0 -36
- data/lib/adwords_api/v201008/ad_group_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/ad_param_service.rb +0 -36
- data/lib/adwords_api/v201008/ad_param_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/alert_service.rb +0 -32
- data/lib/adwords_api/v201008/alert_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/bid_landscape_service.rb +0 -32
- data/lib/adwords_api/v201008/bid_landscape_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/bulk_mutate_job_service.rb +0 -36
- data/lib/adwords_api/v201008/bulk_mutate_job_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/campaign_ad_extension_service.rb +0 -36
- data/lib/adwords_api/v201008/campaign_ad_extension_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/campaign_criterion_service.rb +0 -36
- data/lib/adwords_api/v201008/campaign_criterion_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/campaign_service.rb +0 -36
- data/lib/adwords_api/v201008/campaign_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/campaign_target_service.rb +0 -36
- data/lib/adwords_api/v201008/campaign_target_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/customer_sync_service.rb +0 -32
- data/lib/adwords_api/v201008/customer_sync_service_registry.rb +0 -45
- data/lib/adwords_api/v201008/experiment_service.rb +0 -36
- data/lib/adwords_api/v201008/experiment_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/geo_location_service.rb +0 -32
- data/lib/adwords_api/v201008/geo_location_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/info_service.rb +0 -32
- data/lib/adwords_api/v201008/info_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/media_service.rb +0 -36
- data/lib/adwords_api/v201008/media_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/report_definition_service.rb +0 -49
- data/lib/adwords_api/v201008/report_definition_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/serviced_account_service.rb +0 -32
- data/lib/adwords_api/v201008/serviced_account_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/targeting_idea_service.rb +0 -36
- data/lib/adwords_api/v201008/targeting_idea_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/traffic_estimator_service.rb +0 -32
- data/lib/adwords_api/v201008/traffic_estimator_service_registry.rb +0 -44
- data/lib/adwords_api/v201008/user_list_service.rb +0 -36
- data/lib/adwords_api/v201008/user_list_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/ad_extension_override_service.rb +0 -36
- data/lib/adwords_api/v201101/ad_extension_override_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/ad_group_ad_service.rb +0 -36
- data/lib/adwords_api/v201101/ad_group_ad_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/ad_group_criterion_service.rb +0 -36
- data/lib/adwords_api/v201101/ad_group_criterion_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/ad_group_service.rb +0 -36
- data/lib/adwords_api/v201101/ad_group_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/ad_param_service.rb +0 -36
- data/lib/adwords_api/v201101/ad_param_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/alert_service.rb +0 -32
- data/lib/adwords_api/v201101/alert_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/bulk_mutate_job_service.rb +0 -36
- data/lib/adwords_api/v201101/bulk_mutate_job_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/bulk_opportunity_service.rb +0 -32
- data/lib/adwords_api/v201101/bulk_opportunity_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/campaign_ad_extension_service.rb +0 -36
- data/lib/adwords_api/v201101/campaign_ad_extension_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/campaign_criterion_service.rb +0 -36
- data/lib/adwords_api/v201101/campaign_criterion_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/campaign_service.rb +0 -36
- data/lib/adwords_api/v201101/campaign_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/campaign_target_service.rb +0 -36
- data/lib/adwords_api/v201101/campaign_target_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/conversion_tracker_service.rb +0 -36
- data/lib/adwords_api/v201101/conversion_tracker_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/customer_sync_service.rb +0 -32
- data/lib/adwords_api/v201101/customer_sync_service_registry.rb +0 -45
- data/lib/adwords_api/v201101/data_service.rb +0 -36
- data/lib/adwords_api/v201101/data_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/experiment_service.rb +0 -36
- data/lib/adwords_api/v201101/experiment_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/geo_location_service.rb +0 -32
- data/lib/adwords_api/v201101/geo_location_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/info_service.rb +0 -32
- data/lib/adwords_api/v201101/info_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/media_service.rb +0 -36
- data/lib/adwords_api/v201101/media_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/report_definition_service.rb +0 -49
- data/lib/adwords_api/v201101/report_definition_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/serviced_account_service.rb +0 -32
- data/lib/adwords_api/v201101/serviced_account_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/targeting_idea_service.rb +0 -36
- data/lib/adwords_api/v201101/targeting_idea_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/traffic_estimator_service.rb +0 -32
- data/lib/adwords_api/v201101/traffic_estimator_service_registry.rb +0 -44
- data/lib/adwords_api/v201101/user_list_service.rb +0 -36
- data/lib/adwords_api/v201101/user_list_service_registry.rb +0 -44
@@ -1,4 +1,5 @@
|
|
1
|
-
#!/usr/bin/ruby
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Encoding: utf-8
|
2
3
|
#
|
3
4
|
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
4
5
|
#
|
@@ -18,7 +19,7 @@
|
|
18
19
|
# limitations under the License.
|
19
20
|
#
|
20
21
|
# This example adds various types of targeting criteria to a campaign. To get
|
21
|
-
# campaigns list, run
|
22
|
+
# campaigns list, run get_campaigns.rb.
|
22
23
|
#
|
23
24
|
# Tags: CampaignCriterionService.mutate
|
24
25
|
|
@@ -27,7 +28,7 @@ require 'adwords_api'
|
|
27
28
|
|
28
29
|
API_VERSION = :v201109
|
29
30
|
|
30
|
-
def
|
31
|
+
def add_campaign_targeting_criteria()
|
31
32
|
# AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
|
32
33
|
# when called without parameters.
|
33
34
|
adwords = AdwordsApi::Api.new
|
@@ -65,6 +66,23 @@ def get_location_criteria()
|
|
65
66
|
}
|
66
67
|
end
|
67
68
|
|
69
|
+
# Add negative campaign criterion.
|
70
|
+
operations << {
|
71
|
+
:operator => 'ADD',
|
72
|
+
:operand => {
|
73
|
+
# The 'xsi_type' field allows you to specify the xsi:type of the object
|
74
|
+
# being created. It's only necessary when you must provide an explicit
|
75
|
+
# type that the client library can't infer.
|
76
|
+
:xsi_type => 'NegativeCampaignCriterion',
|
77
|
+
:campaign_id => campaign_id,
|
78
|
+
:criterion => {
|
79
|
+
:xsi_type => 'Keyword',
|
80
|
+
:text => 'jupiter cruise',
|
81
|
+
:match_type => 'BROAD'
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
68
86
|
response = campaign_criterion_srv.mutate(operations)
|
69
87
|
|
70
88
|
if response and response[:value]
|
@@ -82,7 +100,7 @@ end
|
|
82
100
|
|
83
101
|
if __FILE__ == $0
|
84
102
|
begin
|
85
|
-
|
103
|
+
add_campaign_targeting_criteria()
|
86
104
|
|
87
105
|
# HTTP errors.
|
88
106
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,6 +1,7 @@
|
|
1
|
-
#!/usr/bin/ruby
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Encoding: utf-8
|
2
3
|
#
|
3
|
-
# Author:: api.
|
4
|
+
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
4
5
|
#
|
5
6
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
6
7
|
#
|
@@ -17,17 +18,18 @@
|
|
17
18
|
# See the License for the specific language governing permissions and
|
18
19
|
# limitations under the License.
|
19
20
|
#
|
20
|
-
# This example illustrates how to
|
21
|
-
#
|
21
|
+
# This example illustrates how to retrieve all the campaign targets. To set
|
22
|
+
# campaign targets, run add_campaign_targeting_criteria.rb.
|
22
23
|
#
|
23
|
-
# Tags: CampaignCriterionService.
|
24
|
+
# Tags: CampaignCriterionService.get
|
24
25
|
|
25
26
|
require 'rubygems'
|
26
27
|
require 'adwords_api'
|
27
28
|
|
28
29
|
API_VERSION = :v201109
|
30
|
+
PAGE_SIZE = 500
|
29
31
|
|
30
|
-
def
|
32
|
+
def get_campaign_targeting_criteria()
|
31
33
|
# AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
|
32
34
|
# when called without parameters.
|
33
35
|
adwords = AdwordsApi::Api.new
|
@@ -39,35 +41,50 @@ def add_negative_campaign_criterion()
|
|
39
41
|
campaign_criterion_srv =
|
40
42
|
adwords.service(:CampaignCriterionService, API_VERSION)
|
41
43
|
|
44
|
+
# Specify campaign ID to get targeting for.
|
42
45
|
campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
|
43
46
|
|
44
|
-
#
|
45
|
-
|
46
|
-
:
|
47
|
-
:
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
:
|
52
|
-
:
|
53
|
-
:criterion => {
|
54
|
-
:xsi_type => 'Keyword',
|
55
|
-
:text => 'jupiter cruise',
|
56
|
-
:match_type => 'BROAD'
|
57
|
-
}
|
47
|
+
# Selector to get all the targeting for this campaign.
|
48
|
+
selector = {
|
49
|
+
:fields => ['Id', 'CriteriaType', 'KeywordText'],
|
50
|
+
:predicates => [
|
51
|
+
{:field => 'CampaignId', :operator => 'EQUALS', :values => [campaign_id]}
|
52
|
+
],
|
53
|
+
:paging => {
|
54
|
+
:start_index => 0,
|
55
|
+
:number_results => PAGE_SIZE
|
58
56
|
}
|
59
57
|
}
|
60
58
|
|
61
|
-
#
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
59
|
+
# Set initial values.
|
60
|
+
offset, page = 0, {}
|
61
|
+
|
62
|
+
begin
|
63
|
+
page = campaign_criterion_srv.get(selector)
|
64
|
+
if page[:entries]
|
65
|
+
page[:entries].each do |typed_criterion|
|
66
|
+
negative = typed_criterion[:xsi_type] == 'NegativeCampaignCriterion' ?
|
67
|
+
' (negative)' : ''
|
68
|
+
criterion = typed_criterion[:criterion]
|
69
|
+
puts ("Campaign criterion%s with ID %d, type '%s' and text '%s'" +
|
70
|
+
" was found.") %
|
71
|
+
[negative, criterion[:id], criterion[:type], criterion[:text]]
|
72
|
+
end
|
73
|
+
# Increment values to request the next page.
|
74
|
+
offset += PAGE_SIZE
|
75
|
+
selector[:paging][:start_index] = offset
|
76
|
+
end
|
77
|
+
end while page[:total_num_entries] > offset
|
78
|
+
|
79
|
+
if page.include?(:total_num_entries)
|
80
|
+
puts "\tCampaign ID %d has %d criteria." %
|
81
|
+
[campaign_id, page[:total_num_entries]]
|
82
|
+
end
|
66
83
|
end
|
67
84
|
|
68
85
|
if __FILE__ == $0
|
69
86
|
begin
|
70
|
-
|
87
|
+
get_campaign_targeting_criteria()
|
71
88
|
|
72
89
|
# HTTP errors.
|
73
90
|
rescue AdsCommon::Errors::HttpError => e
|
data/examples/v201109/{get_all_carriers.rb → targeting/get_targetable_languages_and_carriers.rb}
RENAMED
@@ -1,4 +1,5 @@
|
|
1
|
-
#!/usr/bin/ruby
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Encoding: utf-8
|
2
3
|
#
|
3
4
|
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
4
5
|
#
|
@@ -17,8 +18,10 @@
|
|
17
18
|
# See the License for the specific language governing permissions and
|
18
19
|
# limitations under the License.
|
19
20
|
#
|
20
|
-
# This example illustrates how to retrieve all carriers available
|
21
|
+
# This example illustrates how to retrieve all languages and carriers available
|
22
|
+
# for targeting.
|
21
23
|
#
|
24
|
+
# Tags: ConstantDataService.getLanguageCriterion
|
22
25
|
# Tags: ConstantDataService.getCarrierCriterion
|
23
26
|
|
24
27
|
require 'rubygems'
|
@@ -26,7 +29,7 @@ require 'adwords_api'
|
|
26
29
|
|
27
30
|
API_VERSION = :v201109
|
28
31
|
|
29
|
-
def
|
32
|
+
def get_targetable_languages_and_carriers()
|
30
33
|
# AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
|
31
34
|
# when called without parameters.
|
32
35
|
adwords = AdwordsApi::Api.new
|
@@ -37,6 +40,18 @@ def get_all_carriers()
|
|
37
40
|
|
38
41
|
constant_data_srv = adwords.service(:ConstantDataService, API_VERSION)
|
39
42
|
|
43
|
+
# Get all languages from ConstantDataService.
|
44
|
+
languages = constant_data_srv.get_language_criterion()
|
45
|
+
|
46
|
+
if languages
|
47
|
+
languages.each do |language|
|
48
|
+
puts "Language name is '%s', ID is %d and code is '%s'." %
|
49
|
+
[language[:name], language[:id], language[:code]]
|
50
|
+
end
|
51
|
+
else
|
52
|
+
puts 'No languages were found.'
|
53
|
+
end
|
54
|
+
|
40
55
|
# Get all carriers from ConstantDataService.
|
41
56
|
carriers = constant_data_srv.get_carrier_criterion()
|
42
57
|
|
@@ -52,7 +67,7 @@ end
|
|
52
67
|
|
53
68
|
if __FILE__ == $0
|
54
69
|
begin
|
55
|
-
|
70
|
+
get_targetable_languages_and_carriers()
|
56
71
|
|
57
72
|
# HTTP errors.
|
58
73
|
rescue AdsCommon::Errors::HttpError => e
|
@@ -1,4 +1,5 @@
|
|
1
|
-
#!/usr/bin/ruby
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Encoding: utf-8
|
2
3
|
#
|
3
4
|
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
4
5
|
#
|
@@ -26,7 +27,7 @@ require 'adwords_api'
|
|
26
27
|
|
27
28
|
API_VERSION = :v201109
|
28
29
|
|
29
|
-
def
|
30
|
+
def lookup_location()
|
30
31
|
# AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
|
31
32
|
# when called without parameters.
|
32
33
|
adwords = AdwordsApi::Api.new
|
@@ -83,7 +84,7 @@ end
|
|
83
84
|
|
84
85
|
if __FILE__ == $0
|
85
86
|
begin
|
86
|
-
|
87
|
+
lookup_location()
|
87
88
|
|
88
89
|
# HTTP errors.
|
89
90
|
rescue AdsCommon::Errors::HttpError => e
|
data/lib/adwords_api.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
|
1
|
+
# Encoding: utf-8
|
2
2
|
#
|
3
3
|
# Authors:: api.sgomes@gmail.com (Sérgio Gomes)
|
4
4
|
# api.dklimkin@gmail.com (Danial Klimkin)
|
5
5
|
#
|
6
|
-
# Copyright:: Copyright
|
6
|
+
# Copyright:: Copyright 2010, Google Inc. All Rights Reserved.
|
7
7
|
#
|
8
8
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
9
9
|
# you may not use this file except in compliance with the License.
|
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
# Encoding: utf-8
|
2
2
|
#
|
3
3
|
# Authors:: api.sgomes@gmail.com (Sérgio Gomes)
|
4
4
|
#
|
5
|
-
# Copyright:: Copyright
|
5
|
+
# Copyright:: Copyright 2010, Google Inc. All Rights Reserved.
|
6
6
|
#
|
7
7
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
# you may not use this file except in compliance with the License.
|
@@ -41,46 +41,11 @@ module AdwordsApi
|
|
41
41
|
|
42
42
|
# Set other constants
|
43
43
|
API_NAME = 'AdwordsApi'
|
44
|
-
CLIENT_LIB_VERSION = '0.
|
44
|
+
CLIENT_LIB_VERSION = '0.5.0'
|
45
45
|
DEFAULT_CONFIG_FILENAME = 'adwords_api.yml'
|
46
46
|
|
47
47
|
# Configure the services available to each version
|
48
48
|
@@service_config = {
|
49
|
-
:v13 => [:AccountService, :ReportService],
|
50
|
-
:v200909 => [:AdExtensionOverrideService, :AdGroupAdService,
|
51
|
-
:AdGroupCriterionService, :AdGroupService, :AdParamService,
|
52
|
-
:BulkMutateJobService, :CampaignAdExtensionService,
|
53
|
-
:CampaignCriterionService, :CampaignService,
|
54
|
-
:CampaignTargetService, :GeoLocationService, :InfoService,
|
55
|
-
:TargetingIdeaService],
|
56
|
-
:v201003 => [:AdExtensionOverrideService, :AdGroupAdService,
|
57
|
-
:AdGroupCriterionService, :AdGroupService, :AdParamService,
|
58
|
-
:BidLandscapeService, :BulkMutateJobService,
|
59
|
-
:CampaignAdExtensionService, :CampaignCriterionService,
|
60
|
-
:CampaignService, :CampaignTargetService,
|
61
|
-
:GeoLocationService, :InfoService, :MediaService,
|
62
|
-
:ReportDefinitionService, :TargetingIdeaService],
|
63
|
-
:v201008 => [:AdExtensionOverrideService, :AdGroupAdService,
|
64
|
-
:AdGroupCriterionService, :AdGroupService, :AdParamService,
|
65
|
-
:AlertService, :BidLandscapeService, :BulkMutateJobService,
|
66
|
-
:CampaignAdExtensionService, :CampaignCriterionService,
|
67
|
-
:CampaignService, :CampaignTargetService,
|
68
|
-
:CustomerSyncService, :ExperimentService,
|
69
|
-
:GeoLocationService, :InfoService, :MediaService,
|
70
|
-
:ReportDefinitionService, :ServicedAccountService,
|
71
|
-
:TargetingIdeaService, :TrafficEstimatorService,
|
72
|
-
:UserListService],
|
73
|
-
:v201101 => [:AdExtensionOverrideService, :AdGroupAdService,
|
74
|
-
:AdGroupCriterionService, :AdGroupService, :AdParamService,
|
75
|
-
:AlertService, :BulkMutateJobService,
|
76
|
-
:BulkOpportunityService, :CampaignAdExtensionService,
|
77
|
-
:CampaignCriterionService, :CampaignService,
|
78
|
-
:CampaignTargetService, :ConversionTrackerService,
|
79
|
-
:CustomerSyncService, :DataService, :ExperimentService,
|
80
|
-
:GeoLocationService, :InfoService, :MediaService,
|
81
|
-
:ReportDefinitionService, :ServicedAccountService,
|
82
|
-
:TargetingIdeaService, :TrafficEstimatorService,
|
83
|
-
:UserListService],
|
84
49
|
:v201109 => [:AdExtensionOverrideService, :AdGroupAdService,
|
85
50
|
:AdGroupCriterionService, :AdGroupService, :AdParamService,
|
86
51
|
:AlertService, :BulkMutateJobService,
|
@@ -100,20 +65,10 @@ module AdwordsApi
|
|
100
65
|
@@environment_config = {
|
101
66
|
:PRODUCTION => {
|
102
67
|
:oauth_scope => 'https://adwords.google.com/api/adwords/',
|
103
|
-
:v13 => 'https://adwords.google.com/api/adwords/',
|
104
|
-
:v200909 => 'https://adwords.google.com/api/adwords/',
|
105
|
-
:v201003 => 'https://adwords.google.com/api/adwords/',
|
106
|
-
:v201008 => 'https://adwords.google.com/api/adwords/',
|
107
|
-
:v201101 => 'https://adwords.google.com/api/adwords/',
|
108
68
|
:v201109 => 'https://adwords.google.com/api/adwords/'
|
109
69
|
},
|
110
70
|
:SANDBOX => {
|
111
71
|
:oauth_scope => 'https://adwords-sandbox.google.com/api/adwords/',
|
112
|
-
:v13 => 'https://sandbox.google.com/api/adwords/',
|
113
|
-
:v200909 => 'https://adwords-sandbox.google.com/api/adwords/',
|
114
|
-
:v201003 => 'https://adwords-sandbox.google.com/api/adwords/',
|
115
|
-
:v201008 => 'https://adwords-sandbox.google.com/api/adwords/',
|
116
|
-
:v201101 => 'https://adwords-sandbox.google.com/api/adwords/',
|
117
72
|
:v201109 => 'https://adwords-sandbox.google.com/api/adwords/'
|
118
73
|
}
|
119
74
|
}
|
@@ -121,88 +76,6 @@ module AdwordsApi
|
|
121
76
|
# Configure the subdirectories for each version / service pair.
|
122
77
|
# A missing pair means that only the base URL is used.
|
123
78
|
@@subdir_config = {
|
124
|
-
# v13
|
125
|
-
[:v13, :AccountService] => '',
|
126
|
-
[:v13, :ReportService] => '',
|
127
|
-
# v200909
|
128
|
-
[:v200909, :AdExtensionOverrideService] => 'cm/',
|
129
|
-
[:v200909, :AdGroupAdService] => 'cm/',
|
130
|
-
[:v200909, :AdGroupCriterionService] => 'cm/',
|
131
|
-
[:v200909, :AdGroupService] => 'cm/',
|
132
|
-
[:v200909, :AdParamService] => 'cm/',
|
133
|
-
[:v200909, :BulkMutateJobService] => 'job/',
|
134
|
-
[:v200909, :CampaignAdExtensionService] => 'cm/',
|
135
|
-
[:v200909, :CampaignCriterionService] => 'cm/',
|
136
|
-
[:v200909, :CampaignService] => 'cm/',
|
137
|
-
[:v200909, :CampaignTargetService] => 'cm/',
|
138
|
-
[:v200909, :GeoLocationService] => 'cm/',
|
139
|
-
[:v200909, :InfoService] => 'info/',
|
140
|
-
[:v200909, :TargetingIdeaService] => 'o/',
|
141
|
-
# v201003
|
142
|
-
[:v201003, :AdExtensionOverrideService] => 'cm/',
|
143
|
-
[:v201003, :AdGroupAdService] => 'cm/',
|
144
|
-
[:v201003, :AdGroupCriterionService] => 'cm/',
|
145
|
-
[:v201003, :AdGroupService] => 'cm/',
|
146
|
-
[:v201003, :AdParamService] => 'cm/',
|
147
|
-
[:v201003, :BidLandscapeService] => 'cm/',
|
148
|
-
[:v201003, :BulkMutateJobService] => 'job/',
|
149
|
-
[:v201003, :CampaignAdExtensionService] => 'cm/',
|
150
|
-
[:v201003, :CampaignCriterionService] => 'cm/',
|
151
|
-
[:v201003, :CampaignService] => 'cm/',
|
152
|
-
[:v201003, :CampaignTargetService] => 'cm/',
|
153
|
-
[:v201003, :GeoLocationService] => 'cm/',
|
154
|
-
[:v201003, :InfoService] => 'info/',
|
155
|
-
[:v201003, :MediaService] => 'cm/',
|
156
|
-
[:v201003, :ReportDefinitionService] => 'cm/',
|
157
|
-
[:v201003, :TargetingIdeaService] => 'o/',
|
158
|
-
# v201008
|
159
|
-
[:v201008, :AdExtensionOverrideService] => 'cm/',
|
160
|
-
[:v201008, :AdGroupAdService] => 'cm/',
|
161
|
-
[:v201008, :AdGroupCriterionService] => 'cm/',
|
162
|
-
[:v201008, :AdGroupService] => 'cm/',
|
163
|
-
[:v201008, :AdParamService] => 'cm/',
|
164
|
-
[:v201008, :AlertService] => 'mcm/',
|
165
|
-
[:v201008, :BidLandscapeService] => 'cm/',
|
166
|
-
[:v201008, :BulkMutateJobService] => 'job/',
|
167
|
-
[:v201008, :CampaignAdExtensionService] => 'cm/',
|
168
|
-
[:v201008, :CampaignCriterionService] => 'cm/',
|
169
|
-
[:v201008, :CampaignService] => 'cm/',
|
170
|
-
[:v201008, :CampaignTargetService] => 'cm/',
|
171
|
-
[:v201008, :CustomerSyncService] => 'ch/',
|
172
|
-
[:v201008, :ExperimentService] => 'cm/',
|
173
|
-
[:v201008, :GeoLocationService] => 'cm/',
|
174
|
-
[:v201008, :InfoService] => 'info/',
|
175
|
-
[:v201008, :MediaService] => 'cm/',
|
176
|
-
[:v201008, :ReportDefinitionService] => 'cm/',
|
177
|
-
[:v201008, :ServicedAccountService] => 'mcm/',
|
178
|
-
[:v201008, :TargetingIdeaService] => 'o/',
|
179
|
-
[:v201008, :TrafficEstimatorService] => 'o/',
|
180
|
-
[:v201008, :UserListService] => 'cm/',
|
181
|
-
# v201101
|
182
|
-
[:v201101, :AdExtensionOverrideService] => 'cm/',
|
183
|
-
[:v201101, :AdGroupAdService] => 'cm/',
|
184
|
-
[:v201101, :AdGroupCriterionService] => 'cm/',
|
185
|
-
[:v201101, :AdGroupService] => 'cm/',
|
186
|
-
[:v201101, :AdParamService] => 'cm/',
|
187
|
-
[:v201101, :AlertService] => 'mcm/',
|
188
|
-
[:v201101, :BulkMutateJobService] => 'job/',
|
189
|
-
[:v201101, :BulkOpportunityService] => 'o/',
|
190
|
-
[:v201101, :CampaignAdExtensionService] => 'cm/',
|
191
|
-
[:v201101, :CampaignCriterionService] => 'cm/',
|
192
|
-
[:v201101, :CampaignService] => 'cm/',
|
193
|
-
[:v201101, :CampaignTargetService] => 'cm/',
|
194
|
-
[:v201101, :ConversionTrackerService] => 'cm/',
|
195
|
-
[:v201101, :CustomerSyncService] => 'ch/',
|
196
|
-
[:v201101, :DataService] => 'cm/',
|
197
|
-
[:v201101, :ExperimentService] => 'cm/',
|
198
|
-
[:v201101, :GeoLocationService] => 'cm/',
|
199
|
-
[:v201101, :InfoService] => 'info/',
|
200
|
-
[:v201101, :MediaService] => 'cm/',
|
201
|
-
[:v201101, :ReportDefinitionService] => 'cm/',
|
202
|
-
[:v201101, :ServicedAccountService] => 'mcm/',
|
203
|
-
[:v201101, :TargetingIdeaService] => 'o/',
|
204
|
-
[:v201101, :TrafficEstimatorService] => 'o/',
|
205
|
-
[:v201101, :UserListService] => 'cm/',
|
206
79
|
# v201109
|
207
80
|
[:v201109, :AdExtensionOverrideService] => 'cm/',
|
208
81
|
[:v201109, :AdGroupAdService] => 'cm/',
|
@@ -1,9 +1,9 @@
|
|
1
|
-
|
1
|
+
# Encoding: utf-8
|
2
2
|
#
|
3
3
|
# Authors:: api.sgomes@gmail.com (Sérgio Gomes)
|
4
4
|
# api.dklimkin@gmail.com (Danial Klimkin)
|
5
5
|
#
|
6
|
-
# Copyright:: Copyright
|
6
|
+
# Copyright:: Copyright 2010, Google Inc. All Rights Reserved.
|
7
7
|
#
|
8
8
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
9
9
|
# you may not use this file except in compliance with the License.
|
data/lib/adwords_api/errors.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
# Encoding: utf-8
|
2
2
|
#
|
3
3
|
# Authors:: api.dklimkin@gmail.com (Danial Klimkin)
|
4
4
|
#
|
5
|
-
# Copyright:: Copyright
|
5
|
+
# Copyright:: Copyright 2010, Google Inc. All Rights Reserved.
|
6
6
|
#
|
7
7
|
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
# you may not use this file except in compliance with the License.
|