google-adwords-api 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. data/ChangeLog +3 -0
  2. data/README +33 -22
  3. data/adwords_api.yml +5 -5
  4. data/examples/v201302/adwords_for_video/add_video_call_to_action.rb +94 -0
  5. data/examples/v201302/adwords_for_video/add_video_campaign.rb +103 -0
  6. data/examples/v201302/adwords_for_video/find_videos.rb +92 -0
  7. data/examples/v201302/adwords_for_video/get_keyword_criteria.rb +101 -0
  8. data/examples/v201302/adwords_for_video/get_targeting_groups.rb +93 -0
  9. data/examples/v201302/adwords_for_video/get_video_campaign_criteria.rb +99 -0
  10. data/examples/v201302/adwords_for_video/get_video_campaign_stats.rb +126 -0
  11. data/examples/v201302/adwords_for_video/get_video_campaigns.rb +94 -0
  12. data/lib/adwords_api.rb +5 -5
  13. data/lib/adwords_api/api_config.rb +16 -2
  14. data/lib/adwords_api/v201302/video_ad_service.rb +38 -0
  15. data/lib/adwords_api/v201302/video_ad_service_registry.rb +46 -0
  16. data/lib/adwords_api/v201302/video_campaign_criterion_service.rb +38 -0
  17. data/lib/adwords_api/v201302/video_campaign_criterion_service_registry.rb +47 -0
  18. data/lib/adwords_api/v201302/video_campaign_service.rb +38 -0
  19. data/lib/adwords_api/v201302/video_campaign_service_registry.rb +46 -0
  20. data/lib/adwords_api/v201302/video_service.rb +42 -0
  21. data/lib/adwords_api/v201302/video_service_registry.rb +46 -0
  22. data/lib/adwords_api/v201302/video_targeting_group_criterion_service.rb +38 -0
  23. data/lib/adwords_api/v201302/video_targeting_group_criterion_service_registry.rb +46 -0
  24. data/lib/adwords_api/v201302/video_targeting_group_service.rb +38 -0
  25. data/lib/adwords_api/v201302/video_targeting_group_service_registry.rb +46 -0
  26. data/lib/adwords_api/version.rb +1 -1
  27. data/test/adwords_api/test_adwords_api.rb +23 -0
  28. data/test/templates/v201209/basic_operations_get_campaigns.def +1 -1
  29. data/test/templates/v201302/basic_operations_get_campaigns.def +1 -1
  30. data/test/templates/v201302/misc_use_oauth2_jwt.def +1 -1
  31. metadata +22 -2
