google-adwords-api 0.4.5 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (519) hide show
  1. data/ChangeLog +4 -0
  2. data/README +3 -3
  3. data/Rakefile +3 -3
  4. data/examples/v201109/{create_account.rb → account_management/create_account.rb} +2 -1
  5. data/examples/v201109/{get_campaign_alerts.rb → account_management/get_account_alerts.rb} +38 -21
  6. data/examples/v201109/{get_all_account_changes.rb → account_management/get_account_changes.rb} +40 -39
  7. data/examples/v201109/{get_account_hierarchy.rb → account_management/get_account_hierarchy.rb} +2 -1
  8. data/examples/v201109/{get_client_customer_id.rb → account_management/get_client_customer_id.rb} +2 -1
  9. data/examples/v201109/{get_unit_count.rb → account_management/get_client_unit_usage.rb} +15 -7
  10. data/examples/v201109/{add_ad_group.rb → basic_operations/add_ad_group.rb} +2 -1
  11. data/examples/v201109/{add_campaign.rb → basic_operations/add_campaign.rb} +2 -1
  12. data/examples/v201109/{add_ad_group_criteria.rb → basic_operations/add_keywords.rb} +32 -37
  13. data/examples/{v200909/update_ad.rb → v201109/basic_operations/add_text_ads.rb} +41 -25
  14. data/examples/v201109/{delete_ad.rb → basic_operations/delete_ad.rb} +5 -4
  15. data/examples/v201109/{delete_ad_group.rb → basic_operations/delete_ad_group.rb} +34 -8
  16. data/examples/v201109/{delete_campaign.rb → basic_operations/delete_campaign.rb} +32 -6
  17. data/examples/v201109/{delete_ad_group_criterion.rb → basic_operations/delete_keyword.rb} +15 -10
  18. data/examples/v201109/{get_all_ad_groups.rb → basic_operations/get_ad_groups.rb} +32 -18
  19. data/examples/v201109/{get_all_campaigns.rb → basic_operations/get_campaigns.rb} +31 -14
  20. data/examples/v201109/{get_all_active_ad_group_criteria.rb → basic_operations/get_keywords.rb} +41 -34
  21. data/examples/v201109/{get_all_ads.rb → basic_operations/get_text_ads.rb} +39 -22
  22. data/examples/v201109/{update_ad.rb → basic_operations/pause_ad.rb} +9 -10
  23. data/examples/v201109/{update_ad_group.rb → basic_operations/update_ad_group.rb} +2 -1
  24. data/examples/v201109/{update_campaign.rb → basic_operations/update_campaign.rb} +2 -1
  25. data/examples/v201109/{update_ad_group_criterion.rb → basic_operations/update_keyword.rb} +10 -9
  26. data/examples/v201109/{add_experiment.rb → campaign_management/add_experiment.rb} +4 -3
  27. data/examples/v201109/{perform_mutate_job.rb → campaign_management/add_keywords_in_bulk.rb} +17 -43
  28. data/examples/v201109/{add_campaign_ad_extension.rb → campaign_management/add_location_extension.rb} +28 -37
  29. data/examples/v201109/{add_ad_extension_override.rb → campaign_management/add_location_extension_override.rb} +12 -10
  30. data/examples/v201109/{get_all_disapproved_ads.rb → campaign_management/get_all_disapproved_ads.rb} +3 -2
  31. data/examples/v201109/{promote_experiment.rb → campaign_management/promote_experiment.rb} +4 -4
  32. data/examples/v201109/{set_ad_params.rb → campaign_management/set_ad_parameters.rb} +7 -7
  33. data/examples/{v201003/delete_ad.rb → v201109/campaign_management/validate_text_ad.rb} +40 -16
  34. data/examples/v201109/{handle_partial_failures.rb → error_handling/handle_partial_failures.rb} +2 -1
  35. data/examples/v201109/{handle_policy_violation_error.rb → error_handling/handle_policy_violation_error.rb} +2 -1
  36. data/examples/v201109/{handle_second_factor.rb → error_handling/handle_two_factor_authorization_error.rb} +5 -4
  37. data/examples/v201109/{get_all_images.rb → misc/get_all_images_and_videos.rb} +40 -20
  38. data/examples/v201109/{upload_image.rb → misc/upload_image.rb} +2 -1
  39. data/examples/v201109/{oauth_handling.rb → misc/use_oauth.rb} +10 -7
  40. data/examples/v201109/{get_traffic_estimates.rb → optimization/estimate_keyword_traffic.rb} +4 -3
  41. data/examples/v201109/{get_criterion_bid_landscape.rb → optimization/get_keyword_bid_simulations.rb} +21 -20
  42. data/examples/v201109/{get_related_keywords.rb → optimization/get_keyword_ideas.rb} +6 -5
  43. data/examples/v201109/{get_keyword_opportunities.rb → optimization/get_keyword_opportunities.rb} +2 -1
  44. data/examples/v201109/{get_related_placements.rb → optimization/get_placement_ideas.rb} +5 -4
  45. data/examples/v201109/{add_user_list.rb → remarketing/add_audience.rb} +6 -5
  46. data/examples/v201109/{add_conversion.rb → remarketing/add_conversion_tracker.rb} +8 -7
  47. data/examples/v201109/{download_adhoc_report.rb → reporting/download_criteria_report.rb} +19 -17
  48. data/examples/v201109/{download_report.rb → reporting/download_defined_report.rb} +7 -5
  49. data/examples/v201109/{get_all_report_definitions.rb → reporting/get_defined_reports.rb} +7 -6
  50. data/examples/v201109/{get_report_fields.rb → reporting/get_report_fields.rb} +2 -1
  51. data/examples/v201109/{parallel_report_download.rb → reporting/parallel_report_download.rb} +2 -1
  52. data/examples/v201109/{add_campaign_targeting_criteria.rb → targeting/add_campaign_targeting_criteria.rb} +22 -4
  53. data/examples/v201109/{add_negative_campaign_criterion.rb → targeting/get_campaign_targeting_criteria.rb} +43 -26
  54. data/examples/v201109/{get_all_carriers.rb → targeting/get_targetable_languages_and_carriers.rb} +19 -4
  55. data/examples/v201109/{get_location_criteria.rb → targeting/lookup_location.rb} +4 -3
  56. data/lib/adwords_api.rb +2 -2
  57. data/lib/adwords_api/api_config.rb +3 -130
  58. data/lib/adwords_api/client_login_header_handler.rb +1 -1
  59. data/lib/adwords_api/credential_handler.rb +2 -2
  60. data/lib/adwords_api/errors.rb +2 -2
  61. data/lib/adwords_api/extensions.rb +3 -2
  62. data/lib/adwords_api/report_utils.rb +1 -1
  63. data/lib/adwords_api/utils.rb +2 -2
  64. data/lib/adwords_api/v13_login_handler.rb +1 -1
  65. data/lib/adwords_api/v201109/ad_extension_override_service.rb +10 -8
  66. data/lib/adwords_api/v201109/ad_extension_override_service_registry.rb +8 -6
  67. data/lib/adwords_api/v201109/ad_group_ad_service.rb +10 -8
  68. data/lib/adwords_api/v201109/ad_group_ad_service_registry.rb +8 -6
  69. data/lib/adwords_api/v201109/ad_group_criterion_service.rb +10 -8
  70. data/lib/adwords_api/v201109/ad_group_criterion_service_registry.rb +8 -6
  71. data/lib/adwords_api/v201109/ad_group_service.rb +10 -8
  72. data/lib/adwords_api/v201109/ad_group_service_registry.rb +8 -6
  73. data/lib/adwords_api/v201109/ad_param_service.rb +10 -8
  74. data/lib/adwords_api/v201109/ad_param_service_registry.rb +8 -6
  75. data/lib/adwords_api/v201109/alert_service.rb +6 -4
  76. data/lib/adwords_api/v201109/alert_service_registry.rb +8 -6
  77. data/lib/adwords_api/v201109/bulk_mutate_job_service.rb +10 -8
  78. data/lib/adwords_api/v201109/bulk_mutate_job_service_registry.rb +8 -6
  79. data/lib/adwords_api/v201109/bulk_opportunity_service.rb +6 -4
  80. data/lib/adwords_api/v201109/bulk_opportunity_service_registry.rb +8 -6
  81. data/lib/adwords_api/v201109/campaign_ad_extension_service.rb +10 -8
  82. data/lib/adwords_api/v201109/campaign_ad_extension_service_registry.rb +8 -6
  83. data/lib/adwords_api/v201109/campaign_criterion_service.rb +10 -8
  84. data/lib/adwords_api/v201109/campaign_criterion_service_registry.rb +8 -6
  85. data/lib/adwords_api/v201109/campaign_service.rb +10 -8
  86. data/lib/adwords_api/v201109/campaign_service_registry.rb +8 -6
  87. data/lib/adwords_api/v201109/campaign_target_service.rb +10 -8
  88. data/lib/adwords_api/v201109/campaign_target_service_registry.rb +8 -6
  89. data/lib/adwords_api/v201109/constant_data_service.rb +6 -4
  90. data/lib/adwords_api/v201109/constant_data_service_registry.rb +8 -6
  91. data/lib/adwords_api/v201109/conversion_tracker_service.rb +10 -8
  92. data/lib/adwords_api/v201109/conversion_tracker_service_registry.rb +8 -6
  93. data/lib/adwords_api/v201109/create_account_service.rb +6 -4
  94. data/lib/adwords_api/v201109/create_account_service_registry.rb +8 -6
  95. data/lib/adwords_api/v201109/customer_sync_service.rb +6 -4
  96. data/lib/adwords_api/v201109/customer_sync_service_registry.rb +8 -6
  97. data/lib/adwords_api/v201109/data_service.rb +10 -8
  98. data/lib/adwords_api/v201109/data_service_registry.rb +8 -6
  99. data/lib/adwords_api/v201109/experiment_service.rb +10 -8
  100. data/lib/adwords_api/v201109/experiment_service_registry.rb +8 -6
  101. data/lib/adwords_api/v201109/geo_location_service.rb +6 -4
  102. data/lib/adwords_api/v201109/geo_location_service_registry.rb +8 -6
  103. data/lib/adwords_api/v201109/info_service.rb +6 -4
  104. data/lib/adwords_api/v201109/info_service_registry.rb +8 -6
  105. data/lib/adwords_api/v201109/location_criterion_service.rb +6 -4
  106. data/lib/adwords_api/v201109/location_criterion_service_registry.rb +8 -6
  107. data/lib/adwords_api/v201109/media_service.rb +10 -8
  108. data/lib/adwords_api/v201109/media_service_registry.rb +8 -6
  109. data/lib/adwords_api/v201109/mutate_job_service.rb +10 -8
  110. data/lib/adwords_api/v201109/mutate_job_service_registry.rb +8 -6
  111. data/lib/adwords_api/v201109/report_definition_service.rb +10 -8
  112. data/lib/adwords_api/v201109/report_definition_service_registry.rb +8 -6
  113. data/lib/adwords_api/v201109/serviced_account_service.rb +6 -4
  114. data/lib/adwords_api/v201109/serviced_account_service_registry.rb +8 -6
  115. data/lib/adwords_api/v201109/targeting_idea_service.rb +10 -8
  116. data/lib/adwords_api/v201109/targeting_idea_service_registry.rb +8 -6
  117. data/lib/adwords_api/v201109/traffic_estimator_service.rb +6 -4
  118. data/lib/adwords_api/v201109/traffic_estimator_service_registry.rb +8 -6
  119. data/lib/adwords_api/v201109/user_list_service.rb +10 -8
  120. data/lib/adwords_api/v201109/user_list_service_registry.rb +8 -6
  121. data/test/adwords_api/test_api_config.rb +2 -7
  122. data/test/adwords_api/test_report_utils.rb +2 -1
  123. data/test/adwords_api/test_utils.rb +1 -0
  124. data/test/bugs/test_issue_00000031.rb +2 -1
  125. metadata +116 -481
  126. data/examples/v200909/add_ad_extension_override.rb +0 -82
  127. data/examples/v200909/add_ad_group.rb +0 -89
  128. data/examples/v200909/add_ad_group_criteria.rb +0 -108
  129. data/examples/v200909/add_ads.rb +0 -121
  130. data/examples/v200909/add_campaign.rb +0 -92
  131. data/examples/v200909/add_campaign_ad_extension.rb +0 -121
  132. data/examples/v200909/add_negative_campaign_criterion.rb +0 -87
  133. data/examples/v200909/check_campaigns.rb +0 -123
  134. data/examples/v200909/delete_ad.rb +0 -85
  135. data/examples/v200909/delete_ad_group.rb +0 -77
  136. data/examples/v200909/delete_ad_group_criterion.rb +0 -86
  137. data/examples/v200909/delete_campaign.rb +0 -78
  138. data/examples/v200909/get_all_active_ad_group_criteria.rb +0 -84
  139. data/examples/v200909/get_all_ad_extension_overrides.rb +0 -82
  140. data/examples/v200909/get_all_ad_group_criteria.rb +0 -82
  141. data/examples/v200909/get_all_ad_groups.rb +0 -79
  142. data/examples/v200909/get_all_ad_params.rb +0 -80
  143. data/examples/v200909/get_all_ads.rb +0 -79
  144. data/examples/v200909/get_all_campaign_ad_extensions.rb +0 -81
  145. data/examples/v200909/get_all_campaign_targets.rb +0 -74
  146. data/examples/v200909/get_all_campaigns.rb +0 -74
  147. data/examples/v200909/get_all_disapproved_ads.rb +0 -85
  148. data/examples/v200909/get_all_paused_campaigns.rb +0 -77
  149. data/examples/v200909/get_conversion_optimizer_eligibility.rb +0 -103
  150. data/examples/v200909/get_geo_location_info.rb +0 -99
  151. data/examples/v200909/get_method_cost.rb +0 -87
  152. data/examples/v200909/get_operation_count.rb +0 -79
  153. data/examples/v200909/get_related_keywords.rb +0 -108
  154. data/examples/v200909/get_related_placements.rb +0 -107
  155. data/examples/v200909/get_total_usage_units_per_month.rb +0 -74
  156. data/examples/v200909/get_unit_count.rb +0 -79
  157. data/examples/v200909/perform_bulk_mutate_job.rb +0 -212
  158. data/examples/v200909/set_ad_params.rb +0 -115
  159. data/examples/v200909/set_campaign_targets.rb +0 -116
  160. data/examples/v200909/update_ad_group.rb +0 -81
  161. data/examples/v200909/update_ad_group_criterion.rb +0 -99
  162. data/examples/v200909/update_campaign.rb +0 -84
  163. data/examples/v201003/add_ad_extension_override.rb +0 -82
  164. data/examples/v201003/add_ad_group.rb +0 -89
  165. data/examples/v201003/add_ad_group_criteria.rb +0 -108
  166. data/examples/v201003/add_ads.rb +0 -174
  167. data/examples/v201003/add_campaign.rb +0 -92
  168. data/examples/v201003/add_campaign_ad_extension.rb +0 -121
  169. data/examples/v201003/add_keywords_performance_report_definition.rb +0 -99
  170. data/examples/v201003/add_negative_campaign_criterion.rb +0 -87
  171. data/examples/v201003/check_campaigns.rb +0 -123
  172. data/examples/v201003/delete_ad_group.rb +0 -77
  173. data/examples/v201003/delete_ad_group_criterion.rb +0 -86
  174. data/examples/v201003/delete_campaign.rb +0 -78
  175. data/examples/v201003/download_report.rb +0 -67
  176. data/examples/v201003/get_all_active_ad_group_criteria.rb +0 -84
  177. data/examples/v201003/get_all_ad_extension_overrides.rb +0 -82
  178. data/examples/v201003/get_all_ad_group_criteria.rb +0 -82
  179. data/examples/v201003/get_all_ad_groups.rb +0 -79
  180. data/examples/v201003/get_all_ad_params.rb +0 -80
  181. data/examples/v201003/get_all_ads.rb +0 -82
  182. data/examples/v201003/get_all_campaign_ad_extensions.rb +0 -81
  183. data/examples/v201003/get_all_campaign_targets.rb +0 -74
  184. data/examples/v201003/get_all_campaigns.rb +0 -74
  185. data/examples/v201003/get_all_disapproved_ads.rb +0 -85
  186. data/examples/v201003/get_all_images.rb +0 -80
  187. data/examples/v201003/get_all_paused_campaigns.rb +0 -77
  188. data/examples/v201003/get_all_report_definitions.rb +0 -75
  189. data/examples/v201003/get_all_videos.rb +0 -76
  190. data/examples/v201003/get_conversion_optimizer_eligibility.rb +0 -103
  191. data/examples/v201003/get_criterion_bid_landscape.rb +0 -96
  192. data/examples/v201003/get_geo_location_info.rb +0 -99
  193. data/examples/v201003/get_method_cost.rb +0 -87
  194. data/examples/v201003/get_operation_count.rb +0 -79
  195. data/examples/v201003/get_related_keywords.rb +0 -108
  196. data/examples/v201003/get_related_placements.rb +0 -107
  197. data/examples/v201003/get_report_fields.rb +0 -72
  198. data/examples/v201003/get_total_usage_units_per_month.rb +0 -74
  199. data/examples/v201003/get_unit_count.rb +0 -79
  200. data/examples/v201003/perform_bulk_mutate_job.rb +0 -212
  201. data/examples/v201003/set_ad_params.rb +0 -115
  202. data/examples/v201003/set_campaign_targets.rb +0 -116
  203. data/examples/v201003/update_ad.rb +0 -86
  204. data/examples/v201003/update_ad_group.rb +0 -81
  205. data/examples/v201003/update_ad_group_criterion.rb +0 -99
  206. data/examples/v201003/update_campaign.rb +0 -83
  207. data/examples/v201003/upload_image.rb +0 -90
  208. data/examples/v201008/add_ad_extension_override.rb +0 -82
  209. data/examples/v201008/add_ad_group.rb +0 -89
  210. data/examples/v201008/add_ad_group_criteria.rb +0 -108
  211. data/examples/v201008/add_ads.rb +0 -174
  212. data/examples/v201008/add_campaign.rb +0 -92
  213. data/examples/v201008/add_campaign_ad_extension.rb +0 -121
  214. data/examples/v201008/add_experiment.rb +0 -153
  215. data/examples/v201008/add_keywords_performance_report_definition.rb +0 -99
  216. data/examples/v201008/add_negative_campaign_criterion.rb +0 -87
  217. data/examples/v201008/add_user_list.rb +0 -87
  218. data/examples/v201008/check_campaigns.rb +0 -123
  219. data/examples/v201008/delete_ad.rb +0 -85
  220. data/examples/v201008/delete_ad_group.rb +0 -77
  221. data/examples/v201008/delete_ad_group_criterion.rb +0 -86
  222. data/examples/v201008/delete_bulk_mutate_job.rb +0 -87
  223. data/examples/v201008/delete_campaign.rb +0 -78
  224. data/examples/v201008/delete_experiment.rb +0 -78
  225. data/examples/v201008/delete_user_list.rb +0 -78
  226. data/examples/v201008/download_report.rb +0 -67
  227. data/examples/v201008/get_account_hierarchy.rb +0 -101
  228. data/examples/v201008/get_all_account_changes.rb +0 -135
  229. data/examples/v201008/get_all_active_ad_group_criteria.rb +0 -84
  230. data/examples/v201008/get_all_ad_extension_overrides.rb +0 -82
  231. data/examples/v201008/get_all_ad_group_criteria.rb +0 -82
  232. data/examples/v201008/get_all_ad_groups.rb +0 -79
  233. data/examples/v201008/get_all_ad_params.rb +0 -80
  234. data/examples/v201008/get_all_ads.rb +0 -82
  235. data/examples/v201008/get_all_campaign_ad_extensions.rb +0 -81
  236. data/examples/v201008/get_all_campaign_targets.rb +0 -74
  237. data/examples/v201008/get_all_campaigns.rb +0 -74
  238. data/examples/v201008/get_all_disapproved_ads.rb +0 -85
  239. data/examples/v201008/get_all_experiments.rb +0 -84
  240. data/examples/v201008/get_all_images.rb +0 -80
  241. data/examples/v201008/get_all_paused_campaigns.rb +0 -77
  242. data/examples/v201008/get_all_report_definitions.rb +0 -75
  243. data/examples/v201008/get_all_user_lists.rb +0 -75
  244. data/examples/v201008/get_all_videos.rb +0 -76
  245. data/examples/v201008/get_bulk_mutate_job.rb +0 -97
  246. data/examples/v201008/get_campaign_alerts.rb +0 -95
  247. data/examples/v201008/get_conversion_optimizer_eligibility.rb +0 -88
  248. data/examples/v201008/get_criterion_bid_landscape.rb +0 -96
  249. data/examples/v201008/get_geo_location_info.rb +0 -99
  250. data/examples/v201008/get_method_cost.rb +0 -87
  251. data/examples/v201008/get_operation_count.rb +0 -79
  252. data/examples/v201008/get_related_keywords.rb +0 -108
  253. data/examples/v201008/get_related_placements.rb +0 -107
  254. data/examples/v201008/get_report_fields.rb +0 -72
  255. data/examples/v201008/get_total_usage_units_per_month.rb +0 -74
  256. data/examples/v201008/get_traffic_estimates.rb +0 -147
  257. data/examples/v201008/get_unit_count.rb +0 -79
  258. data/examples/v201008/handle_partial_failures.rb +0 -127
  259. data/examples/v201008/handle_policy_violation_error.rb +0 -138
  260. data/examples/v201008/perform_bulk_mutate_job.rb +0 -212
  261. data/examples/v201008/promote_experiment.rb +0 -79
  262. data/examples/v201008/set_ad_params.rb +0 -115
  263. data/examples/v201008/set_campaign_targets.rb +0 -116
  264. data/examples/v201008/update_ad.rb +0 -86
  265. data/examples/v201008/update_ad_group.rb +0 -81
  266. data/examples/v201008/update_ad_group_criterion.rb +0 -99
  267. data/examples/v201008/update_campaign.rb +0 -84
  268. data/examples/v201008/update_user_list.rb +0 -82
  269. data/examples/v201008/upload_image.rb +0 -90
  270. data/examples/v201101/add_ad_extension_override.rb +0 -82
  271. data/examples/v201101/add_ad_group.rb +0 -89
  272. data/examples/v201101/add_ad_group_criteria.rb +0 -108
  273. data/examples/v201101/add_ads.rb +0 -174
  274. data/examples/v201101/add_campaign.rb +0 -99
  275. data/examples/v201101/add_campaign_ad_extension.rb +0 -121
  276. data/examples/v201101/add_conversion.rb +0 -88
  277. data/examples/v201101/add_experiment.rb +0 -153
  278. data/examples/v201101/add_keywords_performance_report_definition.rb +0 -99
  279. data/examples/v201101/add_negative_campaign_criterion.rb +0 -87
  280. data/examples/v201101/add_user_list.rb +0 -113
  281. data/examples/v201101/check_campaigns.rb +0 -123
  282. data/examples/v201101/delete_ad.rb +0 -85
  283. data/examples/v201101/delete_ad_group.rb +0 -77
  284. data/examples/v201101/delete_ad_group_criterion.rb +0 -86
  285. data/examples/v201101/delete_bulk_mutate_job.rb +0 -87
  286. data/examples/v201101/delete_campaign.rb +0 -78
  287. data/examples/v201101/delete_experiment.rb +0 -78
  288. data/examples/v201101/delete_user_list.rb +0 -78
  289. data/examples/v201101/download_report.rb +0 -67
  290. data/examples/v201101/get_account_hierarchy.rb +0 -102
  291. data/examples/v201101/get_ad_group_bid_landscape.rb +0 -94
  292. data/examples/v201101/get_all_account_changes.rb +0 -137
  293. data/examples/v201101/get_all_active_ad_group_criteria.rb +0 -97
  294. data/examples/v201101/get_all_ad_extension_overrides.rb +0 -82
  295. data/examples/v201101/get_all_ad_group_criteria.rb +0 -88
  296. data/examples/v201101/get_all_ad_groups.rb +0 -85
  297. data/examples/v201101/get_all_ad_params.rb +0 -80
  298. data/examples/v201101/get_all_ads.rb +0 -90
  299. data/examples/v201101/get_all_campaign_ad_extensions.rb +0 -87
  300. data/examples/v201101/get_all_campaign_targets.rb +0 -74
  301. data/examples/v201101/get_all_campaigns.rb +0 -77
  302. data/examples/v201101/get_all_conversions.rb +0 -79
  303. data/examples/v201101/get_all_disapproved_ads.rb +0 -93
  304. data/examples/v201101/get_all_experiments.rb +0 -89
  305. data/examples/v201101/get_all_images.rb +0 -82
  306. data/examples/v201101/get_all_paused_campaigns.rb +0 -83
  307. data/examples/v201101/get_all_report_definitions.rb +0 -75
  308. data/examples/v201101/get_all_user_lists.rb +0 -78
  309. data/examples/v201101/get_all_videos.rb +0 -78
  310. data/examples/v201101/get_bulk_mutate_job.rb +0 -97
  311. data/examples/v201101/get_campaign_alerts.rb +0 -95
  312. data/examples/v201101/get_conversion_optimizer_eligibility.rb +0 -93
  313. data/examples/v201101/get_criterion_bid_landscape.rb +0 -93
  314. data/examples/v201101/get_geo_location_info.rb +0 -99
  315. data/examples/v201101/get_keyword_opportunities.rb +0 -95
  316. data/examples/v201101/get_method_cost.rb +0 -87
  317. data/examples/v201101/get_operation_count.rb +0 -79
  318. data/examples/v201101/get_related_keywords.rb +0 -108
  319. data/examples/v201101/get_related_placements.rb +0 -107
  320. data/examples/v201101/get_report_fields.rb +0 -72
  321. data/examples/v201101/get_total_usage_units_per_month.rb +0 -74
  322. data/examples/v201101/get_traffic_estimates.rb +0 -148
  323. data/examples/v201101/get_unit_count.rb +0 -79
  324. data/examples/v201101/handle_partial_failures.rb +0 -127
  325. data/examples/v201101/handle_policy_violation_error.rb +0 -138
  326. data/examples/v201101/handle_second_factor.rb +0 -87
  327. data/examples/v201101/oauth_handling.rb +0 -95
  328. data/examples/v201101/perform_bulk_mutate_job.rb +0 -212
  329. data/examples/v201101/promote_experiment.rb +0 -79
  330. data/examples/v201101/set_ad_params.rb +0 -115
  331. data/examples/v201101/set_campaign_targets.rb +0 -102
  332. data/examples/v201101/update_ad.rb +0 -86
  333. data/examples/v201101/update_ad_group.rb +0 -81
  334. data/examples/v201101/update_ad_group_criterion.rb +0 -99
  335. data/examples/v201101/update_campaign.rb +0 -84
  336. data/examples/v201101/update_conversion.rb +0 -87
  337. data/examples/v201101/update_user_list.rb +0 -82
  338. data/examples/v201101/upload_image.rb +0 -90
  339. data/examples/v201109/add_ads.rb +0 -174
  340. data/examples/v201109/check_campaigns.rb +0 -123
  341. data/examples/v201109/delete_bulk_mutate_job.rb +0 -87
  342. data/examples/v201109/delete_experiment.rb +0 -78
  343. data/examples/v201109/delete_user_list.rb +0 -78
  344. data/examples/v201109/get_ad_group_bid_landscape.rb +0 -94
  345. data/examples/v201109/get_all_ad_extension_overrides.rb +0 -82
  346. data/examples/v201109/get_all_ad_group_criteria.rb +0 -90
  347. data/examples/v201109/get_all_ad_params.rb +0 -86
  348. data/examples/v201109/get_all_campaign_ad_extensions.rb +0 -87
  349. data/examples/v201109/get_all_campaign_targets.rb +0 -74
  350. data/examples/v201109/get_all_conversions.rb +0 -79
  351. data/examples/v201109/get_all_experiments.rb +0 -89
  352. data/examples/v201109/get_all_languages.rb +0 -73
  353. data/examples/v201109/get_all_paused_campaigns.rb +0 -83
  354. data/examples/v201109/get_all_user_lists.rb +0 -78
  355. data/examples/v201109/get_all_videos.rb +0 -78
  356. data/examples/v201109/get_bulk_mutate_job.rb +0 -97
  357. data/examples/v201109/get_conversion_optimizer_eligibility.rb +0 -93
  358. data/examples/v201109/get_geo_location_info.rb +0 -99
  359. data/examples/v201109/get_method_cost.rb +0 -87
  360. data/examples/v201109/get_operation_count.rb +0 -79
  361. data/examples/v201109/get_total_usage_units_per_month.rb +0 -74
  362. data/examples/v201109/oauth_report_download.rb +0 -97
  363. data/examples/v201109/perform_bulk_mutate_job.rb +0 -212
  364. data/examples/v201109/update_conversion.rb +0 -87
  365. data/examples/v201109/update_user_list.rb +0 -82
  366. data/lib/adwords_api/v13/account_service.rb +0 -48
  367. data/lib/adwords_api/v13/account_service_registry.rb +0 -41
  368. data/lib/adwords_api/v13/report_service.rb +0 -65
  369. data/lib/adwords_api/v13/report_service_registry.rb +0 -41
  370. data/lib/adwords_api/v200909/ad_extension_override_service.rb +0 -36
  371. data/lib/adwords_api/v200909/ad_extension_override_service_registry.rb +0 -44
  372. data/lib/adwords_api/v200909/ad_group_ad_service.rb +0 -36
  373. data/lib/adwords_api/v200909/ad_group_ad_service_registry.rb +0 -44
  374. data/lib/adwords_api/v200909/ad_group_criterion_service.rb +0 -36
  375. data/lib/adwords_api/v200909/ad_group_criterion_service_registry.rb +0 -44
  376. data/lib/adwords_api/v200909/ad_group_service.rb +0 -36
  377. data/lib/adwords_api/v200909/ad_group_service_registry.rb +0 -44
  378. data/lib/adwords_api/v200909/ad_param_service.rb +0 -36
  379. data/lib/adwords_api/v200909/ad_param_service_registry.rb +0 -44
  380. data/lib/adwords_api/v200909/bulk_mutate_job_service.rb +0 -36
  381. data/lib/adwords_api/v200909/bulk_mutate_job_service_registry.rb +0 -44
  382. data/lib/adwords_api/v200909/campaign_ad_extension_service.rb +0 -36
  383. data/lib/adwords_api/v200909/campaign_ad_extension_service_registry.rb +0 -44
  384. data/lib/adwords_api/v200909/campaign_criterion_service.rb +0 -36
  385. data/lib/adwords_api/v200909/campaign_criterion_service_registry.rb +0 -44
  386. data/lib/adwords_api/v200909/campaign_service.rb +0 -36
  387. data/lib/adwords_api/v200909/campaign_service_registry.rb +0 -44
  388. data/lib/adwords_api/v200909/campaign_target_service.rb +0 -36
  389. data/lib/adwords_api/v200909/campaign_target_service_registry.rb +0 -44
  390. data/lib/adwords_api/v200909/geo_location_service.rb +0 -32
  391. data/lib/adwords_api/v200909/geo_location_service_registry.rb +0 -44
  392. data/lib/adwords_api/v200909/info_service.rb +0 -32
  393. data/lib/adwords_api/v200909/info_service_registry.rb +0 -44
  394. data/lib/adwords_api/v200909/targeting_idea_service.rb +0 -36
  395. data/lib/adwords_api/v200909/targeting_idea_service_registry.rb +0 -44
  396. data/lib/adwords_api/v201003/ad_extension_override_service.rb +0 -36
  397. data/lib/adwords_api/v201003/ad_extension_override_service_registry.rb +0 -44
  398. data/lib/adwords_api/v201003/ad_group_ad_service.rb +0 -36
  399. data/lib/adwords_api/v201003/ad_group_ad_service_registry.rb +0 -44
  400. data/lib/adwords_api/v201003/ad_group_criterion_service.rb +0 -36
  401. data/lib/adwords_api/v201003/ad_group_criterion_service_registry.rb +0 -44
  402. data/lib/adwords_api/v201003/ad_group_service.rb +0 -36
  403. data/lib/adwords_api/v201003/ad_group_service_registry.rb +0 -44
  404. data/lib/adwords_api/v201003/ad_param_service.rb +0 -36
  405. data/lib/adwords_api/v201003/ad_param_service_registry.rb +0 -44
  406. data/lib/adwords_api/v201003/bid_landscape_service.rb +0 -32
  407. data/lib/adwords_api/v201003/bid_landscape_service_registry.rb +0 -44
  408. data/lib/adwords_api/v201003/bulk_mutate_job_service.rb +0 -36
  409. data/lib/adwords_api/v201003/bulk_mutate_job_service_registry.rb +0 -44
  410. data/lib/adwords_api/v201003/campaign_ad_extension_service.rb +0 -36
  411. data/lib/adwords_api/v201003/campaign_ad_extension_service_registry.rb +0 -44
  412. data/lib/adwords_api/v201003/campaign_criterion_service.rb +0 -36
  413. data/lib/adwords_api/v201003/campaign_criterion_service_registry.rb +0 -44
  414. data/lib/adwords_api/v201003/campaign_service.rb +0 -36
  415. data/lib/adwords_api/v201003/campaign_service_registry.rb +0 -44
  416. data/lib/adwords_api/v201003/campaign_target_service.rb +0 -36
  417. data/lib/adwords_api/v201003/campaign_target_service_registry.rb +0 -44
  418. data/lib/adwords_api/v201003/geo_location_service.rb +0 -32
  419. data/lib/adwords_api/v201003/geo_location_service_registry.rb +0 -44
  420. data/lib/adwords_api/v201003/info_service.rb +0 -32
  421. data/lib/adwords_api/v201003/info_service_registry.rb +0 -44
  422. data/lib/adwords_api/v201003/media_service.rb +0 -36
  423. data/lib/adwords_api/v201003/media_service_registry.rb +0 -44
  424. data/lib/adwords_api/v201003/report_definition_service.rb +0 -49
  425. data/lib/adwords_api/v201003/report_definition_service_registry.rb +0 -44
  426. data/lib/adwords_api/v201003/targeting_idea_service.rb +0 -36
  427. data/lib/adwords_api/v201003/targeting_idea_service_registry.rb +0 -44
  428. data/lib/adwords_api/v201008/ad_extension_override_service.rb +0 -36
  429. data/lib/adwords_api/v201008/ad_extension_override_service_registry.rb +0 -44
  430. data/lib/adwords_api/v201008/ad_group_ad_service.rb +0 -36
  431. data/lib/adwords_api/v201008/ad_group_ad_service_registry.rb +0 -44
  432. data/lib/adwords_api/v201008/ad_group_criterion_service.rb +0 -36
  433. data/lib/adwords_api/v201008/ad_group_criterion_service_registry.rb +0 -44
  434. data/lib/adwords_api/v201008/ad_group_service.rb +0 -36
  435. data/lib/adwords_api/v201008/ad_group_service_registry.rb +0 -44
  436. data/lib/adwords_api/v201008/ad_param_service.rb +0 -36
  437. data/lib/adwords_api/v201008/ad_param_service_registry.rb +0 -44
  438. data/lib/adwords_api/v201008/alert_service.rb +0 -32
  439. data/lib/adwords_api/v201008/alert_service_registry.rb +0 -44
  440. data/lib/adwords_api/v201008/bid_landscape_service.rb +0 -32
  441. data/lib/adwords_api/v201008/bid_landscape_service_registry.rb +0 -44
  442. data/lib/adwords_api/v201008/bulk_mutate_job_service.rb +0 -36
  443. data/lib/adwords_api/v201008/bulk_mutate_job_service_registry.rb +0 -44
  444. data/lib/adwords_api/v201008/campaign_ad_extension_service.rb +0 -36
  445. data/lib/adwords_api/v201008/campaign_ad_extension_service_registry.rb +0 -44
  446. data/lib/adwords_api/v201008/campaign_criterion_service.rb +0 -36
  447. data/lib/adwords_api/v201008/campaign_criterion_service_registry.rb +0 -44
  448. data/lib/adwords_api/v201008/campaign_service.rb +0 -36
  449. data/lib/adwords_api/v201008/campaign_service_registry.rb +0 -44
  450. data/lib/adwords_api/v201008/campaign_target_service.rb +0 -36
  451. data/lib/adwords_api/v201008/campaign_target_service_registry.rb +0 -44
  452. data/lib/adwords_api/v201008/customer_sync_service.rb +0 -32
  453. data/lib/adwords_api/v201008/customer_sync_service_registry.rb +0 -45
  454. data/lib/adwords_api/v201008/experiment_service.rb +0 -36
  455. data/lib/adwords_api/v201008/experiment_service_registry.rb +0 -44
  456. data/lib/adwords_api/v201008/geo_location_service.rb +0 -32
  457. data/lib/adwords_api/v201008/geo_location_service_registry.rb +0 -44
  458. data/lib/adwords_api/v201008/info_service.rb +0 -32
  459. data/lib/adwords_api/v201008/info_service_registry.rb +0 -44
  460. data/lib/adwords_api/v201008/media_service.rb +0 -36
  461. data/lib/adwords_api/v201008/media_service_registry.rb +0 -44
  462. data/lib/adwords_api/v201008/report_definition_service.rb +0 -49
  463. data/lib/adwords_api/v201008/report_definition_service_registry.rb +0 -44
  464. data/lib/adwords_api/v201008/serviced_account_service.rb +0 -32
  465. data/lib/adwords_api/v201008/serviced_account_service_registry.rb +0 -44
  466. data/lib/adwords_api/v201008/targeting_idea_service.rb +0 -36
  467. data/lib/adwords_api/v201008/targeting_idea_service_registry.rb +0 -44
  468. data/lib/adwords_api/v201008/traffic_estimator_service.rb +0 -32
  469. data/lib/adwords_api/v201008/traffic_estimator_service_registry.rb +0 -44
  470. data/lib/adwords_api/v201008/user_list_service.rb +0 -36
  471. data/lib/adwords_api/v201008/user_list_service_registry.rb +0 -44
  472. data/lib/adwords_api/v201101/ad_extension_override_service.rb +0 -36
  473. data/lib/adwords_api/v201101/ad_extension_override_service_registry.rb +0 -44
  474. data/lib/adwords_api/v201101/ad_group_ad_service.rb +0 -36
  475. data/lib/adwords_api/v201101/ad_group_ad_service_registry.rb +0 -44
  476. data/lib/adwords_api/v201101/ad_group_criterion_service.rb +0 -36
  477. data/lib/adwords_api/v201101/ad_group_criterion_service_registry.rb +0 -44
  478. data/lib/adwords_api/v201101/ad_group_service.rb +0 -36
  479. data/lib/adwords_api/v201101/ad_group_service_registry.rb +0 -44
  480. data/lib/adwords_api/v201101/ad_param_service.rb +0 -36
  481. data/lib/adwords_api/v201101/ad_param_service_registry.rb +0 -44
  482. data/lib/adwords_api/v201101/alert_service.rb +0 -32
  483. data/lib/adwords_api/v201101/alert_service_registry.rb +0 -44
  484. data/lib/adwords_api/v201101/bulk_mutate_job_service.rb +0 -36
  485. data/lib/adwords_api/v201101/bulk_mutate_job_service_registry.rb +0 -44
  486. data/lib/adwords_api/v201101/bulk_opportunity_service.rb +0 -32
  487. data/lib/adwords_api/v201101/bulk_opportunity_service_registry.rb +0 -44
  488. data/lib/adwords_api/v201101/campaign_ad_extension_service.rb +0 -36
  489. data/lib/adwords_api/v201101/campaign_ad_extension_service_registry.rb +0 -44
  490. data/lib/adwords_api/v201101/campaign_criterion_service.rb +0 -36
  491. data/lib/adwords_api/v201101/campaign_criterion_service_registry.rb +0 -44
  492. data/lib/adwords_api/v201101/campaign_service.rb +0 -36
  493. data/lib/adwords_api/v201101/campaign_service_registry.rb +0 -44
  494. data/lib/adwords_api/v201101/campaign_target_service.rb +0 -36
  495. data/lib/adwords_api/v201101/campaign_target_service_registry.rb +0 -44
  496. data/lib/adwords_api/v201101/conversion_tracker_service.rb +0 -36
  497. data/lib/adwords_api/v201101/conversion_tracker_service_registry.rb +0 -44
  498. data/lib/adwords_api/v201101/customer_sync_service.rb +0 -32
  499. data/lib/adwords_api/v201101/customer_sync_service_registry.rb +0 -45
  500. data/lib/adwords_api/v201101/data_service.rb +0 -36
  501. data/lib/adwords_api/v201101/data_service_registry.rb +0 -44
  502. data/lib/adwords_api/v201101/experiment_service.rb +0 -36
  503. data/lib/adwords_api/v201101/experiment_service_registry.rb +0 -44
  504. data/lib/adwords_api/v201101/geo_location_service.rb +0 -32
  505. data/lib/adwords_api/v201101/geo_location_service_registry.rb +0 -44
  506. data/lib/adwords_api/v201101/info_service.rb +0 -32
  507. data/lib/adwords_api/v201101/info_service_registry.rb +0 -44
  508. data/lib/adwords_api/v201101/media_service.rb +0 -36
  509. data/lib/adwords_api/v201101/media_service_registry.rb +0 -44
  510. data/lib/adwords_api/v201101/report_definition_service.rb +0 -49
  511. data/lib/adwords_api/v201101/report_definition_service_registry.rb +0 -44
  512. data/lib/adwords_api/v201101/serviced_account_service.rb +0 -32
  513. data/lib/adwords_api/v201101/serviced_account_service_registry.rb +0 -44
  514. data/lib/adwords_api/v201101/targeting_idea_service.rb +0 -36
  515. data/lib/adwords_api/v201101/targeting_idea_service_registry.rb +0 -44
  516. data/lib/adwords_api/v201101/traffic_estimator_service.rb +0 -32
  517. data/lib/adwords_api/v201101/traffic_estimator_service_registry.rb +0 -44
  518. data/lib/adwords_api/v201101/user_list_service.rb +0 -36
  519. data/lib/adwords_api/v201101/user_list_service_registry.rb +0 -44
