google-adwords-api 0.13.1 → 0.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/COPYING +0 -0
- data/ChangeLog +3 -0
- data/README.md +0 -0
- data/adwords_api.yml +0 -0
- data/examples/v201402/misc/create_ad_words_session_without_properties_file.rb +0 -0
- data/examples/v201402/shopping_campaigns/add_product_partition_tree.rb +0 -0
- data/examples/v201402/shopping_campaigns/add_product_scope.rb +0 -0
- data/examples/v201402/shopping_campaigns/add_shopping_campaign.rb +0 -0
- data/examples/v201402/shopping_campaigns/get_product_category_taxonomy.rb +0 -0
- data/examples/v201402/shopping_campaigns/set_product_sales_channel.rb +0 -0
- data/examples/v201406/advanced_operations/add_places_location_extensions.rb +1 -2
- data/examples/v201409/account_management/create_account.rb +92 -0
- data/examples/v201409/account_management/get_account_changes.rb +145 -0
- data/examples/v201409/account_management/get_account_hierarchy.rb +102 -0
- data/examples/v201409/advanced_operations/add_ad_customizer.rb +277 -0
- data/examples/v201409/advanced_operations/add_ad_group_bid_modifier.rb +105 -0
- data/examples/v201409/advanced_operations/add_click_to_download_ad.rb +137 -0
- data/examples/v201409/advanced_operations/add_places_location_extensions.rb +158 -0
- data/examples/v201409/advanced_operations/add_site_links.rb +306 -0
- data/examples/v201409/advanced_operations/add_text_ad_with_upgraded_urls.rb +137 -0
- data/examples/v201409/advanced_operations/get_ad_group_bid_modifiers.rb +106 -0
- data/examples/v201409/advanced_operations/update_site_links.rb +194 -0
- data/examples/v201409/advanced_operations/upload_offline_conversions.rb +117 -0
- data/examples/v201409/advanced_operations/use_shared_bidding_strategy.rb +164 -0
- data/examples/v201409/basic_operations/add_ad_groups.rb +142 -0
- data/examples/v201409/basic_operations/add_campaigns.rb +153 -0
- data/examples/v201409/basic_operations/add_keywords.rb +116 -0
- data/examples/v201409/basic_operations/add_text_ads.rb +113 -0
- data/examples/v201409/basic_operations/get_ad_groups.rb +106 -0
- data/examples/v201409/basic_operations/get_campaigns.rb +101 -0
- data/examples/v201409/basic_operations/get_campaigns_with_awql.rb +93 -0
- data/examples/v201409/basic_operations/get_keywords.rb +112 -0
- data/examples/v201409/basic_operations/get_text_ads.rb +114 -0
- data/examples/v201409/basic_operations/pause_ad.rb +92 -0
- data/examples/v201409/basic_operations/remove_ad.rb +93 -0
- data/examples/v201409/basic_operations/remove_ad_group.rb +89 -0
- data/examples/v201409/basic_operations/remove_campaign.rb +91 -0
- data/examples/v201409/basic_operations/remove_keyword.rb +98 -0
- data/examples/v201409/basic_operations/update_ad_group.rb +89 -0
- data/examples/v201409/basic_operations/update_campaign.rb +90 -0
- data/examples/v201409/basic_operations/update_keyword.rb +110 -0
- data/examples/v201409/campaign_management/add_campaign_labels.rb +86 -0
- data/examples/v201409/campaign_management/add_experiment.rb +166 -0
- data/examples/v201409/campaign_management/add_keywords_in_bulk.rb +158 -0
- data/examples/v201409/campaign_management/add_location_extension.rb +125 -0
- data/examples/v201409/campaign_management/get_all_disapproved_ads.rb +101 -0
- data/examples/v201409/campaign_management/get_all_disapproved_ads_with_awql.rb +93 -0
- data/examples/v201409/campaign_management/get_campaigns_by_label.rb +112 -0
- data/examples/v201409/campaign_management/promote_experiment.rb +85 -0
- data/examples/v201409/campaign_management/set_ad_parameters.rb +122 -0
- data/examples/v201409/campaign_management/set_criterion_bid_modifier.rb +108 -0
- data/examples/v201409/campaign_management/validate_text_ad.rb +114 -0
- data/examples/v201409/error_handling/handle_captcha_challenge.rb +93 -0
- data/examples/v201409/error_handling/handle_partial_failures.rb +134 -0
- data/examples/v201409/error_handling/handle_policy_violation_error.rb +145 -0
- data/examples/v201409/error_handling/handle_two_factor_authorization_error.rb +88 -0
- data/examples/v201409/misc/create_ad_words_session_without_properties_file.rb +94 -0
- data/examples/v201409/misc/get_all_images_and_videos.rb +108 -0
- data/examples/v201409/misc/setup_oauth2.rb +88 -0
- data/examples/v201409/misc/upload_image.rb +97 -0
- data/examples/v201409/misc/use_oauth2_jwt.rb +97 -0
- data/examples/v201409/optimization/estimate_keyword_traffic.rb +137 -0
- data/examples/v201409/optimization/get_keyword_bid_simulations.rb +100 -0
- data/examples/v201409/optimization/get_keyword_ideas.rb +130 -0
- data/examples/v201409/remarketing/add_audience.rb +123 -0
- data/examples/v201409/remarketing/add_conversion_tracker.rb +105 -0
- data/examples/v201409/reporting/download_criteria_report.rb +87 -0
- data/examples/v201409/reporting/download_criteria_report_with_awql.rb +86 -0
- data/examples/v201409/reporting/get_report_fields.rb +79 -0
- data/examples/v201409/reporting/parallel_report_download.rb +171 -0
- data/examples/v201409/shopping_campaigns/add_product_partition_tree.rb +269 -0
- data/examples/v201409/shopping_campaigns/add_product_scope.rb +133 -0
- data/examples/v201409/shopping_campaigns/add_shopping_campaign.rb +135 -0
- data/examples/v201409/shopping_campaigns/get_product_category_taxonomy.rb +117 -0
- data/examples/v201409/targeting/add_campaign_targeting_criteria.rb +173 -0
- data/examples/v201409/targeting/add_demographic_targeting_criteria.rb +116 -0
- data/examples/v201409/targeting/get_campaign_targeting_criteria.rb +110 -0
- data/examples/v201409/targeting/get_targetable_languages_and_carriers.rb +94 -0
- data/examples/v201409/targeting/lookup_location.rb +112 -0
- data/lib/adwords_api.rb +18 -0
- data/lib/adwords_api/api_config.rb +82 -4
- data/lib/adwords_api/credential_handler.rb +0 -0
- data/lib/adwords_api/errors.rb +0 -0
- data/lib/adwords_api/report_header_handler.rb +8 -0
- data/lib/adwords_api/report_utils.rb +0 -0
- data/lib/adwords_api/utils.rb +0 -0
- data/lib/adwords_api/v201402/ad_group_ad_service.rb +0 -0
- data/lib/adwords_api/v201402/ad_group_ad_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/ad_group_bid_modifier_service.rb +0 -0
- data/lib/adwords_api/v201402/ad_group_bid_modifier_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/ad_group_criterion_service.rb +0 -0
- data/lib/adwords_api/v201402/ad_group_criterion_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/ad_group_feed_service.rb +0 -0
- data/lib/adwords_api/v201402/ad_group_feed_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/ad_group_service.rb +0 -0
- data/lib/adwords_api/v201402/ad_group_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/ad_param_service.rb +0 -0
- data/lib/adwords_api/v201402/ad_param_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/adwords_user_list_service.rb +0 -0
- data/lib/adwords_api/v201402/adwords_user_list_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/alert_service.rb +0 -0
- data/lib/adwords_api/v201402/alert_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/bidding_strategy_service.rb +0 -0
- data/lib/adwords_api/v201402/bidding_strategy_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/budget_order_service.rb +0 -0
- data/lib/adwords_api/v201402/budget_order_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/budget_service.rb +0 -0
- data/lib/adwords_api/v201402/budget_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/campaign_ad_extension_service.rb +0 -0
- data/lib/adwords_api/v201402/campaign_ad_extension_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/campaign_criterion_service.rb +0 -0
- data/lib/adwords_api/v201402/campaign_criterion_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/campaign_feed_service.rb +0 -0
- data/lib/adwords_api/v201402/campaign_feed_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/campaign_service.rb +0 -0
- data/lib/adwords_api/v201402/campaign_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/campaign_shared_set_service.rb +0 -0
- data/lib/adwords_api/v201402/campaign_shared_set_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/constant_data_service.rb +0 -0
- data/lib/adwords_api/v201402/constant_data_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/conversion_tracker_service.rb +0 -0
- data/lib/adwords_api/v201402/conversion_tracker_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/customer_feed_service.rb +0 -0
- data/lib/adwords_api/v201402/customer_feed_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/customer_service.rb +0 -0
- data/lib/adwords_api/v201402/customer_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/customer_sync_service.rb +0 -0
- data/lib/adwords_api/v201402/customer_sync_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/data_service.rb +0 -0
- data/lib/adwords_api/v201402/data_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/experiment_service.rb +0 -0
- data/lib/adwords_api/v201402/experiment_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/feed_item_service.rb +0 -0
- data/lib/adwords_api/v201402/feed_item_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/feed_mapping_service.rb +0 -0
- data/lib/adwords_api/v201402/feed_mapping_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/feed_service.rb +0 -0
- data/lib/adwords_api/v201402/feed_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/geo_location_service.rb +0 -0
- data/lib/adwords_api/v201402/geo_location_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/location_criterion_service.rb +0 -0
- data/lib/adwords_api/v201402/location_criterion_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/managed_customer_service.rb +0 -0
- data/lib/adwords_api/v201402/managed_customer_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/media_service.rb +0 -0
- data/lib/adwords_api/v201402/media_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/mutate_job_service.rb +0 -0
- data/lib/adwords_api/v201402/mutate_job_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/offline_conversion_feed_service.rb +0 -0
- data/lib/adwords_api/v201402/offline_conversion_feed_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/report_definition_service.rb +0 -0
- data/lib/adwords_api/v201402/report_definition_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/shared_criterion_service.rb +0 -0
- data/lib/adwords_api/v201402/shared_criterion_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/shared_set_service.rb +0 -0
- data/lib/adwords_api/v201402/shared_set_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/targeting_idea_service.rb +0 -0
- data/lib/adwords_api/v201402/targeting_idea_service_registry.rb +0 -0
- data/lib/adwords_api/v201402/traffic_estimator_service.rb +0 -0
- data/lib/adwords_api/v201402/traffic_estimator_service_registry.rb +0 -0
- data/lib/adwords_api/v201406/ad_group_ad_service.rb +1 -1
- data/lib/adwords_api/v201406/ad_group_ad_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/ad_group_bid_modifier_service.rb +1 -1
- data/lib/adwords_api/v201406/ad_group_bid_modifier_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/ad_group_criterion_service.rb +1 -1
- data/lib/adwords_api/v201406/ad_group_criterion_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/ad_group_feed_service.rb +1 -1
- data/lib/adwords_api/v201406/ad_group_feed_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/ad_group_service.rb +1 -1
- data/lib/adwords_api/v201406/ad_group_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/ad_param_service.rb +1 -1
- data/lib/adwords_api/v201406/ad_param_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/adwords_user_list_service.rb +1 -1
- data/lib/adwords_api/v201406/adwords_user_list_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/alert_service.rb +1 -1
- data/lib/adwords_api/v201406/alert_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/bidding_strategy_service.rb +1 -1
- data/lib/adwords_api/v201406/bidding_strategy_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/budget_order_service.rb +1 -1
- data/lib/adwords_api/v201406/budget_order_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/budget_service.rb +1 -1
- data/lib/adwords_api/v201406/budget_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/campaign_ad_extension_service.rb +1 -1
- data/lib/adwords_api/v201406/campaign_ad_extension_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/campaign_criterion_service.rb +1 -1
- data/lib/adwords_api/v201406/campaign_criterion_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/campaign_feed_service.rb +1 -1
- data/lib/adwords_api/v201406/campaign_feed_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/campaign_service.rb +1 -1
- data/lib/adwords_api/v201406/campaign_service_registry.rb +2 -2
- data/lib/adwords_api/v201406/campaign_shared_set_service.rb +0 -0
- data/lib/adwords_api/v201406/campaign_shared_set_service_registry.rb +0 -0
- data/lib/adwords_api/v201406/constant_data_service.rb +1 -1
- data/lib/adwords_api/v201406/constant_data_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/conversion_tracker_service.rb +1 -1
- data/lib/adwords_api/v201406/conversion_tracker_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/customer_feed_service.rb +1 -1
- data/lib/adwords_api/v201406/customer_feed_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/customer_service.rb +1 -1
- data/lib/adwords_api/v201406/customer_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/customer_sync_service.rb +1 -1
- data/lib/adwords_api/v201406/customer_sync_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/data_service.rb +1 -1
- data/lib/adwords_api/v201406/data_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/experiment_service.rb +1 -1
- data/lib/adwords_api/v201406/experiment_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/feed_item_service.rb +1 -1
- data/lib/adwords_api/v201406/feed_item_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/feed_mapping_service.rb +1 -1
- data/lib/adwords_api/v201406/feed_mapping_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/feed_service.rb +1 -1
- data/lib/adwords_api/v201406/feed_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/geo_location_service.rb +1 -1
- data/lib/adwords_api/v201406/geo_location_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/label_service.rb +0 -0
- data/lib/adwords_api/v201406/label_service_registry.rb +0 -0
- data/lib/adwords_api/v201406/location_criterion_service.rb +1 -1
- data/lib/adwords_api/v201406/location_criterion_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/managed_customer_service.rb +1 -1
- data/lib/adwords_api/v201406/managed_customer_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/media_service.rb +1 -1
- data/lib/adwords_api/v201406/media_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/mutate_job_service.rb +1 -1
- data/lib/adwords_api/v201406/mutate_job_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/offline_conversion_feed_service.rb +1 -1
- data/lib/adwords_api/v201406/offline_conversion_feed_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/report_definition_service.rb +1 -1
- data/lib/adwords_api/v201406/report_definition_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/shared_criterion_service.rb +0 -0
- data/lib/adwords_api/v201406/shared_criterion_service_registry.rb +0 -0
- data/lib/adwords_api/v201406/shared_set_service.rb +0 -0
- data/lib/adwords_api/v201406/shared_set_service_registry.rb +0 -0
- data/lib/adwords_api/v201406/targeting_idea_service.rb +1 -1
- data/lib/adwords_api/v201406/targeting_idea_service_registry.rb +1 -1
- data/lib/adwords_api/v201406/traffic_estimator_service.rb +1 -1
- data/lib/adwords_api/v201406/traffic_estimator_service_registry.rb +1 -1
- data/lib/adwords_api/v201409/ad_group_ad_service.rb +50 -0
- data/lib/adwords_api/v201409/ad_group_ad_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/ad_group_bid_modifier_service.rb +42 -0
- data/lib/adwords_api/v201409/ad_group_bid_modifier_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/ad_group_criterion_service.rb +46 -0
- data/lib/adwords_api/v201409/ad_group_criterion_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/ad_group_feed_service.rb +42 -0
- data/lib/adwords_api/v201409/ad_group_feed_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/ad_group_service.rb +46 -0
- data/lib/adwords_api/v201409/ad_group_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/ad_param_service.rb +38 -0
- data/lib/adwords_api/v201409/ad_param_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/adwords_user_list_service.rb +38 -0
- data/lib/adwords_api/v201409/adwords_user_list_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/bidding_strategy_service.rb +42 -0
- data/lib/adwords_api/v201409/bidding_strategy_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/budget_order_service.rb +42 -0
- data/lib/adwords_api/v201409/budget_order_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/budget_service.rb +42 -0
- data/lib/adwords_api/v201409/budget_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/campaign_ad_extension_service.rb +38 -0
- data/lib/adwords_api/v201409/campaign_ad_extension_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/campaign_criterion_service.rb +42 -0
- data/lib/adwords_api/v201409/campaign_criterion_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/campaign_feed_service.rb +42 -0
- data/lib/adwords_api/v201409/campaign_feed_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/campaign_service.rb +46 -0
- data/lib/adwords_api/v201409/campaign_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/campaign_shared_set_service.rb +38 -0
- data/lib/adwords_api/v201409/campaign_shared_set_service_registry.rb +47 -0
- data/lib/adwords_api/v201409/constant_data_service.rb +66 -0
- data/lib/adwords_api/v201409/constant_data_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/conversion_tracker_service.rb +38 -0
- data/lib/adwords_api/v201409/conversion_tracker_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/customer_feed_service.rb +42 -0
- data/lib/adwords_api/v201409/customer_feed_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/customer_service.rb +38 -0
- data/lib/adwords_api/v201409/customer_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/customer_sync_service.rb +34 -0
- data/lib/adwords_api/v201409/customer_sync_service_registry.rb +47 -0
- data/lib/adwords_api/v201409/data_service.rb +54 -0
- data/lib/adwords_api/v201409/data_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/experiment_service.rb +38 -0
- data/lib/adwords_api/v201409/experiment_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/feed_item_service.rb +42 -0
- data/lib/adwords_api/v201409/feed_item_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/feed_mapping_service.rb +42 -0
- data/lib/adwords_api/v201409/feed_mapping_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/feed_service.rb +42 -0
- data/lib/adwords_api/v201409/feed_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/geo_location_service.rb +34 -0
- data/lib/adwords_api/v201409/geo_location_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/label_service.rb +42 -0
- data/lib/adwords_api/v201409/label_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/location_criterion_service.rb +38 -0
- data/lib/adwords_api/v201409/location_criterion_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/managed_customer_service.rb +50 -0
- data/lib/adwords_api/v201409/managed_customer_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/media_service.rb +42 -0
- data/lib/adwords_api/v201409/media_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/mutate_job_service.rb +42 -0
- data/lib/adwords_api/v201409/mutate_job_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/offline_conversion_feed_service.rb +34 -0
- data/lib/adwords_api/v201409/offline_conversion_feed_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/report_definition_service.rb +34 -0
- data/lib/adwords_api/v201409/report_definition_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/shared_criterion_service.rb +38 -0
- data/lib/adwords_api/v201409/shared_criterion_service_registry.rb +47 -0
- data/lib/adwords_api/v201409/shared_set_service.rb +38 -0
- data/lib/adwords_api/v201409/shared_set_service_registry.rb +47 -0
- data/lib/adwords_api/v201409/targeting_idea_service.rb +34 -0
- data/lib/adwords_api/v201409/targeting_idea_service_registry.rb +46 -0
- data/lib/adwords_api/v201409/traffic_estimator_service.rb +34 -0
- data/lib/adwords_api/v201409/traffic_estimator_service_registry.rb +46 -0
- data/lib/adwords_api/version.rb +1 -1
- data/test/templates/v201402/basic_operations_get_campaigns.def +0 -0
- data/test/templates/v201402/misc_use_oauth2_jwt.def +0 -0
- data/test/templates/v201406/basic_operations_get_campaigns.def +0 -0
- data/test/templates/v201406/misc_use_oauth2_jwt.def +0 -0
- data/test/templates/v201409/basic_operations_get_campaigns.def +114 -0
- data/test/templates/v201409/misc_use_oauth2_jwt.def +131 -0
- metadata +307 -167
@@ -0,0 +1,110 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Encoding: utf-8
|
3
|
+
#
|
4
|
+
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
+
#
|
6
|
+
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
|
+
#
|
8
|
+
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
17
|
+
# implied.
|
18
|
+
# See the License for the specific language governing permissions and
|
19
|
+
# limitations under the License.
|
20
|
+
#
|
21
|
+
# This example illustrates how to retrieve all the campaign targets. To set
|
22
|
+
# campaign targets, run add_campaign_targeting_criteria.rb.
|
23
|
+
#
|
24
|
+
# Tags: CampaignCriterionService.get
|
25
|
+
|
26
|
+
require 'adwords_api'
|
27
|
+
|
28
|
+
def get_campaign_targeting_criteria(campaign_id)
|
29
|
+
# AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
|
30
|
+
# when called without parameters.
|
31
|
+
adwords = AdwordsApi::Api.new
|
32
|
+
|
33
|
+
# To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
|
34
|
+
# the configuration file or provide your own logger:
|
35
|
+
# adwords.logger = Logger.new('adwords_xml.log')
|
36
|
+
|
37
|
+
campaign_criterion_srv =
|
38
|
+
adwords.service(:CampaignCriterionService, API_VERSION)
|
39
|
+
|
40
|
+
# Selector to get all the targeting for this campaign.
|
41
|
+
selector = {
|
42
|
+
:fields => ['Id', 'CriteriaType', 'KeywordText'],
|
43
|
+
:predicates => [
|
44
|
+
{:field => 'CampaignId', :operator => 'EQUALS', :values => [campaign_id]}
|
45
|
+
],
|
46
|
+
:paging => {
|
47
|
+
:start_index => 0,
|
48
|
+
:number_results => PAGE_SIZE
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
# Set initial values.
|
53
|
+
offset, page = 0, {}
|
54
|
+
|
55
|
+
begin
|
56
|
+
page = campaign_criterion_srv.get(selector)
|
57
|
+
if page[:entries]
|
58
|
+
page[:entries].each do |typed_criterion|
|
59
|
+
negative = typed_criterion[:xsi_type] == 'NegativeCampaignCriterion' ?
|
60
|
+
' (negative)' : ''
|
61
|
+
criterion = typed_criterion[:criterion]
|
62
|
+
puts ("Campaign criterion%s with ID %d, type '%s' and text '%s'" +
|
63
|
+
" was found.") %
|
64
|
+
[negative, criterion[:id], criterion[:type], criterion[:text]]
|
65
|
+
end
|
66
|
+
# Increment values to request the next page.
|
67
|
+
offset += PAGE_SIZE
|
68
|
+
selector[:paging][:start_index] = offset
|
69
|
+
end
|
70
|
+
end while page[:total_num_entries] > offset
|
71
|
+
|
72
|
+
if page.include?(:total_num_entries)
|
73
|
+
puts "\tCampaign ID %d has %d criteria." %
|
74
|
+
[campaign_id, page[:total_num_entries]]
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
if __FILE__ == $0
|
79
|
+
API_VERSION = :v201409
|
80
|
+
PAGE_SIZE = 500
|
81
|
+
|
82
|
+
begin
|
83
|
+
# Specify campaign ID to get targeting for.
|
84
|
+
campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
|
85
|
+
get_campaign_targeting_criteria(campaign_id)
|
86
|
+
|
87
|
+
# Authorization error.
|
88
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
89
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
90
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
91
|
+
"to retrieve and store OAuth2 tokens."
|
92
|
+
puts "See this wiki page for more details:\n\n " +
|
93
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
94
|
+
|
95
|
+
# HTTP errors.
|
96
|
+
rescue AdsCommon::Errors::HttpError => e
|
97
|
+
puts "HTTP Error: %s" % e
|
98
|
+
|
99
|
+
# API errors.
|
100
|
+
rescue AdwordsApi::Errors::ApiException => e
|
101
|
+
puts "Message: %s" % e.message
|
102
|
+
puts 'Errors:'
|
103
|
+
e.errors.each_with_index do |error, index|
|
104
|
+
puts "\tError [%d]:" % (index + 1)
|
105
|
+
error.each do |field, value|
|
106
|
+
puts "\t\t%s: %s" % [field, value]
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Encoding: utf-8
|
3
|
+
#
|
4
|
+
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
+
#
|
6
|
+
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
|
+
#
|
8
|
+
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
17
|
+
# implied.
|
18
|
+
# See the License for the specific language governing permissions and
|
19
|
+
# limitations under the License.
|
20
|
+
#
|
21
|
+
# This example illustrates how to retrieve all languages and carriers available
|
22
|
+
# for targeting.
|
23
|
+
#
|
24
|
+
# Tags: ConstantDataService.getLanguageCriterion
|
25
|
+
# Tags: ConstantDataService.getCarrierCriterion
|
26
|
+
|
27
|
+
require 'adwords_api'
|
28
|
+
|
29
|
+
def get_targetable_languages_and_carriers()
|
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
|
+
constant_data_srv = adwords.service(:ConstantDataService, API_VERSION)
|
39
|
+
|
40
|
+
# Get all languages from ConstantDataService.
|
41
|
+
languages = constant_data_srv.get_language_criterion()
|
42
|
+
|
43
|
+
if languages
|
44
|
+
languages.each do |language|
|
45
|
+
puts "Language name is '%s', ID is %d and code is '%s'." %
|
46
|
+
[language[:name], language[:id], language[:code]]
|
47
|
+
end
|
48
|
+
else
|
49
|
+
puts 'No languages were found.'
|
50
|
+
end
|
51
|
+
|
52
|
+
# Get all carriers from ConstantDataService.
|
53
|
+
carriers = constant_data_srv.get_carrier_criterion()
|
54
|
+
|
55
|
+
if carriers
|
56
|
+
carriers.each do |carrier|
|
57
|
+
puts "Carrier name is '%s', ID is %d and country code is '%s'." %
|
58
|
+
[carrier[:name], carrier[:id], carrier[:country_code]]
|
59
|
+
end
|
60
|
+
else
|
61
|
+
puts 'No carriers were retrieved.'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
if __FILE__ == $0
|
66
|
+
API_VERSION = :v201409
|
67
|
+
|
68
|
+
begin
|
69
|
+
get_targetable_languages_and_carriers()
|
70
|
+
|
71
|
+
# Authorization error.
|
72
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
73
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
74
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
75
|
+
"to retrieve and store OAuth2 tokens."
|
76
|
+
puts "See this wiki page for more details:\n\n " +
|
77
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
78
|
+
|
79
|
+
# HTTP errors.
|
80
|
+
rescue AdsCommon::Errors::HttpError => e
|
81
|
+
puts "HTTP Error: %s" % e
|
82
|
+
|
83
|
+
# API errors.
|
84
|
+
rescue AdwordsApi::Errors::ApiException => e
|
85
|
+
puts "Message: %s" % e.message
|
86
|
+
puts 'Errors:'
|
87
|
+
e.errors.each_with_index do |error, index|
|
88
|
+
puts "\tError [%d]:" % (index + 1)
|
89
|
+
error.each do |field, value|
|
90
|
+
puts "\t\t%s: %s" % [field, value]
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,112 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Encoding: utf-8
|
3
|
+
#
|
4
|
+
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
5
|
+
#
|
6
|
+
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
7
|
+
#
|
8
|
+
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
17
|
+
# implied.
|
18
|
+
# See the License for the specific language governing permissions and
|
19
|
+
# limitations under the License.
|
20
|
+
#
|
21
|
+
# This example gets location criteria by name.
|
22
|
+
#
|
23
|
+
# Tags: LocationCriterionService.get
|
24
|
+
|
25
|
+
require 'adwords_api'
|
26
|
+
|
27
|
+
def lookup_location()
|
28
|
+
# AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
|
29
|
+
# when called without parameters.
|
30
|
+
adwords = AdwordsApi::Api.new
|
31
|
+
|
32
|
+
# To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
|
33
|
+
# the configuration file or provide your own logger:
|
34
|
+
# adwords.logger = Logger.new('adwords_xml.log')
|
35
|
+
|
36
|
+
location_criterion_srv =
|
37
|
+
adwords.service(:LocationCriterionService, API_VERSION)
|
38
|
+
|
39
|
+
# List of locations to look up.
|
40
|
+
location_names = ['Paris', 'Quebec', 'Spain', 'Deutschland']
|
41
|
+
# Locale to retrieve names in.
|
42
|
+
locale = 'en'
|
43
|
+
|
44
|
+
# Get the criteria by names.
|
45
|
+
selector = {
|
46
|
+
:fields => ['Id', 'LocationName', 'CanonicalName', 'DisplayType',
|
47
|
+
'ParentLocations', 'Reach', 'TargetingStatus'],
|
48
|
+
:predicates => [
|
49
|
+
# Location names must match exactly, only EQUALS and IN are supported.
|
50
|
+
{:field => 'LocationName',
|
51
|
+
:operator => 'IN',
|
52
|
+
:values => location_names},
|
53
|
+
# Set the locale of the returned location names.
|
54
|
+
{:field => 'Locale', :operator => 'EQUALS', :values => [locale]}
|
55
|
+
]
|
56
|
+
}
|
57
|
+
criteria = location_criterion_srv.get(selector)
|
58
|
+
|
59
|
+
if criteria
|
60
|
+
criteria.each do |criterion|
|
61
|
+
# Extract all parent location names as one comma-separated string.
|
62
|
+
parent_location = if criterion[:location][:parent_locations] and
|
63
|
+
!criterion[:location][:parent_locations].empty?
|
64
|
+
locations_array = criterion[:location][:parent_locations].map do |loc|
|
65
|
+
loc[:location_name]
|
66
|
+
end
|
67
|
+
locations_array.join(', ')
|
68
|
+
else
|
69
|
+
'N/A'
|
70
|
+
end
|
71
|
+
puts ("The search term '%s' returned the location '%s' of type '%s' " +
|
72
|
+
"with ID %d, parent locations '%s' and reach %d (%s)") %
|
73
|
+
[criterion[:search_term], criterion[:location][:location_name],
|
74
|
+
criterion[:location][:criterion_type], criterion[:location][:id],
|
75
|
+
parent_location, criterion[:reach],
|
76
|
+
criterion[:location][:targeting_status]]
|
77
|
+
end
|
78
|
+
else
|
79
|
+
puts 'No criteria were returned.'
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
if __FILE__ == $0
|
84
|
+
API_VERSION = :v201409
|
85
|
+
|
86
|
+
begin
|
87
|
+
lookup_location()
|
88
|
+
|
89
|
+
# Authorization error.
|
90
|
+
rescue AdsCommon::Errors::OAuth2VerificationRequired => e
|
91
|
+
puts "Authorization credentials are not valid. Edit adwords_api.yml for " +
|
92
|
+
"OAuth2 client ID and secret and run misc/setup_oauth2.rb example " +
|
93
|
+
"to retrieve and store OAuth2 tokens."
|
94
|
+
puts "See this wiki page for more details:\n\n " +
|
95
|
+
'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2'
|
96
|
+
|
97
|
+
# HTTP errors.
|
98
|
+
rescue AdsCommon::Errors::HttpError => e
|
99
|
+
puts "HTTP Error: %s" % e
|
100
|
+
|
101
|
+
# API errors.
|
102
|
+
rescue AdwordsApi::Errors::ApiException => e
|
103
|
+
puts "Message: %s" % e.message
|
104
|
+
puts 'Errors:'
|
105
|
+
e.errors.each_with_index do |error, index|
|
106
|
+
puts "\tError [%d]:" % (index + 1)
|
107
|
+
error.each do |field, value|
|
108
|
+
puts "\t\t%s: %s" % [field, value]
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
data/lib/adwords_api.rb
CHANGED
@@ -130,6 +130,24 @@ module AdwordsApi
|
|
130
130
|
@credential_handler.validate_only = value
|
131
131
|
end
|
132
132
|
|
133
|
+
# Helper method to skip the report header when downloading reports.
|
134
|
+
#
|
135
|
+
# Args:
|
136
|
+
# - value: whether to skip the report header (boolean)
|
137
|
+
#
|
138
|
+
def skip_report_header=(value)
|
139
|
+
@config.set('library.skip_report_header', value)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Helper method to skip the report summary when downloading reports.
|
143
|
+
#
|
144
|
+
# Args:
|
145
|
+
# - value: whether to skip the report summary (boolean)
|
146
|
+
#
|
147
|
+
def skip_report_summary=(value)
|
148
|
+
@config.set('library.skip_report_summary', value)
|
149
|
+
end
|
150
|
+
|
133
151
|
# Helper method to provide a simple way of performing requests with support
|
134
152
|
# for partial failures. Executes a block of code with partial failures
|
135
153
|
# enabled and/or returns the current status of the property.
|
@@ -35,9 +35,9 @@ module AdwordsApi
|
|
35
35
|
end
|
36
36
|
|
37
37
|
# Set defaults
|
38
|
-
DEFAULT_VERSION = :
|
38
|
+
DEFAULT_VERSION = :v201409
|
39
39
|
DEFAULT_ENVIRONMENT = :PRODUCTION
|
40
|
-
LATEST_VERSION = :
|
40
|
+
LATEST_VERSION = :v201409
|
41
41
|
|
42
42
|
# Set other constants
|
43
43
|
API_NAME = 'AdwordsApi'
|
@@ -123,6 +123,45 @@ module AdwordsApi
|
|
123
123
|
:SharedSetService,
|
124
124
|
:TargetingIdeaService,
|
125
125
|
:TrafficEstimatorService
|
126
|
+
],
|
127
|
+
:v201409 => [
|
128
|
+
:AdGroupAdService,
|
129
|
+
:AdGroupBidModifierService,
|
130
|
+
:AdGroupCriterionService,
|
131
|
+
:AdGroupFeedService,
|
132
|
+
:AdGroupService,
|
133
|
+
:AdParamService,
|
134
|
+
:AdwordsUserListService,
|
135
|
+
:BiddingStrategyService,
|
136
|
+
:BudgetOrderService,
|
137
|
+
:BudgetService,
|
138
|
+
:CampaignAdExtensionService,
|
139
|
+
:CampaignCriterionService,
|
140
|
+
:CampaignFeedService,
|
141
|
+
:CampaignService,
|
142
|
+
:CampaignSharedSetService,
|
143
|
+
:ConstantDataService,
|
144
|
+
:ConversionTrackerService,
|
145
|
+
:CustomerFeedService,
|
146
|
+
:CustomerService,
|
147
|
+
:CustomerSyncService,
|
148
|
+
:DataService,
|
149
|
+
:ExperimentService,
|
150
|
+
:FeedItemService,
|
151
|
+
:FeedMappingService,
|
152
|
+
:FeedService,
|
153
|
+
:GeoLocationService,
|
154
|
+
:LabelService,
|
155
|
+
:LocationCriterionService,
|
156
|
+
:ManagedCustomerService,
|
157
|
+
:MediaService,
|
158
|
+
:MutateJobService,
|
159
|
+
:OfflineConversionFeedService,
|
160
|
+
:ReportDefinitionService,
|
161
|
+
:SharedCriterionService,
|
162
|
+
:SharedSetService,
|
163
|
+
:TargetingIdeaService,
|
164
|
+
:TrafficEstimatorService
|
126
165
|
]
|
127
166
|
}
|
128
167
|
|
@@ -132,7 +171,8 @@ module AdwordsApi
|
|
132
171
|
:oauth_scope => 'https://www.googleapis.com/auth/adwords',
|
133
172
|
:header_ns => 'https://adwords.google.com/api/adwords/cm/',
|
134
173
|
:v201402 => 'https://adwords.google.com/api/adwords/',
|
135
|
-
:v201406 => 'https://adwords.google.com/api/adwords/'
|
174
|
+
:v201406 => 'https://adwords.google.com/api/adwords/',
|
175
|
+
:v201409 => 'https://adwords.google.com/api/adwords/'
|
136
176
|
}
|
137
177
|
}
|
138
178
|
|
@@ -215,7 +255,45 @@ module AdwordsApi
|
|
215
255
|
[:v201406, :BudgetService] => 'cm/',
|
216
256
|
[:v201406, :BiddingStrategyService] => 'cm/',
|
217
257
|
[:v201406, :AdwordsUserListService] => 'rm/',
|
218
|
-
[:v201406, :LabelService] => 'cm/'
|
258
|
+
[:v201406, :LabelService] => 'cm/',
|
259
|
+
# v201409
|
260
|
+
[:v201409, :AdGroupAdService] => 'cm/',
|
261
|
+
[:v201409, :AdGroupBidModifierService] => 'cm/',
|
262
|
+
[:v201409, :AdGroupCriterionService] => 'cm/',
|
263
|
+
[:v201409, :AdGroupFeedService] => 'cm/',
|
264
|
+
[:v201409, :AdGroupService] => 'cm/',
|
265
|
+
[:v201409, :AdParamService] => 'cm/',
|
266
|
+
[:v201409, :BudgetOrderService] => 'billing/',
|
267
|
+
[:v201409, :CampaignAdExtensionService] => 'cm/',
|
268
|
+
[:v201409, :CampaignCriterionService] => 'cm/',
|
269
|
+
[:v201409, :CampaignFeedService] => 'cm/',
|
270
|
+
[:v201409, :CampaignService] => 'cm/',
|
271
|
+
[:v201409, :CampaignSharedSetService] => 'cm/',
|
272
|
+
[:v201409, :ConstantDataService] => 'cm/',
|
273
|
+
[:v201409, :ConversionTrackerService] => 'cm/',
|
274
|
+
[:v201409, :CustomerSyncService] => 'ch/',
|
275
|
+
[:v201409, :DataService] => 'cm/',
|
276
|
+
[:v201409, :ExperimentService] => 'cm/',
|
277
|
+
[:v201409, :FeedItemService] => 'cm/',
|
278
|
+
[:v201409, :FeedMappingService] => 'cm/',
|
279
|
+
[:v201409, :FeedService] => 'cm/',
|
280
|
+
[:v201409, :GeoLocationService] => 'cm/',
|
281
|
+
[:v201409, :LocationCriterionService] => 'cm/',
|
282
|
+
[:v201409, :MediaService] => 'cm/',
|
283
|
+
[:v201409, :MutateJobService] => 'cm/',
|
284
|
+
[:v201409, :OfflineConversionFeedService] => 'cm/',
|
285
|
+
[:v201409, :ReportDefinitionService] => 'cm/',
|
286
|
+
[:v201409, :SharedCriterionService] => 'cm/',
|
287
|
+
[:v201409, :SharedSetService] => 'cm/',
|
288
|
+
[:v201409, :TargetingIdeaService] => 'o/',
|
289
|
+
[:v201409, :TrafficEstimatorService] => 'o/',
|
290
|
+
[:v201409, :ManagedCustomerService] => 'mcm/',
|
291
|
+
[:v201409, :CustomerService] => 'mcm/',
|
292
|
+
[:v201409, :CustomerFeedService] => 'cm/',
|
293
|
+
[:v201409, :BudgetService] => 'cm/',
|
294
|
+
[:v201409, :BiddingStrategyService] => 'cm/',
|
295
|
+
[:v201409, :AdwordsUserListService] => 'rm/',
|
296
|
+
[:v201409, :LabelService] => 'cm/'
|
219
297
|
}
|
220
298
|
|
221
299
|
public
|