@@ -0,0 +1,46 @@
1
+ # Encoding: utf-8
2
+ #
3
+ # This is auto-generated code, changes will be overwritten.
4
+ #
5
+ # Copyright:: Copyright 2013, Google Inc. All Rights Reserved.
6
+ # License:: Licensed under the Apache License, Version 2.0.
7
+ #
8
+ # Code generated by AdsCommon library 0.9.3 on 2013-06-25 17:37:57.
9
+
10
+ require 'adwords_api/errors'
11
+
12
+ module AdwordsApi; module V201302; module VideoTargetingGroupService
13
+ class VideoTargetingGroupServiceRegistry
14
+ VIDEOTARGETINGGROUPSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"TargetingGroupSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"TargetingGroupPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"TargetingGroupOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"TargetingGroupReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
15
+ VIDEOTARGETINGGROUPSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue", :ns=>0}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue", :ns=>0}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RegionCodeError=>{:fields=>[{:name=>:reason, :type=>"RegionCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:units, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"CollectionSizeError.Reason"=>{:fields=>[], :ns=>0}, :"DateError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :"NotEmptyError.Reason"=>{:fields=>[], :ns=>0}, :"NullError.Reason"=>{:fields=>[], :ns=>0}, :Operator=>{:fields=>[], :ns=>0}, :"OperatorError.Reason"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RangeError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"ReadOnlyError.Reason"=>{:fields=>[], :ns=>0}, :"RegionCodeError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :AccessError=>{:fields=>[{:name=>:reason, :type=>"AccessError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdsApiError=>{:fields=>[{:name=>:reason, :type=>"AdsApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignKey=>{:fields=>[{:name=>:campaign_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CountryKey=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:region_code, :type=>"RegionCode", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DateKey=>{:fields=>[{:name=>:date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:dimension, :type=>"SegmentationDimension", :min_occurs=>0, :max_occurs=>1}]}, :DayOfWeekKey=>{:fields=>[{:name=>:day_of_week, :type=>"DayOfWeek", :min_occurs=>0, :max_occurs=>1}]}, :DeviceKey=>{:fields=>[{:name=>:device_type, :type=>"DeviceKey.DeviceType", :min_occurs=>0, :max_occurs=>1}]}, :DisplayFormatKey=>{:fields=>[{:name=>:display_format, :type=>"VideoAdDisplayFormat", :min_occurs=>0, :max_occurs=>1}]}, :DisplayFormatNetworkKey=>{:fields=>[{:name=>:format, :type=>"VideoAdDisplayFormat", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"VideoAdNetwork", :min_occurs=>0, :max_occurs=>1}]}, :DisplayFormatTypeKey=>{:fields=>[{:name=>:display_format_type, :type=>"VideoAdDisplayFormat.Type", :min_occurs=>0, :max_occurs=>1}]}, :EntityNotFoundError=>{:fields=>[{:name=>:reason, :type=>"EntityNotFoundError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :HourOfDayKey=>{:fields=>[{:name=>:hour_of_day, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Integer_LongMapEntry=>{:fields=>[{:name=>:key, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :MetroKey=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:metro_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:metro_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :NetworkKey=>{:fields=>[{:name=>:network, :type=>"VideoAdNetwork", :min_occurs=>0, :max_occurs=>1}]}, :PaidViewsKey=>{:fields=>[{:name=>:paid_views, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :PersistenceError=>{:fields=>[{:name=>:reason, :type=>"PersistenceError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RegionKey=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:region_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:region_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ReportError=>{:fields=>[{:name=>:reason, :type=>"ReportError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ScopedBids=>{:fields=>[{:name=>:bids_by_scope, :type=>"TargetingScope_VideoBidMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}]}, :SegmentationError=>{:fields=>[{:name=>:reason, :type=>"SegmentationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ServingIssue=>{:fields=>[{:name=>:reason, :type=>"ServingIssue.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_ad_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:hide_action_link, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:severity, :type=>"ServingIssue.Severity", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"ServingIssue.Type", :min_occurs=>0, :max_occurs=>1}]}, :Sortable=>{:fields=>[], :choices=>[{:name=>:stats_sortable, :original_name=>"StatsSortable", :type=>"StatsSortable", :min_occurs=>1, :max_occurs=>1}, {:name=>:targeting_group_sortable, :original_name=>"TargetingGroupSortable", :type=>"TargetingGroupSortable", :min_occurs=>1, :max_occurs=>1}]}, :Sorting=>{:fields=>[{:name=>:field, :type=>"Sortable", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}, {:name=>:fields, :type=>"Sortable", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:sort_orders, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>:unbounded}]}, :SortingError=>{:fields=>[{:name=>:reason, :type=>"SortingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StatsSelector=>{:fields=>[{:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:segmentation_dimensions, :type=>"SegmentationDimension", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:metrics, :type=>"Metric", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:summary_types, :type=>"VideoEntityStats.SummaryType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:segmented_summary_type, :type=>"VideoEntityStats.SummaryType", :min_occurs=>0, :max_occurs=>1}, {:name=>:all_time_restrict, :type=>"StatsSelector.AllTimeRestrict", :min_occurs=>0, :max_occurs=>1}]}, :TargetingGroupError=>{:fields=>[{:name=>:reason, :type=>"TargetingGroupError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :TargetingGroupKey=>{:fields=>[{:name=>:targeting_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_group_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :TargetingGroupSelector=>{:fields=>[{:name=>:ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:campaign_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:statuses, :type=>"TargetingGroupStatus", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:stats_selector, :type=>"StatsSelector", :min_occurs=>0, :max_occurs=>1}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}, {:name=>:sorting, :type=>"Sorting", :min_occurs=>0, :max_occurs=>1}]}, :TimeSeriesError=>{:fields=>[{:name=>:reason, :type=>"TimeSeriesError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :VideoAdKey=>{:fields=>[{:name=>:video_ad_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_ad_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :VideoBiddingError=>{:fields=>[{:name=>:reason, :type=>"VideoBiddingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :GeoKey=>{:fields=>[], :choices=>[{:name=>:country_key, :original_name=>"CountryKey", :type=>"CountryKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:metro_key, :original_name=>"MetroKey", :type=>"MetroKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:region_key, :original_name=>"RegionKey", :type=>"RegionKey", :min_occurs=>1, :max_occurs=>1}]}, :SegmentKey=>{:fields=>[], :choices=>[{:name=>:campaign_key, :original_name=>"CampaignKey", :type=>"CampaignKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:country_key, :original_name=>"CountryKey", :type=>"CountryKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:date_key, :original_name=>"DateKey", :type=>"DateKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:day_of_week_key, :original_name=>"DayOfWeekKey", :type=>"DayOfWeekKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:device_key, :original_name=>"DeviceKey", :type=>"DeviceKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:display_format_key, :original_name=>"DisplayFormatKey", :type=>"DisplayFormatKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:display_format_network_key, :original_name=>"DisplayFormatNetworkKey", :type=>"DisplayFormatNetworkKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:display_format_type_key, :original_name=>"DisplayFormatTypeKey", :type=>"DisplayFormatTypeKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:geo_key, :original_name=>"GeoKey", :type=>"GeoKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:hour_of_day_key, :original_name=>"HourOfDayKey", :type=>"HourOfDayKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:metro_key, :original_name=>"MetroKey", :type=>"MetroKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:network_key, :original_name=>"NetworkKey", :type=>"NetworkKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:paid_views_key, :original_name=>"PaidViewsKey", :type=>"PaidViewsKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:region_key, :original_name=>"RegionKey", :type=>"RegionKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:targeting_group_key, :original_name=>"TargetingGroupKey", :type=>"TargetingGroupKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:video_ad_key, :original_name=>"VideoAdKey", :type=>"VideoAdKey", :min_occurs=>1, :max_occurs=>1}]}, :ServingInfo=>{:fields=>[{:name=>:issues, :type=>"ServingIssue", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:serving_status, :type=>"ServingStatus", :min_occurs=>0, :max_occurs=>1}]}, :VideoEntityStats=>{:fields=>[{:name=>:summary_type, :type=>"VideoEntityStats.SummaryType", :min_occurs=>0, :max_occurs=>1}, {:name=>:segment_key, :type=>"SegmentKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpv, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:impression_reach_frequencies, :type=>"Integer_LongMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:average_impression_frequency, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_view_frequency, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:unique_views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:thumbnail_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:website_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions_many_per_view, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion_many_per_view, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate_many_per_view, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_conversion_value, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv_many_per_view, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_view_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_subscribes, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_subscribe_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:vtr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_starts, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile25s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile50s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile75s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile100s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile25_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile50_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile75_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile100_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:percent_served, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:eligible_follow_on_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:engagement_score, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:retention_score, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cta_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cta_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cta_ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}]}, :TargetingGroup=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"TargetingGroupStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:scoped_bids, :type=>"ScopedBids", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"VideoEntityStats", :min_occurs=>0, :max_occurs=>1}, {:name=>:issues, :type=>"ServingInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:segmented_stats, :type=>"VideoEntityStats", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:campaign_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :TargetingGroupOperation=>{:fields=>[{:name=>:operand, :type=>"TargetingGroup", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :TargetingGroupPage=>{:fields=>[{:name=>:entries, :type=>"TargetingGroup", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:summary_stats, :type=>"VideoEntityStats", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :TargetingGroupReturnValue=>{:fields=>[{:name=>:value, :type=>"TargetingGroup", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :VideoBid=>{:fields=>[{:name=>:amount, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:source, :type=>"VideoBid.Source", :min_occurs=>0, :max_occurs=>1}]}, :TargetingScope_VideoBidMapEntry=>{:fields=>[{:name=>:key, :type=>"TargetingScope", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"VideoBid", :min_occurs=>0, :max_occurs=>1}]}, :"AccessError.Reason"=>{:fields=>[]}, :"AdsApiError.Reason"=>{:fields=>[]}, :"VideoBid.Source"=>{:fields=>[]}, :DayOfWeek=>{:fields=>[]}, :"DeviceKey.DeviceType"=>{:fields=>[]}, :"EntityNotFoundError.Reason"=>{:fields=>[]}, :Metric=>{:fields=>[]}, :"PersistenceError.Reason"=>{:fields=>[]}, :RegionCode=>{:fields=>[]}, :"ReportError.Reason"=>{:fields=>[]}, :SegmentationDimension=>{:fields=>[]}, :"SegmentationError.Reason"=>{:fields=>[]}, :"ServingIssue.Reason"=>{:fields=>[]}, :"ServingIssue.Severity"=>{:fields=>[]}, :"ServingIssue.Type"=>{:fields=>[]}, :ServingStatus=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"SortingError.Reason"=>{:fields=>[]}, :"VideoEntityStats.SummaryType"=>{:fields=>[]}, :"StatsSelector.AllTimeRestrict"=>{:fields=>[]}, :StatsSortable=>{:fields=>[]}, :"TargetingGroupError.Reason"=>{:fields=>[]}, :TargetingGroupSortable=>{:fields=>[]}, :TargetingGroupStatus=>{:fields=>[]}, :TargetingScope=>{:fields=>[]}, :"TimeSeriesError.Reason"=>{:fields=>[]}, :VideoAdDisplayFormat=>{:fields=>[]}, :"VideoAdDisplayFormat.Type"=>{:fields=>[]}, :VideoAdNetwork=>{:fields=>[]}, :"VideoBiddingError.Reason"=>{:fields=>[]}}
16
+ VIDEOTARGETINGGROUPSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201302"]
17
+
18
+ def self.get_method_signature(method_name)
19
+ return VIDEOTARGETINGGROUPSERVICE_METHODS[method_name.to_sym]
20
+ end
21
+
22
+ def self.get_type_signature(type_name)
23
+ return VIDEOTARGETINGGROUPSERVICE_TYPES[type_name.to_sym]
24
+ end
25
+
26
+ def self.get_namespace(index)
27
+ return VIDEOTARGETINGGROUPSERVICE_NAMESPACES[index]
28
+ end
29
+ end
30
+
31
+ # Base class for exceptions.
32
+ class ApplicationException < AdwordsApi::Errors::ApiException
33
+ attr_reader :message # string
34
+ attr_reader :application_exception_type # string
35
+ end
36
+
37
+ # Exception class for holding a list of service errors.
38
+ class ApiException < ApplicationException
39
+ attr_reader :errors # ApiError
40
+ def initialize(exception_fault)
41
+ @array_fields ||= []
42
+ @array_fields << 'errors'
43
+ super(exception_fault, VideoTargetingGroupServiceRegistry)
44
+ end
45
+ end
46
+ end; end; end
@@ -21,6 +21,6 @@
21
21
 
22
22
  module AdwordsApi
23
23
  module ApiConfig
24
- CLIENT_LIB_VERSION = '0.9.1'
24
+ CLIENT_LIB_VERSION = '0.9.2'
25
25
  end
26
26
  end
@@ -26,10 +26,22 @@ require 'ads_common/config'
26
26
  require 'ads_common/api_config'
27
27
  require 'adwords_api'
28
28
 
29
+
30
+ class LoggerStub
31
+ attr_reader :last_warning
32
+ def warn(message)
33
+ @last_warning = message
34
+ end
35
+ end
36
+
29
37
  class TestAdwordsApi < Test::Unit::TestCase
30
38
 
31
39
  API_VERSION = :v201302
32
40
 
41
+ def setup()
42
+ @logger = LoggerStub.new
43
+ end
44
+
33
45
  def test_initialize()
34
46
  assert_nothing_raised do
35
47
  adwords_api = AdwordsApi::Api.new({})
@@ -83,8 +95,19 @@ class TestAdwordsApi < Test::Unit::TestCase
83
95
 
84
96
  def test_prod_env()
85
97
  adwords_api = AdwordsApi::Api.new({
98
+ :library => {:logger => @logger},
86
99
  :service => {:environment => 'PRODUCTION'}
87
100
  })
88
101
  service = adwords_api.service(:ManagedCustomerService, API_VERSION)
89
102
  end
103
+
104
+ def test_clientlogin_deprecation_warning()
105
+ adwords_api = AdwordsApi::Api.new({
106
+ :library => {:logger => @logger},
107
+ :authentication => {:method => 'ClientLogin'},
108
+ :service => {:environment => 'PRODUCTION'}
109
+ })
110
+ service = adwords_api.service(:CampaignService, API_VERSION)
111
+ assert_not_nil(@logger.last_warning)
112
+ end
90
113
  end
@@ -22,7 +22,7 @@ def setup_mocks()
22
22
  {"env:Envelope"=>
23
23
  {"env:Header"=>
24
24
  {"wsdl:RequestHeader"=>
25
- {"userAgent"=>"ruby-tests (AwApi-Ruby/0.9.1, Common-Ruby/0.9.3, Savon/1.2.0, ruby/1.9.3, HTTPI/1.1.1, net_http)",
25
+ {"userAgent"=>"ruby-tests (AwApi-Ruby/0.9.2, Common-Ruby/0.9.3, Savon/1.2.0, ruby/1.9.3, HTTPI/1.1.1, net_http)",
26
26
  "developerToken"=>"dev_token123",
27
27
  "clientCustomerId"=>"123-456-7890",
28
28
  "authToken"=>"abcAuthbcd",
@@ -22,7 +22,7 @@ def setup_mocks()
22
22
  {"env:Envelope"=>
23
23
  {"env:Header"=>
24
24
  {"wsdl:RequestHeader"=>
25
- {"userAgent"=>"ruby-tests (AwApi-Ruby/0.9.1, Common-Ruby/0.9.3, Savon/1.2.0, ruby/1.9.3, HTTPI/1.1.1, net_http)",
25
+ {"userAgent"=>"ruby-tests (AwApi-Ruby/0.9.2, Common-Ruby/0.9.3, Savon/1.2.0, ruby/1.9.3, HTTPI/1.1.1, net_http)",
26
26
  "developerToken"=>"dev_token123",
27
27
  "clientCustomerId"=>"123-456-7890",
28
28
  "authToken"=>"abcAuthbcd",
@@ -40,7 +40,7 @@ def setup_mocks()
40
40
  {"env:Envelope"=>
41
41
  {"env:Header"=>
42
42
  {"wsdl:RequestHeader"=>
43
- {"userAgent"=>"ruby-tests (AwApi-Ruby/0.9.1, Common-Ruby/0.9.3, Savon/1.2.0, ruby/1.9.3, HTTPI/1.1.1, net_http)",
43
+ {"userAgent"=>"ruby-tests (AwApi-Ruby/0.9.2, Common-Ruby/0.9.3, Savon/1.2.0, ruby/1.9.3, HTTPI/1.1.1, net_http)",
44
44
  "developerToken"=>"dev_token123",
45
45
  "clientCustomerId"=>"123-456-7890",
46
46
  "xmlns"=>"https://adwords.google.com/api/adwords/cm/v201302"}},
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-adwords-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-07 00:00:00.000000000 Z
12
+ date: 2013-06-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-ads-common
@@ -41,16 +41,21 @@ files:
41
41
  - lib/adwords_api/v201302/campaign_feed_service_registry.rb
42
42
  - lib/adwords_api/v201302/mutate_job_service.rb
43
43
  - lib/adwords_api/v201302/conversion_tracker_service_registry.rb
44
+ - lib/adwords_api/v201302/video_service.rb
44
45
  - lib/adwords_api/v201302/budget_service.rb
45
46
  - lib/adwords_api/v201302/ad_extension_override_service_registry.rb
47
+ - lib/adwords_api/v201302/video_targeting_group_criterion_service.rb
48
+ - lib/adwords_api/v201302/video_ad_service.rb
46
49
  - lib/adwords_api/v201302/feed_mapping_service.rb
47
50
  - lib/adwords_api/v201302/customer_service.rb
48
51
  - lib/adwords_api/v201302/experiment_service_registry.rb
49
52
  - lib/adwords_api/v201302/alert_service_registry.rb
50
53
  - lib/adwords_api/v201302/campaign_shared_set_service.rb
54
+ - lib/adwords_api/v201302/video_campaign_criterion_service.rb
51
55
  - lib/adwords_api/v201302/campaign_criterion_service.rb
52
56
  - lib/adwords_api/v201302/budget_order_service.rb
53
57
  - lib/adwords_api/v201302/feed_service.rb
58
+ - lib/adwords_api/v201302/video_targeting_group_service_registry.rb
54
59
  - lib/adwords_api/v201302/ad_group_ad_service_registry.rb
55
60
  - lib/adwords_api/v201302/customer_sync_service_registry.rb
56
61
  - lib/adwords_api/v201302/shared_criterion_service.rb
@@ -66,17 +71,22 @@ files:
66
71
  - lib/adwords_api/v201302/geo_location_service.rb
67
72
  - lib/adwords_api/v201302/ad_group_criterion_service.rb
68
73
  - lib/adwords_api/v201302/managed_customer_service.rb
74
+ - lib/adwords_api/v201302/video_targeting_group_criterion_service_registry.rb
69
75
  - lib/adwords_api/v201302/ad_group_bid_modifier_service_registry.rb
76
+ - lib/adwords_api/v201302/video_campaign_service.rb
70
77
  - lib/adwords_api/v201302/user_list_service_registry.rb
78
+ - lib/adwords_api/v201302/video_service_registry.rb
71
79
  - lib/adwords_api/v201302/constant_data_service_registry.rb
72
80
  - lib/adwords_api/v201302/ad_group_ad_service.rb
73
81
  - lib/adwords_api/v201302/traffic_estimator_service_registry.rb
74
82
  - lib/adwords_api/v201302/shared_criterion_service_registry.rb
75
83
  - lib/adwords_api/v201302/campaign_service.rb
84
+ - lib/adwords_api/v201302/video_campaign_service_registry.rb
76
85
  - lib/adwords_api/v201302/conversion_tracker_service.rb
77
86
  - lib/adwords_api/v201302/media_service_registry.rb
78
87
  - lib/adwords_api/v201302/campaign_ad_extension_service_registry.rb
79
88
  - lib/adwords_api/v201302/campaign_service_registry.rb
89
+ - lib/adwords_api/v201302/video_campaign_criterion_service_registry.rb
80
90
  - lib/adwords_api/v201302/feed_item_service_registry.rb
81
91
  - lib/adwords_api/v201302/shared_set_service.rb
82
92
  - lib/adwords_api/v201302/user_list_service.rb
@@ -95,9 +105,11 @@ files:
95
105
  - lib/adwords_api/v201302/report_definition_service.rb
96
106
  - lib/adwords_api/v201302/ad_param_service_registry.rb
97
107
  - lib/adwords_api/v201302/budget_service_registry.rb
108
+ - lib/adwords_api/v201302/video_targeting_group_service.rb
98
109
  - lib/adwords_api/v201302/mutate_job_service_registry.rb
99
110
  - lib/adwords_api/v201302/constant_data_service.rb
100
111
  - lib/adwords_api/v201302/ad_group_criterion_service_registry.rb
112
+ - lib/adwords_api/v201302/video_ad_service_registry.rb
101
113
  - lib/adwords_api/v201302/customer_service_registry.rb
102
114
  - lib/adwords_api/v201302/campaign_ad_extension_service.rb
103
115
  - lib/adwords_api/v201302/campaign_criterion_service_registry.rb
@@ -224,6 +236,14 @@ files:
224
236
  - examples/v201302/reporting/parallel_report_download.rb
225
237
  - examples/v201302/reporting/get_report_fields.rb
226
238
  - examples/v201302/reporting/download_criteria_report_with_awql.rb
239
+ - examples/v201302/adwords_for_video/get_video_campaign_stats.rb
240
+ - examples/v201302/adwords_for_video/get_keyword_criteria.rb
241
+ - examples/v201302/adwords_for_video/find_videos.rb
242
+ - examples/v201302/adwords_for_video/add_video_campaign.rb
243
+ - examples/v201302/adwords_for_video/get_targeting_groups.rb
244
+ - examples/v201302/adwords_for_video/get_video_campaigns.rb
245
+ - examples/v201302/adwords_for_video/add_video_call_to_action.rb
246
+ - examples/v201302/adwords_for_video/get_video_campaign_criteria.rb
227
247
  - examples/v201302/error_handling/handle_policy_violation_error.rb
228
248
  - examples/v201302/error_handling/handle_two_factor_authorization_error.rb
229
249
  - examples/v201302/error_handling/handle_captcha_challenge.rb