@@ -1,78 +0,0 @@
1
- #!/usr/bin/ruby
2
- #
3
- # Author:: api.sgomes@gmail.com (Sérgio Gomes)
4
- #
5
- # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
6
- #
7
- # License:: Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16
- # implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
- #
20
- # This example deletes an experiment. To get experiments, run
21
- # get_all_experiments.rb. To add an experiment, run add_experiment.rb.
22
- #
23
- # Tags: ExperimentService.mutate
24
-
25
- require 'rubygems'
26
- require 'adwords_api'
27
-
28
- API_VERSION = :v201109
29
-
30
- def delete_experiment()
31
- # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
32
- # when called without parameters.
33
- adwords = AdwordsApi::Api.new
34
-
35
- # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
36
- # the configuration file or provide your own logger:
37
- # adwords.logger = Logger.new('adwords_xml.log')
38
-
39
- experiment_srv = adwords.service(:ExperimentService, API_VERSION)
40
-
41
- experiment_id = 'INSERT_EXPERIMENT_ID_HERE'.to_i
42
-
43
- # Prepare for deleting experiment.
44
- operation = {
45
- :operator => 'SET',
46
- :operand => {
47
- :id => experiment_id,
48
- :status => 'DELETED'
49
- }
50
- }
51
-
52
- # Delete experiment.
53
- response = experiment_srv.mutate([operation])
54
- experiment = response[:value].first
55
- puts 'Experiment with name "%s" and id %d was deleted.' %
56
- [experiment[:name], experiment[:id]]
57
- end
58
-
59
- if __FILE__ == $0
60
- begin
61
- delete_experiment()
62
-
63
- # HTTP errors.
64
- rescue AdsCommon::Errors::HttpError => e
65
- puts "HTTP Error: %s" % e
66
-
67
- # API errors.
68
- rescue AdwordsApi::Errors::ApiException => e
69
- puts "Message: %s" % e.message
70
- puts 'Errors:'
71
- e.errors.each_with_index do |error, index|
72
- puts "\tError [%d]:" % (index + 1)
73
- error.each do |field, value|
74
- puts "\t\t%s: %s" % [field, value]
75
- end
76
- end
77
- end
78
- end
@@ -1,78 +0,0 @@
1
- #!/usr/bin/ruby
2
- #
3
- # Author:: api.sgomes@gmail.com (Sérgio Gomes)
4
- #
5
- # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
6
- #
7
- # License:: Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16
- # implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
- #
20
- # This example deletes a user list by setting the status to 'CLOSED'. To get
21
- # user lists, run get_all_user_lists.rb.
22
- #
23
- # Tags: UserListService.mutate
24
-
25
- require 'rubygems'
26
- require 'adwords_api'
27
-
28
- API_VERSION = :v201109
29
-
30
- def delete_user_list()
31
- # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
32
- # when called without parameters.
33
- adwords = AdwordsApi::Api.new
34
-
35
- # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
36
- # the configuration file or provide your own logger:
37
- # adwords.logger = Logger.new('adwords_xml.log')
38
-
39
- user_list_srv = adwords.service(:UserListService, API_VERSION)
40
-
41
- user_list_id = 'INSERT_USER_LIST_ID_HERE'.to_i
42
-
43
- # Prepare for deleting remarketing user list.
44
- operation = {
45
- :operator => 'SET',
46
- :operand => {
47
- :id => user_list_id,
48
- :status => 'CLOSED'
49
- }
50
- }
51
-
52
- # Delete user list.
53
- response = user_list_srv.mutate([operation])
54
- user_list = response[:value].first
55
- puts 'User list with name "%s" and id %d was deleted (closed).' %
56
- [user_list[:name], user_list[:id]]
57
- end
58
-
59
- if __FILE__ == $0
60
- begin
61
- delete_user_list()
62
-
63
- # HTTP errors.
64
- rescue AdsCommon::Errors::HttpError => e
65
- puts "HTTP Error: %s" % e
66
-
67
- # API errors.
68
- rescue AdwordsApi::Errors::ApiException => e
69
- puts "Message: %s" % e.message
70
- puts 'Errors:'
71
- e.errors.each_with_index do |error, index|
72
- puts "\tError [%d]:" % (index + 1)
73
- error.each do |field, value|
74
- puts "\t\t%s: %s" % [field, value]
75
- end
76
- end
77
- end
78
- end
@@ -1,94 +0,0 @@
1
- #!/usr/bin/ruby
2
- #
3
- # Author:: api.sgomes@gmail.com (Sérgio Gomes)
4
- #
5
- # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
6
- #
7
- # License:: Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16
- # implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
- #
20
- # This example gets bid landscapes for an ad group. To get ad groups,
21
- # run get_all_ad_groups.rb.
22
- #
23
- # Tags: DataService.getAdGroupBidLandscape
24
-
25
- require 'rubygems'
26
- require 'adwords_api'
27
-
28
- API_VERSION = :v201109
29
-
30
- def get_ad_group_bid_landscapes()
31
- # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
32
- # when called without parameters.
33
- adwords = AdwordsApi::Api.new
34
-
35
- # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
36
- # the configuration file or provide your own logger:
37
- # adwords.logger = Logger.new('adwords_xml.log')
38
-
39
- data_srv = adwords.service(:DataService, API_VERSION)
40
-
41
- ad_group_id = 'INSERT_ADGROUP_ID_HERE'.to_i
42
- criterion_id = 'INSERT_CRITERION_ID_HERE'.to_i
43
-
44
- # Get bid landscape for ad group.
45
- selector = {
46
- :fields => ["AdGroupId", "LandscapeType", "LandscapeCurrent", "StartDate",
47
- "EndDate", "Bid", "LocalClicks", "LocalCost", "MarginalCpc",
48
- "LocalImpressions"],
49
- :predicates => [
50
- {:field => 'AdGroupId', :operator => 'IN', :values => [ad_group_id]}
51
- ]
52
- }
53
- page = data_srv.get_criterion_bid_landscape(selector)
54
- if page and page[:entries]
55
- puts "#{page[:entries].length} bid landscape(s) retrieved."
56
- page[:entries].each do |bid_landscape|
57
- puts "Found ad group bid landscape with ad group id " +
58
- "'#{bid_landscape[:ad_group_id]}', type " +
59
- "'#{bid_landscape[:type]}', current " +
60
- "'#{bid_landscape[:landscape_current]}', start date " +
61
- "'#{bid_landscape[:start_date]}', end date "+
62
- "'#{bid_landscape[:end_date]}', with landscape points:"
63
- bid_landscape[:landscape_points].each do |point|
64
- puts " #{point[:bid][:micro_amount]} => clicks: #{point.clicks}, " +
65
- "cost: #{point[:cost][:micro_amount]}, marginalCpc: " +
66
- "#{point[:marginal_cpc][:micro_amount]}, impressions: " +
67
- "#{point[:impressions]}"
68
- end
69
- end
70
- else
71
- puts "No ad group bid landscapes retrieved."
72
- end
73
- end
74
-
75
- if __FILE__ == $0
76
- begin
77
- get_ad_group_bid_landscapes()
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
@@ -1,82 +0,0 @@
1
- #!/usr/bin/ruby
2
- #
3
- # Author:: api.sgomes@gmail.com (Sérgio Gomes)
4
- #
5
- # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
6
- #
7
- # License:: Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16
- # implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
- #
20
- # This example illustrates how to retrieve all the ad extension overrides
21
- # for an existing campaign. To create an ad extension override run
22
- # add_ad_extension_override.rb.
23
- #
24
- # Tags: AdExtensionOverrideService.get
25
-
26
- require 'rubygems'
27
- require 'adwords_api'
28
-
29
- API_VERSION = :v201109
30
-
31
- def get_all_ad_extension_overrides()
32
- # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
33
- # when called without parameters.
34
- adwords = AdwordsApi::Api.new
35
-
36
- # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
37
- # the configuration file or provide your own logger:
38
- # adwords.logger = Logger.new('adwords_xml.log')
39
-
40
- ad_ext_override_srv =
41
- adwords.service(:AdExtensionOverrideService, API_VERSION)
42
-
43
- campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
44
-
45
- # Get all the ad extension overrides for this campaign.
46
- selector = {
47
- :campaign_ids => [campaign_id]
48
- }
49
- response = ad_ext_override_srv.get(selector)
50
- if response and response[:entries]
51
- ext_overrides = response[:entries]
52
- puts "Campaign ##{campaign_id} has #{ext_overrides.size} ad extension " +
53
- "override(s)."
54
- ext_overrides.each do |ext_override|
55
- puts " Ad extension override for ad ##{ext_override[:ad_id]} " +
56
- "and ad extension ##{ext_override[:ad_extension][:id]}."
57
- end
58
- else
59
- puts "No ad extension overrides found for campaign ##{campaign_id}."
60
- end
61
- end
62
-
63
- if __FILE__ == $0
64
- begin
65
- get_all_ad_extension_overrides()
66
-
67
- # HTTP errors.
68
- rescue AdsCommon::Errors::HttpError => e
69
- puts "HTTP Error: %s" % e
70
-
71
- # API errors.
72
- rescue AdwordsApi::Errors::ApiException => e
73
- puts "Message: %s" % e.message
74
- puts 'Errors:'
75
- e.errors.each_with_index do |error, index|
76
- puts "\tError [%d]:" % (index + 1)
77
- error.each do |field, value|
78
- puts "\t\t%s: %s" % [field, value]
79
- end
80
- end
81
- end
82
- end
@@ -1,90 +0,0 @@
1
- #!/usr/bin/ruby
2
- #
3
- # Author:: api.sgomes@gmail.com (Sérgio Gomes)
4
- #
5
- # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
6
- #
7
- # License:: Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16
- # implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
- #
20
- # This example illustrates how to retrieve all the criteria for an ad group.
21
- # To add criteria to an existing ad group, run add_ad_group_criteria.rb.
22
- #
23
- # Tags: AdGroupCriterionService.get
24
-
25
- require 'rubygems'
26
- require 'adwords_api'
27
-
28
- API_VERSION = :v201109
29
- def get_all_ad_group_criteria()
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
- ad_group_criterion_srv =
39
- adwords.service(:AdGroupCriterionService, API_VERSION)
40
-
41
- ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
42
-
43
- # Get all the criteria for this ad group.
44
- selector = {
45
- :fields => ['Id'],
46
- :ordering => [{
47
- :field => 'AdGroupId',
48
- :sort_order => 'ASCENDING'
49
- }],
50
- :predicates => [{
51
- :field => 'AdGroupId',
52
- :operator => 'IN',
53
- :values => [ad_group_id]
54
- }]
55
- }
56
- response = ad_group_criterion_srv.get(selector)
57
- if response and response[:entries]
58
- ad_group_criteria = response[:entries]
59
- puts "Ad group #%d has %d criteria." % [ad_group_id,
60
- ad_group_criteria.length]
61
- ad_group_criteria.each do |ad_group_criterion|
62
- puts "\tCriterion ID is %d and type is '%s'" %
63
- [ad_group_criterion[:criterion][:id],
64
- ad_group_criterion[:criterion][:type]]
65
- end
66
- else
67
- puts "No criteria found for ad group #%d" % ad_group_id
68
- end
69
- end
70
-
71
- if __FILE__ == $0
72
- begin
73
- get_all_ad_group_criteria()
74
-
75
- # HTTP errors.
76
- rescue AdsCommon::Errors::HttpError => e
77
- puts "HTTP Error: %s" % e
78
-
79
- # API errors.
80
- rescue AdwordsApi::Errors::ApiException => e
81
- puts "Message: %s" % e.message
82
- puts 'Errors:'
83
- e.errors.each_with_index do |error, index|
84
- puts "\tError [%d]:" % (index + 1)
85
- error.each do |field, value|
86
- puts "\t\t%s: %s" % [field, value]
87
- end
88
- end
89
- end
90
- end
@@ -1,86 +0,0 @@
1
- #!/usr/bin/ruby
2
- #
3
- # Author:: api.dklimkin@gmail.com (Danial Klimkin)
4
- #
5
- # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
6
- #
7
- # License:: Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16
- # implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
- #
20
- # This example illustrates how to retrieve all the ad parameters for an ad
21
- # group. To create an ad parameter, run set_ad_params.rb.
22
- #
23
- # Tags: AdParamService.get
24
-
25
- require 'rubygems'
26
- require 'adwords_api'
27
-
28
- API_VERSION = :v201109
29
-
30
- def get_all_ad_params()
31
- # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
32
- # when called without parameters.
33
- adwords = AdwordsApi::Api.new
34
-
35
- # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
36
- # the configuration file or provide your own logger:
37
- # adwords.logger = Logger.new('adwords_xml.log')
38
-
39
- ad_param_srv = adwords.service(:AdParamService, API_VERSION)
40
-
41
- ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
42
-
43
- # Get all the ad parameters for this ad group.
44
- selector = {
45
- :fields => ['AdGroupId', 'CriterionId', 'InsertionText', 'ParamIndex'],
46
- :predicates => [
47
- {:field => 'AdGroupId',
48
- :operator => 'EQUALS',
49
- :values => [ad_group_id]}
50
- ]
51
- }
52
- response = ad_param_srv.get(selector)
53
-
54
- if response and response[:entries]
55
- ad_params = response[:entries]
56
- puts "Ad group ID %d has %d ad param(s):" % [ad_group_id, ad_params.length]
57
- ad_params.each do |ad_param|
58
- puts "\tAd param index %d for criterion ID %d has insertion_text '%s' " %
59
- [ad_param[:param_index], ad_param[:criterion_id],
60
- ad_param[:insertion_text]]
61
- end
62
- else
63
- puts "No ad params found for ad group ID %d" % ad_group_id
64
- end
65
- end
66
-
67
- if __FILE__ == $0
68
- begin
69
- get_all_ad_params()
70
-
71
- # HTTP errors.
72
- rescue AdsCommon::Errors::HttpError => e
73
- puts "HTTP Error: %s" % e
74
-
75
- # API errors.
76
- rescue AdwordsApi::Errors::ApiException => e
77
- puts "Message: %s" % e.message
78
- puts 'Errors:'
79
- e.errors.each_with_index do |error, index|
80
- puts "\tError [%d]:" % (index + 1)
81
- error.each do |field, value|
82
- puts "\t\t%s: %s" % [field, value]
83
- end
84
- end
85
- end
86
- end