google-adwords-api 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +9 -0
- data/README +26 -10
- data/Rakefile +1 -1
- data/examples/v200909/add_ad_group.rb +2 -2
- data/examples/v200909/add_ads.rb +4 -4
- data/examples/v200909/add_campaign.rb +2 -2
- data/examples/v200909/check_campaigns.rb +4 -4
- data/examples/v201003/add_ad_group.rb +2 -2
- data/examples/v201003/add_ads.rb +6 -6
- data/examples/v201003/add_campaign.rb +2 -2
- data/examples/v201003/add_keywords_performance_report_definition.rb +2 -2
- data/examples/v201003/check_campaigns.rb +4 -4
- data/examples/v201008/add_ad_group.rb +2 -2
- data/examples/v201008/add_ads.rb +7 -7
- data/examples/v201008/add_campaign.rb +2 -2
- data/examples/v201008/add_experiment.rb +5 -5
- data/examples/v201008/add_keywords_performance_report_definition.rb +2 -2
- data/examples/v201008/add_user_list.rb +2 -2
- data/examples/v201008/check_campaigns.rb +4 -4
- data/examples/v201008/get_account_hierarchy.rb +8 -11
- data/examples/v201101/add_ad_group.rb +2 -2
- data/examples/v201101/add_ads.rb +6 -6
- data/examples/v201101/add_campaign.rb +2 -2
- data/examples/v201101/add_conversion.rb +4 -4
- data/examples/v201101/add_experiment.rb +5 -5
- data/examples/v201101/add_keywords_performance_report_definition.rb +2 -2
- data/examples/v201101/add_user_list.rb +3 -3
- data/examples/v201101/check_campaigns.rb +4 -4
- data/examples/v201101/get_account_hierarchy.rb +7 -9
- data/examples/v201109/add_ad_extension_override.rb +82 -0
- data/examples/v201109/add_ad_group.rb +89 -0
- data/examples/v201109/add_ad_group_criteria.rb +109 -0
- data/examples/v201109/add_ads.rb +174 -0
- data/examples/v201109/add_campaign.rb +99 -0
- data/examples/v201109/add_campaign_ad_extension.rb +121 -0
- data/examples/v201109/add_campaign_targeting_criteria.rb +102 -0
- data/examples/{v201101/add_mcc_report_definition.rb → v201109/add_conversion.rb} +26 -28
- data/examples/v201109/add_experiment.rb +153 -0
- data/examples/v201109/add_negative_campaign_criterion.rb +87 -0
- data/examples/v201109/add_user_list.rb +113 -0
- data/examples/v201109/check_campaigns.rb +123 -0
- data/examples/v201109/delete_ad.rb +85 -0
- data/examples/v201109/delete_ad_group.rb +77 -0
- data/examples/v201109/delete_ad_group_criterion.rb +86 -0
- data/examples/v201109/delete_bulk_mutate_job.rb +87 -0
- data/examples/v201109/delete_campaign.rb +78 -0
- data/examples/v201109/delete_experiment.rb +78 -0
- data/examples/v201109/delete_user_list.rb +78 -0
- data/examples/v201109/download_adhoc_report.rb +79 -0
- data/examples/v201109/download_report.rb +67 -0
- data/examples/v201109/get_account_hierarchy.rb +93 -0
- data/examples/v201109/get_ad_group_bid_landscape.rb +94 -0
- data/examples/v201109/get_all_account_changes.rb +137 -0
- data/examples/v201109/get_all_active_ad_group_criteria.rb +98 -0
- data/examples/v201109/get_all_ad_extension_overrides.rb +82 -0
- data/examples/v201109/get_all_ad_group_criteria.rb +90 -0
- data/examples/v201109/get_all_ad_groups.rb +85 -0
- data/examples/v201109/get_all_ad_params.rb +86 -0
- data/examples/v201109/get_all_ads.rb +90 -0
- data/examples/v201109/get_all_campaign_ad_extensions.rb +87 -0
- data/examples/v201109/get_all_campaign_targets.rb +74 -0
- data/examples/v201109/get_all_campaigns.rb +77 -0
- data/examples/v201109/get_all_carriers.rb +72 -0
- data/examples/v201109/get_all_conversions.rb +79 -0
- data/examples/v201109/get_all_disapproved_ads.rb +93 -0
- data/examples/v201109/get_all_experiments.rb +89 -0
- data/examples/v201109/get_all_images.rb +82 -0
- data/examples/v201109/get_all_languages.rb +73 -0
- data/examples/v201109/get_all_paused_campaigns.rb +83 -0
- data/examples/v201109/get_all_report_definitions.rb +75 -0
- data/examples/v201109/get_all_user_lists.rb +78 -0
- data/examples/v201109/get_all_videos.rb +78 -0
- data/examples/v201109/get_bulk_mutate_job.rb +97 -0
- data/examples/v201109/get_campaign_alerts.rb +95 -0
- data/examples/v201109/get_client_customer_id.rb +87 -0
- data/examples/v201109/get_conversion_optimizer_eligibility.rb +93 -0
- data/examples/v201109/get_criterion_bid_landscape.rb +93 -0
- data/examples/v201109/get_geo_location_info.rb +99 -0
- data/examples/v201109/get_keyword_opportunities.rb +95 -0
- data/examples/v201109/get_location_criteria.rb +103 -0
- data/examples/v201109/get_method_cost.rb +87 -0
- data/examples/v201109/get_operation_count.rb +79 -0
- data/examples/v201109/get_related_keywords.rb +108 -0
- data/examples/v201109/get_related_placements.rb +107 -0
- data/examples/v201109/get_report_fields.rb +72 -0
- data/examples/v201109/get_total_usage_units_per_month.rb +74 -0
- data/examples/v201109/get_traffic_estimates.rb +129 -0
- data/examples/v201109/get_unit_count.rb +81 -0
- data/examples/v201109/handle_partial_failures.rb +127 -0
- data/examples/v201109/handle_policy_violation_error.rb +138 -0
- data/examples/v201109/handle_second_factor.rb +87 -0
- data/examples/v201109/oauth_handling.rb +95 -0
- data/examples/v201109/perform_bulk_mutate_job.rb +212 -0
- data/examples/v201109/perform_mutate_job.rb +177 -0
- data/examples/v201109/promote_experiment.rb +79 -0
- data/examples/v201109/set_ad_params.rb +115 -0
- data/examples/v201109/update_ad.rb +86 -0
- data/examples/v201109/update_ad_group.rb +81 -0
- data/examples/v201109/update_ad_group_criterion.rb +99 -0
- data/examples/v201109/update_campaign.rb +84 -0
- data/examples/v201109/update_conversion.rb +87 -0
- data/examples/v201109/update_user_list.rb +82 -0
- data/examples/v201109/upload_image.rb +90 -0
- data/lib/adwords_api.rb +54 -50
- data/lib/adwords_api/api_config.rb +70 -14
- data/lib/adwords_api/credential_handler.rb +32 -13
- data/lib/adwords_api/errors.rb +12 -0
- data/lib/adwords_api/extensions.rb +8 -118
- data/lib/adwords_api/report_utils.rb +198 -0
- data/lib/adwords_api/utils.rb +5 -2
- data/lib/adwords_api/v13/account_service.rb +11 -11
- data/lib/adwords_api/v13/account_service_registry.rb +5 -3
- data/lib/adwords_api/v13/report_service.rb +15 -15
- data/lib/adwords_api/v13/report_service_registry.rb +5 -3
- data/lib/adwords_api/v200909/ad_extension_override_service.rb +5 -5
- data/lib/adwords_api/v200909/ad_extension_override_service_registry.rb +5 -3
- data/lib/adwords_api/v200909/ad_group_ad_service.rb +5 -5
- data/lib/adwords_api/v200909/ad_group_ad_service_registry.rb +5 -3
- data/lib/adwords_api/v200909/ad_group_criterion_service.rb +5 -5
- data/lib/adwords_api/v200909/ad_group_criterion_service_registry.rb +5 -3
- data/lib/adwords_api/v200909/ad_group_service.rb +5 -5
- data/lib/adwords_api/v200909/ad_group_service_registry.rb +5 -3
- data/lib/adwords_api/v200909/ad_param_service.rb +5 -5
- data/lib/adwords_api/v200909/ad_param_service_registry.rb +5 -3
- data/lib/adwords_api/v200909/bulk_mutate_job_service.rb +5 -5
- data/lib/adwords_api/v200909/bulk_mutate_job_service_registry.rb +5 -3
- data/lib/adwords_api/v200909/campaign_ad_extension_service.rb +5 -5
- data/lib/adwords_api/v200909/campaign_ad_extension_service_registry.rb +5 -3
- data/lib/adwords_api/v200909/campaign_criterion_service.rb +5 -5
- data/lib/adwords_api/v200909/campaign_criterion_service_registry.rb +5 -3
- data/lib/adwords_api/v200909/campaign_service.rb +5 -5
- data/lib/adwords_api/v200909/campaign_service_registry.rb +5 -3
- data/lib/adwords_api/v200909/campaign_target_service.rb +5 -5
- data/lib/adwords_api/v200909/campaign_target_service_registry.rb +5 -3
- data/lib/adwords_api/v200909/geo_location_service.rb +3 -3
- data/lib/adwords_api/v200909/geo_location_service_registry.rb +5 -3
- data/lib/adwords_api/v200909/info_service.rb +3 -3
- data/lib/adwords_api/v200909/info_service_registry.rb +5 -3
- data/lib/adwords_api/v200909/targeting_idea_service.rb +5 -5
- data/lib/adwords_api/v200909/targeting_idea_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/ad_extension_override_service.rb +5 -5
- data/lib/adwords_api/v201003/ad_extension_override_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/ad_group_ad_service.rb +5 -5
- data/lib/adwords_api/v201003/ad_group_ad_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/ad_group_criterion_service.rb +5 -5
- data/lib/adwords_api/v201003/ad_group_criterion_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/ad_group_service.rb +5 -5
- data/lib/adwords_api/v201003/ad_group_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/ad_param_service.rb +5 -5
- data/lib/adwords_api/v201003/ad_param_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/bid_landscape_service.rb +3 -3
- data/lib/adwords_api/v201003/bid_landscape_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/bulk_mutate_job_service.rb +5 -5
- data/lib/adwords_api/v201003/bulk_mutate_job_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/campaign_ad_extension_service.rb +5 -5
- data/lib/adwords_api/v201003/campaign_ad_extension_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/campaign_criterion_service.rb +5 -5
- data/lib/adwords_api/v201003/campaign_criterion_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/campaign_service.rb +5 -5
- data/lib/adwords_api/v201003/campaign_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/campaign_target_service.rb +5 -5
- data/lib/adwords_api/v201003/campaign_target_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/geo_location_service.rb +3 -3
- data/lib/adwords_api/v201003/geo_location_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/info_service.rb +3 -3
- data/lib/adwords_api/v201003/info_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/media_service.rb +5 -5
- data/lib/adwords_api/v201003/media_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/report_definition_service.rb +7 -7
- data/lib/adwords_api/v201003/report_definition_service_registry.rb +5 -3
- data/lib/adwords_api/v201003/targeting_idea_service.rb +5 -5
- data/lib/adwords_api/v201003/targeting_idea_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/ad_extension_override_service.rb +5 -5
- data/lib/adwords_api/v201008/ad_extension_override_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/ad_group_ad_service.rb +5 -5
- data/lib/adwords_api/v201008/ad_group_ad_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/ad_group_criterion_service.rb +5 -5
- data/lib/adwords_api/v201008/ad_group_criterion_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/ad_group_service.rb +5 -5
- data/lib/adwords_api/v201008/ad_group_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/ad_param_service.rb +5 -5
- data/lib/adwords_api/v201008/ad_param_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/alert_service.rb +3 -3
- data/lib/adwords_api/v201008/alert_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/bid_landscape_service.rb +3 -3
- data/lib/adwords_api/v201008/bid_landscape_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/bulk_mutate_job_service.rb +5 -5
- data/lib/adwords_api/v201008/bulk_mutate_job_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/campaign_ad_extension_service.rb +5 -5
- data/lib/adwords_api/v201008/campaign_ad_extension_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/campaign_criterion_service.rb +5 -5
- data/lib/adwords_api/v201008/campaign_criterion_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/campaign_service.rb +5 -5
- data/lib/adwords_api/v201008/campaign_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/campaign_target_service.rb +5 -5
- data/lib/adwords_api/v201008/campaign_target_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/customer_sync_service.rb +3 -3
- data/lib/adwords_api/v201008/customer_sync_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/experiment_service.rb +5 -5
- data/lib/adwords_api/v201008/experiment_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/geo_location_service.rb +3 -3
- data/lib/adwords_api/v201008/geo_location_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/info_service.rb +3 -3
- data/lib/adwords_api/v201008/info_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/media_service.rb +5 -5
- data/lib/adwords_api/v201008/media_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/report_definition_service.rb +7 -7
- data/lib/adwords_api/v201008/report_definition_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/serviced_account_service.rb +3 -3
- data/lib/adwords_api/v201008/serviced_account_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/targeting_idea_service.rb +5 -5
- data/lib/adwords_api/v201008/targeting_idea_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/traffic_estimator_service.rb +3 -3
- data/lib/adwords_api/v201008/traffic_estimator_service_registry.rb +5 -3
- data/lib/adwords_api/v201008/user_list_service.rb +5 -5
- data/lib/adwords_api/v201008/user_list_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/ad_extension_override_service.rb +5 -5
- data/lib/adwords_api/v201101/ad_extension_override_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/ad_group_ad_service.rb +5 -5
- data/lib/adwords_api/v201101/ad_group_ad_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/ad_group_criterion_service.rb +5 -5
- data/lib/adwords_api/v201101/ad_group_criterion_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/ad_group_service.rb +5 -5
- data/lib/adwords_api/v201101/ad_group_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/ad_param_service.rb +5 -5
- data/lib/adwords_api/v201101/ad_param_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/alert_service.rb +3 -3
- data/lib/adwords_api/v201101/alert_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/bulk_mutate_job_service.rb +5 -5
- data/lib/adwords_api/v201101/bulk_mutate_job_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/bulk_opportunity_service.rb +3 -3
- data/lib/adwords_api/v201101/bulk_opportunity_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/campaign_ad_extension_service.rb +5 -5
- data/lib/adwords_api/v201101/campaign_ad_extension_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/campaign_criterion_service.rb +5 -5
- data/lib/adwords_api/v201101/campaign_criterion_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/campaign_service.rb +5 -5
- data/lib/adwords_api/v201101/campaign_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/campaign_target_service.rb +5 -5
- data/lib/adwords_api/v201101/campaign_target_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/conversion_tracker_service.rb +5 -5
- data/lib/adwords_api/v201101/conversion_tracker_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/customer_sync_service.rb +3 -3
- data/lib/adwords_api/v201101/customer_sync_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/data_service.rb +5 -5
- data/lib/adwords_api/v201101/data_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/experiment_service.rb +5 -5
- data/lib/adwords_api/v201101/experiment_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/geo_location_service.rb +3 -3
- data/lib/adwords_api/v201101/geo_location_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/info_service.rb +3 -3
- data/lib/adwords_api/v201101/info_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/media_service.rb +5 -5
- data/lib/adwords_api/v201101/media_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/report_definition_service.rb +7 -15
- data/lib/adwords_api/v201101/report_definition_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/serviced_account_service.rb +3 -3
- data/lib/adwords_api/v201101/serviced_account_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/targeting_idea_service.rb +5 -5
- data/lib/adwords_api/v201101/targeting_idea_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/traffic_estimator_service.rb +3 -3
- data/lib/adwords_api/v201101/traffic_estimator_service_registry.rb +5 -3
- data/lib/adwords_api/v201101/user_list_service.rb +5 -5
- data/lib/adwords_api/v201101/user_list_service_registry.rb +5 -3
- data/lib/adwords_api/v201109/ad_extension_override_service.rb +36 -0
- data/lib/adwords_api/v201109/ad_extension_override_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/ad_group_ad_service.rb +36 -0
- data/lib/adwords_api/v201109/ad_group_ad_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/ad_group_criterion_service.rb +36 -0
- data/lib/adwords_api/v201109/ad_group_criterion_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/ad_group_service.rb +36 -0
- data/lib/adwords_api/v201109/ad_group_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/ad_param_service.rb +36 -0
- data/lib/adwords_api/v201109/ad_param_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/alert_service.rb +32 -0
- data/lib/adwords_api/v201109/alert_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/bulk_mutate_job_service.rb +36 -0
- data/lib/adwords_api/v201109/bulk_mutate_job_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/bulk_opportunity_service.rb +32 -0
- data/lib/adwords_api/v201109/bulk_opportunity_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/campaign_ad_extension_service.rb +36 -0
- data/lib/adwords_api/v201109/campaign_ad_extension_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/campaign_criterion_service.rb +36 -0
- data/lib/adwords_api/v201109/campaign_criterion_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/campaign_service.rb +36 -0
- data/lib/adwords_api/v201109/campaign_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/campaign_target_service.rb +36 -0
- data/lib/adwords_api/v201109/campaign_target_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/constant_data_service.rb +36 -0
- data/lib/adwords_api/v201109/constant_data_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/conversion_tracker_service.rb +36 -0
- data/lib/adwords_api/v201109/conversion_tracker_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/customer_sync_service.rb +32 -0
- data/lib/adwords_api/v201109/customer_sync_service_registry.rb +45 -0
- data/lib/adwords_api/v201109/data_service.rb +36 -0
- data/lib/adwords_api/v201109/data_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/experiment_service.rb +36 -0
- data/lib/adwords_api/v201109/experiment_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/geo_location_service.rb +32 -0
- data/lib/adwords_api/v201109/geo_location_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/info_service.rb +32 -0
- data/lib/adwords_api/v201109/info_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/location_criterion_service.rb +32 -0
- data/lib/adwords_api/v201109/location_criterion_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/media_service.rb +36 -0
- data/lib/adwords_api/v201109/media_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/mutate_job_service.rb +40 -0
- data/lib/adwords_api/v201109/mutate_job_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/report_definition_service.rb +45 -0
- data/lib/adwords_api/v201109/report_definition_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/serviced_account_service.rb +32 -0
- data/lib/adwords_api/v201109/serviced_account_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/targeting_idea_service.rb +36 -0
- data/lib/adwords_api/v201109/targeting_idea_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/traffic_estimator_service.rb +32 -0
- data/lib/adwords_api/v201109/traffic_estimator_service_registry.rb +44 -0
- data/lib/adwords_api/v201109/user_list_service.rb +36 -0
- data/lib/adwords_api/v201109/user_list_service_registry.rb +44 -0
- data/test/bugs/test_issue_00000031.rb +78 -0
- metadata +467 -342
- data/examples/v201101/download_mcc_report.rb +0 -113
- data/examples/v201101/download_mcc_report_as_file.rb +0 -114
- data/lib/adwords_api/v13/traffic_estimator_service.rb +0 -44
- data/lib/adwords_api/v13/traffic_estimator_service_registry.rb +0 -39
data/ChangeLog
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
0.4.1:
|
2
|
+
- Support for v201109.
|
3
|
+
- Added support and example for AdHoc reports.
|
4
|
+
- Removed deprecated TrafficEstimatorService (v13 only).
|
5
|
+
- Support for proxies.
|
6
|
+
- Units spent count and other headers information can now be obtained by
|
7
|
+
passing user block to a method call.
|
8
|
+
- Require google-ads-common 0.5.2 or later from now on.
|
9
|
+
|
1
10
|
0.4.0:
|
2
11
|
- First experimental Savon-based release.
|
3
12
|
- use_ruby_names is now deprecated and always true.
|
data/README
CHANGED
@@ -6,9 +6,9 @@ AdWords and DoubleClick Ad Exchange Buyer API!
|
|
6
6
|
Please note that this is an early PREVIEW of the client library, still under
|
7
7
|
development.
|
8
8
|
|
9
|
-
It contains full support for v13, v200909, v201003, v201008
|
10
|
-
full stubs, and a simplified programming interface that lets you
|
11
|
-
everything in native Ruby collections.
|
9
|
+
It contains full support for v13, v200909, v201003, v201008, v201101 and
|
10
|
+
v201109, with full stubs, and a simplified programming interface that lets you
|
11
|
+
handle everything in native Ruby collections.
|
12
12
|
|
13
13
|
|
14
14
|
= Docs for Users
|
@@ -27,9 +27,9 @@ Buyer client library examples. You need the AdWords library in order to use it
|
|
27
27
|
which is installed automatically as a dependency.
|
28
28
|
|
29
29
|
The following gem libraries are required:
|
30
|
-
- savon v0.9.6
|
31
|
-
- httpclient v2.1.2 or greater
|
32
|
-
- google-ads-common v0.5.
|
30
|
+
- savon v0.9.6
|
31
|
+
- httpclient v2.1.2 or greater
|
32
|
+
- google-ads-common v0.5.2 or later.
|
33
33
|
|
34
34
|
|
35
35
|
== 2 - Using the client library:
|
@@ -63,7 +63,7 @@ You can also pass API a manually constructed config hash like:
|
|
63
63
|
:user_agent => 'Ruby Sample',
|
64
64
|
:password => 'PASSWORD',
|
65
65
|
:email => 'user@domain.com',
|
66
|
-
:
|
66
|
+
:client_customer_id => '012-345-6789'
|
67
67
|
},
|
68
68
|
:service => {
|
69
69
|
:environment => 'PRODUCTION'
|
@@ -71,18 +71,19 @@ You can also pass API a manually constructed config hash like:
|
|
71
71
|
})
|
72
72
|
|
73
73
|
Then, just specify which service you're looking to use, and which version:
|
74
|
-
campaign_srv = adwords.service(:CampaignService, :
|
74
|
+
campaign_srv = adwords.service(:CampaignService, :v201109)
|
75
75
|
|
76
76
|
and you should now be able to just use the API methods in the object you were
|
77
77
|
returned:
|
78
|
-
|
78
|
+
# Get 'Id', 'Name' and 'Status' fields of all campaigns.
|
79
|
+
campaigns = campaign_srv.get({:fields => ['Id', 'Name', 'Status']})
|
79
80
|
|
80
81
|
See the code in the examples directory for working examples you can build from.
|
81
82
|
|
82
83
|
*Note*: if your setup requires you to send connections through a proxy server,
|
83
84
|
please set the appropriate options in the config file or config hash. E.g.:
|
84
85
|
config[:connection] = {
|
85
|
-
:proxy => 'http://user:password@proxy_hostname:8080
|
86
|
+
:proxy => 'http://user:password@proxy_hostname:8080'
|
86
87
|
}
|
87
88
|
|
88
89
|
|
@@ -140,6 +141,21 @@ Request details and units spend are logged at the INFO log level, while raw HTTP
|
|
140
141
|
headers and XML dumps are logged at the DEBUG log level. For more details on
|
141
142
|
using Logger refer to the Ruby Logger documentation.
|
142
143
|
|
144
|
+
=== 2.4 - Calculating unit spend:
|
145
|
+
|
146
|
+
Each AdWords API operation performed consumes a certain number of API units, as
|
147
|
+
specified in the rate sheet:
|
148
|
+
http://code.google.com/apis/adwords/docs/ratesheet.html
|
149
|
+
|
150
|
+
The amount of units spent is returned in the header part of the SOAP response.
|
151
|
+
This information can be obtained by passing a user block during method call:
|
152
|
+
response = report_def_srv.get(selector) do |header|
|
153
|
+
puts "Units spent: %d" % header[:units]
|
154
|
+
end
|
155
|
+
|
156
|
+
You can also retrieve the response body as the second block parameter:
|
157
|
+
report_def_srv.get(selector) {|header, body| ... }
|
158
|
+
|
143
159
|
|
144
160
|
= Docs for Developers
|
145
161
|
|
data/Rakefile
CHANGED
@@ -48,7 +48,7 @@ spec = Gem::Specification.new do |s|
|
|
48
48
|
s.test_files = tests
|
49
49
|
s.has_rdoc = true
|
50
50
|
s.extra_rdoc_files = docs
|
51
|
-
s.add_dependency('google-ads-common', '~> 0.5.
|
51
|
+
s.add_dependency('google-ads-common', '~> 0.5.2')
|
52
52
|
s.add_dependency('savon', '= 0.9.6')
|
53
53
|
end
|
54
54
|
|
@@ -44,7 +44,7 @@ def add_ad_group()
|
|
44
44
|
operation = {
|
45
45
|
:operator => 'ADD',
|
46
46
|
:operand => {
|
47
|
-
:name =>
|
47
|
+
:name => "Earth to Mars Cruises #%d" % (Time.new.to_f * 1000).to_i,
|
48
48
|
:status => 'ENABLED',
|
49
49
|
:campaign_id => campaign_id,
|
50
50
|
:bids => {
|
@@ -64,7 +64,7 @@ def add_ad_group()
|
|
64
64
|
# Add ad group.
|
65
65
|
response = ad_group_srv.mutate([operation])
|
66
66
|
ad_group = response[:value].first
|
67
|
-
puts
|
67
|
+
puts "Ad group ID %d was successfully added." % ad_group[:id]
|
68
68
|
end
|
69
69
|
|
70
70
|
if __FILE__ == $0
|
data/examples/v200909/add_ads.rb
CHANGED
@@ -75,7 +75,7 @@ def add_ads()
|
|
75
75
|
:ad_group_id => ad_group_id,
|
76
76
|
:ad => {
|
77
77
|
:xsi_type => 'ImageAd',
|
78
|
-
:name =>
|
78
|
+
:name => "Cruise to mars image ad #%d" % (Time.new.to_f * 1000).to_i,
|
79
79
|
:url => 'http://www.example.com',
|
80
80
|
:display_url => 'www.example.com',
|
81
81
|
:image => {
|
@@ -91,11 +91,11 @@ def add_ads()
|
|
91
91
|
ads = response[:value]
|
92
92
|
puts "Added #{ads.length} ad(s) to ad group #{ad_group_id}."
|
93
93
|
ads.each do |ad|
|
94
|
-
puts " Ad
|
95
|
-
"status is
|
94
|
+
puts " Ad ID is #{ad[:ad][:id]}, type is '#{ad[:ad][:xsi_type]}' and " +
|
95
|
+
"status is '#{ad[:status]}'."
|
96
96
|
end
|
97
97
|
else
|
98
|
-
puts
|
98
|
+
puts 'No ads were added.'
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
@@ -41,7 +41,7 @@ def add_campaign()
|
|
41
41
|
operation = {
|
42
42
|
:operator => 'ADD',
|
43
43
|
:operand => {
|
44
|
-
:name =>
|
44
|
+
:name => "Interplanetary Cruise #%d" % (Time.new.to_f * 1000).to_i,
|
45
45
|
:status => 'PAUSED',
|
46
46
|
:bidding_strategy => {
|
47
47
|
# The 'xsi_type' field allows you to specify the xsi:type of the object
|
@@ -63,7 +63,7 @@ def add_campaign()
|
|
63
63
|
response = campaign_srv.mutate([operation])
|
64
64
|
if response and response[:value]
|
65
65
|
campaign = response[:value].first
|
66
|
-
puts
|
66
|
+
puts "Campaign with name '%s' and ID %d was added." %
|
67
67
|
[campaign[:name], campaign[:id]]
|
68
68
|
else
|
69
69
|
puts 'No campaigns were added.'
|
@@ -45,7 +45,7 @@ def check_campaigns()
|
|
45
45
|
operation = {
|
46
46
|
:operator => 'ADD',
|
47
47
|
:operand => {
|
48
|
-
:name =>
|
48
|
+
:name => "Interplanetary Cruise #%d" % (Time.new.to_f * 1000).to_i,
|
49
49
|
:status => 'PAUSED',
|
50
50
|
:bidding_strategy => {
|
51
51
|
# The 'xsi_type' field allows you to specify the xsi:type of the object
|
@@ -68,8 +68,8 @@ def check_campaigns()
|
|
68
68
|
if response and response[:value]
|
69
69
|
campaigns = response[:value]
|
70
70
|
campaigns.each do |campaign|
|
71
|
-
puts "Unexpected campaign creation! Name
|
72
|
-
"#{campaign[:id]} and status is
|
71
|
+
puts "Unexpected campaign creation! Name '#{campaign[:name]}', ID " +
|
72
|
+
"#{campaign[:id]} and status is '#{campaign[:status]}'."
|
73
73
|
end
|
74
74
|
else
|
75
75
|
puts 'No campaigns created.'
|
@@ -80,7 +80,7 @@ def check_campaigns()
|
|
80
80
|
operation = {
|
81
81
|
:operator => 'ADD',
|
82
82
|
:operand => {
|
83
|
-
:name =>
|
83
|
+
:name => "Interplanetary Cruise #%d" % (Time.new.to_f * 1000).to_i,
|
84
84
|
:status => 'PAUSED',
|
85
85
|
:bidding_strategy => nil,
|
86
86
|
:budget => {
|
@@ -44,7 +44,7 @@ def add_ad_group()
|
|
44
44
|
operation = {
|
45
45
|
:operator => 'ADD',
|
46
46
|
:operand => {
|
47
|
-
:name =>
|
47
|
+
:name => "Earth to Mars Cruises #%d" % (Time.new.to_f * 1000).to_i,
|
48
48
|
:status => 'ENABLED',
|
49
49
|
:campaign_id => campaign_id,
|
50
50
|
:bids => {
|
@@ -64,7 +64,7 @@ def add_ad_group()
|
|
64
64
|
# Add ad group.
|
65
65
|
response = ad_group_srv.mutate([operation])
|
66
66
|
ad_group = response[:value].first
|
67
|
-
puts
|
67
|
+
puts "Ad group ID %d was successfully added." % ad_group[:id]
|
68
68
|
end
|
69
69
|
|
70
70
|
if __FILE__ == $0
|
data/examples/v201003/add_ads.rb
CHANGED
@@ -78,7 +78,7 @@ def add_ads()
|
|
78
78
|
:ad_group_id => ad_group_id,
|
79
79
|
:ad => {
|
80
80
|
:xsi_type => 'ImageAd',
|
81
|
-
:name =>
|
81
|
+
:name => "Cruise to mars image ad #%d" % (Time.new.to_f * 1000).to_i,
|
82
82
|
:url => 'http://www.example.com',
|
83
83
|
:display_url => 'www.example.com',
|
84
84
|
:image => {
|
@@ -92,7 +92,7 @@ def add_ads()
|
|
92
92
|
template_ad_operation = {
|
93
93
|
:operator => 'ADD',
|
94
94
|
:operand => {
|
95
|
-
:
|
95
|
+
:ad_group_id => ad_group_id,
|
96
96
|
:ad => {
|
97
97
|
:xsi_type => 'TemplateAd',
|
98
98
|
:template_id => 9,
|
@@ -100,7 +100,7 @@ def add_ads()
|
|
100
100
|
:width => 300,
|
101
101
|
:height => 250
|
102
102
|
},
|
103
|
-
:name =>
|
103
|
+
:name => "Mars cruise video ad #%d" % (Time.new.to_f * 1000).to_i,
|
104
104
|
:display_url => 'www.example.com',
|
105
105
|
:url => 'http://www.example.com',
|
106
106
|
:template_elements => [{
|
@@ -144,11 +144,11 @@ def add_ads()
|
|
144
144
|
ads = response[:value]
|
145
145
|
puts "Added #{ads.length} ad(s) to ad group #{ad_group_id}."
|
146
146
|
ads.each do |ad|
|
147
|
-
puts " Ad
|
148
|
-
"status is
|
147
|
+
puts " Ad ID is #{ad[:ad][:id]}, type is '#{ad[:ad][:xsi_type]}' and " +
|
148
|
+
"status is '#{ad[:status]}'."
|
149
149
|
end
|
150
150
|
else
|
151
|
-
puts
|
151
|
+
puts 'No ads were added.'
|
152
152
|
end
|
153
153
|
end
|
154
154
|
|
@@ -41,7 +41,7 @@ def add_campaign()
|
|
41
41
|
operation = {
|
42
42
|
:operator => 'ADD',
|
43
43
|
:operand => {
|
44
|
-
:name =>
|
44
|
+
:name => "Interplanetary Cruise #%d" % (Time.new.to_f * 1000).to_i,
|
45
45
|
:status => 'PAUSED',
|
46
46
|
:bidding_strategy => {
|
47
47
|
# The 'xsi_type' field allows you to specify the xsi:type of the object
|
@@ -63,7 +63,7 @@ def add_campaign()
|
|
63
63
|
response = campaign_srv.mutate([operation])
|
64
64
|
if response and response[:value]
|
65
65
|
campaign = response[:value].first
|
66
|
-
puts
|
66
|
+
puts "Campaign with name '%s' and ID %d was added." %
|
67
67
|
[campaign[:name], campaign[:id]]
|
68
68
|
else
|
69
69
|
puts 'No campaigns were added.'
|
@@ -59,7 +59,7 @@ def add_keywords_performance_report_definition()
|
|
59
59
|
:max => end_date
|
60
60
|
}
|
61
61
|
},
|
62
|
-
:report_name =>
|
62
|
+
:report_name => "Keywords performance report #%d" %
|
63
63
|
(Time.new.to_f * 1000).to_i,
|
64
64
|
:report_type => 'KEYWORDS_PERFORMANCE_REPORT',
|
65
65
|
:date_range_type => 'CUSTOM_DATE',
|
@@ -71,7 +71,7 @@ def add_keywords_performance_report_definition()
|
|
71
71
|
response = report_def_srv.mutate([operation])
|
72
72
|
if response
|
73
73
|
response.each do |report_definition|
|
74
|
-
puts
|
74
|
+
puts "Report definition with name '%s' and ID %d was added" %
|
75
75
|
[report_definition[:report_name], report_definition[:id]]
|
76
76
|
end
|
77
77
|
end
|
@@ -45,7 +45,7 @@ def check_campaigns()
|
|
45
45
|
operation = {
|
46
46
|
:operator => 'ADD',
|
47
47
|
:operand => {
|
48
|
-
:name =>
|
48
|
+
:name => "Interplanetary Cruise #%d" % (Time.new.to_f * 1000).to_i,
|
49
49
|
:status => 'PAUSED',
|
50
50
|
:bidding_strategy => {
|
51
51
|
# The 'xsi_type' field allows you to specify the xsi:type of the object
|
@@ -68,8 +68,8 @@ def check_campaigns()
|
|
68
68
|
if response and response[:value]
|
69
69
|
campaigns = response[:value]
|
70
70
|
campaigns.each do |campaign|
|
71
|
-
puts "Unexpected campaign creation! Name
|
72
|
-
"#{campaign[:id]} and status is
|
71
|
+
puts "Unexpected campaign creation! Name '#{campaign[:name]}', ID " +
|
72
|
+
"#{campaign[:id]} and status is '#{campaign[:status]}'."
|
73
73
|
end
|
74
74
|
else
|
75
75
|
puts 'No campaigns created.'
|
@@ -80,7 +80,7 @@ def check_campaigns()
|
|
80
80
|
operation = {
|
81
81
|
:operator => 'ADD',
|
82
82
|
:operand => {
|
83
|
-
:name =>
|
83
|
+
:name => "Interplanetary Cruise #%d" % (Time.new.to_f * 1000).to_i,
|
84
84
|
:status => 'PAUSED',
|
85
85
|
:bidding_strategy => nil,
|
86
86
|
:budget => {
|
@@ -44,7 +44,7 @@ def add_ad_group()
|
|
44
44
|
operation = {
|
45
45
|
:operator => 'ADD',
|
46
46
|
:operand => {
|
47
|
-
:name =>
|
47
|
+
:name => "Earth to Mars Cruises #%d" % (Time.new.to_f * 1000).to_i,
|
48
48
|
:status => 'ENABLED',
|
49
49
|
:campaign_id => campaign_id,
|
50
50
|
:bids => {
|
@@ -64,7 +64,7 @@ def add_ad_group()
|
|
64
64
|
# Add ad group.
|
65
65
|
response = ad_group_srv.mutate([operation])
|
66
66
|
ad_group = response[:value].first
|
67
|
-
puts
|
67
|
+
puts "Ad group ID %d was successfully added." % ad_group[:id]
|
68
68
|
end
|
69
69
|
|
70
70
|
if __FILE__ == $0
|
data/examples/v201008/add_ads.rb
CHANGED
@@ -78,7 +78,7 @@ def add_ads()
|
|
78
78
|
:ad_group_id => ad_group_id,
|
79
79
|
:ad => {
|
80
80
|
:xsi_type => 'ImageAd',
|
81
|
-
:name =>
|
81
|
+
:name => "Cruise to mars image ad #%d" % (Time.new.to_f * 1000).to_i,
|
82
82
|
:url => 'http://www.example.com',
|
83
83
|
:display_url => 'www.example.com',
|
84
84
|
:image => {
|
@@ -88,11 +88,11 @@ def add_ads()
|
|
88
88
|
}
|
89
89
|
}
|
90
90
|
|
91
|
-
# Create template ad, using the Click to Play Video template (
|
91
|
+
# Create template ad, using the Click to Play Video template (ID 9).
|
92
92
|
template_ad_operation = {
|
93
93
|
:operator => 'ADD',
|
94
94
|
:operand => {
|
95
|
-
:
|
95
|
+
:ad_group_id => ad_group_id,
|
96
96
|
:ad => {
|
97
97
|
:xsi_type => 'TemplateAd',
|
98
98
|
:template_id => 9,
|
@@ -100,7 +100,7 @@ def add_ads()
|
|
100
100
|
:width => 300,
|
101
101
|
:height => 250
|
102
102
|
},
|
103
|
-
:name =>
|
103
|
+
:name => "Mars cruise video ad #%d" % (Time.new.to_f * 1000).to_i,
|
104
104
|
:display_url => 'www.example.com',
|
105
105
|
:url => 'http://www.example.com',
|
106
106
|
:template_elements => [{
|
@@ -144,11 +144,11 @@ def add_ads()
|
|
144
144
|
ads = response[:value]
|
145
145
|
puts "Added #{ads.length} ad(s) to ad group #{ad_group_id}."
|
146
146
|
ads.each do |ad|
|
147
|
-
puts " Ad
|
148
|
-
"status is
|
147
|
+
puts " Ad ID is #{ad[:ad][:id]}, type is '#{ad[:ad][:xsi_type]}' and " +
|
148
|
+
"status is '#{ad[:status]}'."
|
149
149
|
end
|
150
150
|
else
|
151
|
-
puts
|
151
|
+
puts 'No ads were added.'
|
152
152
|
end
|
153
153
|
end
|
154
154
|
|
@@ -41,7 +41,7 @@ def add_campaign()
|
|
41
41
|
operation = {
|
42
42
|
:operator => 'ADD',
|
43
43
|
:operand => {
|
44
|
-
:name =>
|
44
|
+
:name => "Interplanetary Cruise #%d" % (Time.new.to_f * 1000).to_i,
|
45
45
|
:status => 'PAUSED',
|
46
46
|
:bidding_strategy => {
|
47
47
|
# The 'xsi_type' field allows you to specify the xsi:type of the object
|
@@ -63,7 +63,7 @@ def add_campaign()
|
|
63
63
|
response = campaign_srv.mutate([operation])
|
64
64
|
if response and response[:value]
|
65
65
|
campaign = response[:value].first
|
66
|
-
puts
|
66
|
+
puts "Campaign with name '%s' and ID %d was added." %
|
67
67
|
[campaign[:name], campaign[:id]]
|
68
68
|
else
|
69
69
|
puts 'No campaigns were added.'
|
@@ -53,16 +53,16 @@ def add_experiment()
|
|
53
53
|
:operator => 'ADD',
|
54
54
|
:operand => {
|
55
55
|
:campaign_id => campaign_id,
|
56
|
-
:name =>
|
56
|
+
:name => "Interplanetary Experiment #%d" % (Time.new.to_f * 1000).to_i,
|
57
57
|
:query_percentage => 10,
|
58
|
-
:start_date_time => Time.now.strftime(
|
58
|
+
:start_date_time => Time.now.strftime('%Y%m%d %H%M%S')
|
59
59
|
}
|
60
60
|
}
|
61
61
|
|
62
62
|
# Add experiment.
|
63
63
|
response = experiment_srv.mutate([operation])
|
64
64
|
experiment = response[:value].first
|
65
|
-
puts
|
65
|
+
puts "Experiment with name '%s' and ID %d was added." %
|
66
66
|
[experiment[:name], experiment[:id]]
|
67
67
|
|
68
68
|
experiment_id = experiment[:id]
|
@@ -93,7 +93,7 @@ def add_experiment()
|
|
93
93
|
# Update ad group.
|
94
94
|
response = ad_group_srv.mutate([operation])
|
95
95
|
ad_group = response[:value].first
|
96
|
-
puts
|
96
|
+
puts "Ad group ID %d was updated for the experiment." % ad_group[:id]
|
97
97
|
|
98
98
|
# Setup ad group criterion for the experiment.
|
99
99
|
ad_group_criterion = {
|
@@ -126,7 +126,7 @@ def add_experiment()
|
|
126
126
|
# Update criterion.
|
127
127
|
response = ad_group_criterion_srv.mutate([operation])
|
128
128
|
criterion = response[:value].first
|
129
|
-
puts
|
129
|
+
puts "Criterion ID %d was successfully updated for the experiment." %
|
130
130
|
[criterion[:criterion][:id]]
|
131
131
|
|
132
132
|
end
|
@@ -59,7 +59,7 @@ def add_keywords_performance_report_definition()
|
|
59
59
|
:max => end_date
|
60
60
|
}
|
61
61
|
},
|
62
|
-
:report_name =>
|
62
|
+
:report_name => "Keywords performance report #%d" %
|
63
63
|
(Time.new.to_f * 1000).to_i,
|
64
64
|
:report_type => 'KEYWORDS_PERFORMANCE_REPORT',
|
65
65
|
:date_range_type => 'CUSTOM_DATE',
|
@@ -71,7 +71,7 @@ def add_keywords_performance_report_definition()
|
|
71
71
|
response = report_def_srv.mutate([operation])
|
72
72
|
if response
|
73
73
|
response.each do |report_definition|
|
74
|
-
puts
|
74
|
+
puts "Report definition with name '%s' and ID %d was added." %
|
75
75
|
[report_definition[:report_name], report_definition[:id]]
|
76
76
|
end
|
77
77
|
end
|