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,78 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
#
|
3
|
-
# Author:: api.sgomes@gmail.com (Sérgio Gomes)
|
4
|
-
#
|
5
|
-
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
6
|
-
#
|
7
|
-
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
16
|
-
# implied.
|
17
|
-
# See the License for the specific language governing permissions and
|
18
|
-
# limitations under the License.
|
19
|
-
#
|
20
|
-
# This example illustrates how to retrieve all the user lists for an account.
|
21
|
-
#
|
22
|
-
# Tags: UserListService.get
|
23
|
-
|
24
|
-
require 'rubygems'
|
25
|
-
require 'adwords_api'
|
26
|
-
|
27
|
-
API_VERSION = :v201109
|
28
|
-
|
29
|
-
def get_all_user_lists()
|
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
|
-
user_list_srv = adwords.service(:UserListService, API_VERSION)
|
39
|
-
|
40
|
-
# Get all the user lists for this account.
|
41
|
-
selector = {
|
42
|
-
:fields => ['Id', 'Name', 'Status', 'Size'],
|
43
|
-
:ordering => [{:field => 'Name', :sort_order => 'ASCENDING'}]
|
44
|
-
}
|
45
|
-
response = user_list_srv.get(selector)
|
46
|
-
|
47
|
-
if response and response[:entries]
|
48
|
-
user_lists = response[:entries]
|
49
|
-
user_lists.each do |user_list|
|
50
|
-
puts "User list name is \"#{user_list[:name]}\", id is " +
|
51
|
-
"#{user_list[:id]}, status is \"#{user_list[:status]}\" and number " +
|
52
|
-
"of users is #{user_list[:size]}."
|
53
|
-
end
|
54
|
-
else
|
55
|
-
puts "No user lists were found."
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
if __FILE__ == $0
|
60
|
-
begin
|
61
|
-
get_all_user_lists()
|
62
|
-
|
63
|
-
# HTTP errors.
|
64
|
-
rescue AdsCommon::Errors::HttpError => e
|
65
|
-
puts "HTTP Error: %s" % e
|
66
|
-
|
67
|
-
# API errors.
|
68
|
-
rescue AdwordsApi::Errors::ApiException => e
|
69
|
-
puts "Message: %s" % e.message
|
70
|
-
puts 'Errors:'
|
71
|
-
e.errors.each_with_index do |error, index|
|
72
|
-
puts "\tError [%d]:" % (index + 1)
|
73
|
-
error.each do |field, value|
|
74
|
-
puts "\t\t%s: %s" % [field, value]
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
@@ -1,78 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
#
|
3
|
-
# Author:: api.sgomes@gmail.com (Sérgio Gomes)
|
4
|
-
#
|
5
|
-
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
6
|
-
#
|
7
|
-
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
16
|
-
# implied.
|
17
|
-
# See the License for the specific language governing permissions and
|
18
|
-
# limitations under the License.
|
19
|
-
#
|
20
|
-
# This example illustrates how to retrieve all videos. To upload video, see
|
21
|
-
# http://adwords.google.com/support/aw/bin/answer.py?hl=en&answer=39454
|
22
|
-
#
|
23
|
-
# Tags: MediaService.get
|
24
|
-
|
25
|
-
require 'rubygems'
|
26
|
-
require 'adwords_api'
|
27
|
-
|
28
|
-
API_VERSION = :v201109
|
29
|
-
|
30
|
-
def get_all_videos()
|
31
|
-
# AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
|
32
|
-
# when called without parameters.
|
33
|
-
adwords = AdwordsApi::Api.new
|
34
|
-
|
35
|
-
# To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
|
36
|
-
# the configuration file or provide your own logger:
|
37
|
-
# adwords.logger = Logger.new('adwords_xml.log')
|
38
|
-
|
39
|
-
media_srv = adwords.service(:MediaService, API_VERSION)
|
40
|
-
|
41
|
-
# Get all the videos.
|
42
|
-
selector = {
|
43
|
-
:fields => ['MediaId', 'Name'],
|
44
|
-
:ordering => [{:field => 'MediaId', :sort_order => 'ASCENDING'}],
|
45
|
-
:predicates => [{:field => 'Type', :operator => 'IN', :values => ['VIDEO']}]
|
46
|
-
}
|
47
|
-
response = media_srv.get(selector)
|
48
|
-
if response and response[:entries]
|
49
|
-
videos = response[:entries]
|
50
|
-
puts "#{videos.length} video(s) found."
|
51
|
-
videos.each do |video|
|
52
|
-
puts " Video id is #{video[:media_id]} and name is \"#{video[:name]}\"."
|
53
|
-
end
|
54
|
-
else
|
55
|
-
puts "No videos found."
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
if __FILE__ == $0
|
60
|
-
begin
|
61
|
-
get_all_videos()
|
62
|
-
|
63
|
-
# HTTP errors.
|
64
|
-
rescue AdsCommon::Errors::HttpError => e
|
65
|
-
puts "HTTP Error: %s" % e
|
66
|
-
|
67
|
-
# API errors.
|
68
|
-
rescue AdwordsApi::Errors::ApiException => e
|
69
|
-
puts "Message: %s" % e.message
|
70
|
-
puts 'Errors:'
|
71
|
-
e.errors.each_with_index do |error, index|
|
72
|
-
puts "\tError [%d]:" % (index + 1)
|
73
|
-
error.each do |field, value|
|
74
|
-
puts "\t\t%s: %s" % [field, value]
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
@@ -1,97 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
#
|
3
|
-
# Author:: api.sgomes@gmail.com (Sérgio Gomes)
|
4
|
-
#
|
5
|
-
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
6
|
-
#
|
7
|
-
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
16
|
-
# implied.
|
17
|
-
# See the License for the specific language governing permissions and
|
18
|
-
# limitations under the License.
|
19
|
-
#
|
20
|
-
# This example gets a bulk mutate job and prints out its stats information.
|
21
|
-
# To add a bulk mutate job, run perform_bulk_mutate_job.rb.
|
22
|
-
#
|
23
|
-
# Tags: BulkMutateJobService.get
|
24
|
-
|
25
|
-
require 'rubygems'
|
26
|
-
require 'adwords_api'
|
27
|
-
|
28
|
-
API_VERSION = :v201109
|
29
|
-
|
30
|
-
def get_all_bulk_mutate_jobs()
|
31
|
-
# AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
|
32
|
-
# when called without parameters.
|
33
|
-
adwords = AdwordsApi::Api.new
|
34
|
-
|
35
|
-
# To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
|
36
|
-
# the configuration file or provide your own logger:
|
37
|
-
# adwords.logger = Logger.new('adwords_xml.log')
|
38
|
-
|
39
|
-
bulk_mutate_job_srv = adwords.service(:BulkMutateJobService, API_VERSION)
|
40
|
-
|
41
|
-
# Replace with valid values of your account.
|
42
|
-
bulk_mutate_job_id = "INSERT_BULK_MUTATE_JOB_ID_HERE"
|
43
|
-
|
44
|
-
# Get all the bulk mutate jobs.
|
45
|
-
selector = {
|
46
|
-
:include_stats => true,
|
47
|
-
:job_ids => [bulk_mutate_job_id]
|
48
|
-
}
|
49
|
-
jobs = bulk_mutate_job_srv.get(selector)
|
50
|
-
|
51
|
-
if jobs
|
52
|
-
jobs.each do |job|
|
53
|
-
puts "Bulk mutate job with id %d and status '%s' was found." %
|
54
|
-
[job[:id], job[:status]]
|
55
|
-
|
56
|
-
case job[:status]
|
57
|
-
when 'PENDING'
|
58
|
-
puts " Total parts: %d, parts received: %d." %
|
59
|
-
[job[:num_request_parts], job[:num_request_parts_received]]
|
60
|
-
when 'PROCESSING'
|
61
|
-
if job[:stats]
|
62
|
-
puts " Percent complete: %d." % job[:stats][:progress_percent]
|
63
|
-
end
|
64
|
-
when 'COMPLETED'
|
65
|
-
if job[:stats]
|
66
|
-
puts " Total operations: %d, failed: %d, unprocessed %d." %
|
67
|
-
[job[:stats][:num_operations],
|
68
|
-
job[:stats][:num_failed_operations],
|
69
|
-
job[:stats][:num_unprocessed_operations]]
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
else
|
74
|
-
puts "No bulk mutate jobs were found."
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
if __FILE__ == $0
|
79
|
-
begin
|
80
|
-
get_all_bulk_mutate_jobs()
|
81
|
-
|
82
|
-
# HTTP errors.
|
83
|
-
rescue AdsCommon::Errors::HttpError => e
|
84
|
-
puts "HTTP Error: %s" % e
|
85
|
-
|
86
|
-
# API errors.
|
87
|
-
rescue AdwordsApi::Errors::ApiException => e
|
88
|
-
puts "Message: %s" % e.message
|
89
|
-
puts 'Errors:'
|
90
|
-
e.errors.each_with_index do |error, index|
|
91
|
-
puts "\tError [%d]:" % (index + 1)
|
92
|
-
error.each do |field, value|
|
93
|
-
puts "\t\t%s: %s" % [field, value]
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
@@ -1,93 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
#
|
3
|
-
# Author:: api.sgomes@gmail.com (Sérgio Gomes)
|
4
|
-
#
|
5
|
-
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
6
|
-
#
|
7
|
-
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
16
|
-
# implied.
|
17
|
-
# See the License for the specific language governing permissions and
|
18
|
-
# limitations under the License.
|
19
|
-
#
|
20
|
-
# This example shows how to check for conversion optimizer eligibility by
|
21
|
-
# examining the conversion_optimizer_eligibility field of the Campaign.
|
22
|
-
#
|
23
|
-
# Tags: CampaignService.get
|
24
|
-
|
25
|
-
require 'rubygems'
|
26
|
-
require 'adwords_api'
|
27
|
-
require 'pp'
|
28
|
-
|
29
|
-
API_VERSION = :v201109
|
30
|
-
|
31
|
-
def get_conversion_optimizer_eligibility()
|
32
|
-
# AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
|
33
|
-
# when called without parameters.
|
34
|
-
adwords = AdwordsApi::Api.new
|
35
|
-
|
36
|
-
# To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
|
37
|
-
# the configuration file or provide your own logger:
|
38
|
-
# adwords.logger = Logger.new('adwords_xml.log')
|
39
|
-
|
40
|
-
campaign_srv = adwords.service(:CampaignService, API_VERSION)
|
41
|
-
|
42
|
-
campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
|
43
|
-
|
44
|
-
# Get campaign.
|
45
|
-
selector = {
|
46
|
-
:fields => ['Id', 'Name', 'Eligible', 'RejectionReasons'],
|
47
|
-
:predicates => [{
|
48
|
-
:field => 'Id',
|
49
|
-
:operator => 'IN',
|
50
|
-
:values => [campaign_id]
|
51
|
-
}]
|
52
|
-
}
|
53
|
-
response = campaign_srv.get(selector)
|
54
|
-
|
55
|
-
if response and response[:entries]
|
56
|
-
campaigns = response[:entries]
|
57
|
-
campaigns.each do |campaign|
|
58
|
-
eligibility = campaign[:conversion_optimizer_eligibility]
|
59
|
-
if eligibility[:eligible]
|
60
|
-
puts "Campaign with name is \"#{campaign[:name]}\" and id " +
|
61
|
-
"#{campaign[:id]} is eligible to use the conversion optimizer."
|
62
|
-
else
|
63
|
-
puts "Campaign with name is \"#{campaign[:name]}\" and id " +
|
64
|
-
"#{campaign[:id]} is not eligible to use the conversion " +
|
65
|
-
"optimizer for the reasons: " +
|
66
|
-
eligibility[:rejection_reasons].pretty_inspect
|
67
|
-
end
|
68
|
-
end
|
69
|
-
else
|
70
|
-
puts "No campaigns were found."
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
if __FILE__ == $0
|
75
|
-
begin
|
76
|
-
get_conversion_optimizer_eligibility()
|
77
|
-
|
78
|
-
# HTTP errors.
|
79
|
-
rescue AdsCommon::Errors::HttpError => e
|
80
|
-
puts "HTTP Error: %s" % e
|
81
|
-
|
82
|
-
# API errors.
|
83
|
-
rescue AdwordsApi::Errors::ApiException => e
|
84
|
-
puts "Message: %s" % e.message
|
85
|
-
puts 'Errors:'
|
86
|
-
e.errors.each_with_index do |error, index|
|
87
|
-
puts "\tError [%d]:" % (index + 1)
|
88
|
-
error.each do |field, value|
|
89
|
-
puts "\t\t%s: %s" % [field, value]
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
@@ -1,99 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
#
|
3
|
-
# Author:: api.sgomes@gmail.com (Sérgio Gomes)
|
4
|
-
#
|
5
|
-
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
6
|
-
#
|
7
|
-
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
16
|
-
# implied.
|
17
|
-
# See the License for the specific language governing permissions and
|
18
|
-
# limitations under the License.
|
19
|
-
#
|
20
|
-
# This example illustrates how to retrieve geo location information for
|
21
|
-
# addresses.
|
22
|
-
#
|
23
|
-
# Tags: GeoLocationService.get
|
24
|
-
|
25
|
-
require 'rubygems'
|
26
|
-
require 'adwords_api'
|
27
|
-
|
28
|
-
API_VERSION = :v201109
|
29
|
-
|
30
|
-
def get_geo_location_info()
|
31
|
-
# AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
|
32
|
-
# when called without parameters.
|
33
|
-
adwords = AdwordsApi::Api.new
|
34
|
-
|
35
|
-
# To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
|
36
|
-
# the configuration file or provide your own logger:
|
37
|
-
# adwords.logger = Logger.new('adwords_xml.log')
|
38
|
-
|
39
|
-
geo_location_srv = adwords.service(:GeoLocationService, API_VERSION)
|
40
|
-
|
41
|
-
selector = {
|
42
|
-
:addresses => [
|
43
|
-
{
|
44
|
-
:street_address => '1600 Amphitheatre Parkway',
|
45
|
-
:city_name => 'Mountain View',
|
46
|
-
:province_code => 'US-CA',
|
47
|
-
:province_name => 'California',
|
48
|
-
:postal_code => '94043',
|
49
|
-
:country_code => 'US'
|
50
|
-
},
|
51
|
-
{
|
52
|
-
:street_address => '76 Ninth Avenue',
|
53
|
-
:city_name => 'New York',
|
54
|
-
:province_code => 'US-NY',
|
55
|
-
:province_name => 'New York',
|
56
|
-
:postal_code => '10011',
|
57
|
-
:country_code => 'US'
|
58
|
-
},
|
59
|
-
{
|
60
|
-
:street_address => '五四大街1号, Beijing东城区',
|
61
|
-
:country_code => 'CN'
|
62
|
-
}
|
63
|
-
]
|
64
|
-
}
|
65
|
-
|
66
|
-
# Get the geo location info for the various addresses.
|
67
|
-
locations = geo_location_srv.get(selector)
|
68
|
-
|
69
|
-
if locations
|
70
|
-
locations.each do |location|
|
71
|
-
puts "Address \"#{location[:address][:street_address]}\" has latitude " +
|
72
|
-
"#{location[:geo_point][:latitude_in_micro_degrees]} and " +
|
73
|
-
"longitude #{location[:geo_point][:longitude_in_micro_degrees]}."
|
74
|
-
end
|
75
|
-
else
|
76
|
-
puts "No geo locations were returned."
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
if __FILE__ == $0
|
81
|
-
begin
|
82
|
-
get_geo_location_info()
|
83
|
-
|
84
|
-
# HTTP errors.
|
85
|
-
rescue AdsCommon::Errors::HttpError => e
|
86
|
-
puts "HTTP Error: %s" % e
|
87
|
-
|
88
|
-
# API errors.
|
89
|
-
rescue AdwordsApi::Errors::ApiException => e
|
90
|
-
puts "Message: %s" % e.message
|
91
|
-
puts 'Errors:'
|
92
|
-
e.errors.each_with_index do |error, index|
|
93
|
-
puts "\tError [%d]:" % (index + 1)
|
94
|
-
error.each do |field, value|
|
95
|
-
puts "\t\t%s: %s" % [field, value]
|
96
|
-
end
|
97
|
-
end
|
98
|
-
end
|
99
|
-
end
|