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,86 +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 update an ad, setting its status to 'PAUSED'.
21
- # To create ads, run add_ads.rb.
22
- #
23
- # Tags: AdGroupAdService.mutate
24
-
25
- require 'rubygems'
26
- require 'adwords_api'
27
-
28
- API_VERSION = :v201101
29
-
30
- def update_ad()
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_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION)
40
-
41
- ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
42
- ad_id = 'INSERT_AD_ID_HERE'.to_i
43
-
44
- # Prepare for updating ad.
45
- operation = {
46
- :operator => 'SET',
47
- :operand => {
48
- :ad_group_id => ad_group_id,
49
- :status => 'PAUSED',
50
- :ad => {
51
- :id => ad_id
52
- }
53
- }
54
- }
55
-
56
- # Update ad.
57
- response = ad_group_ad_srv.mutate([operation])
58
- if response and response[:value]
59
- ad = response[:value].first
60
- puts 'Ad id %d was successfully updated, status set to %s.' %
61
- [ad[:ad][:id], ad[:status]]
62
- else
63
- puts 'No ads were updated.'
64
- end
65
- end
66
-
67
- if __FILE__ == $0
68
- begin
69
- update_ad()
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
@@ -1,81 +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 update an ad group, setting its status to
21
- # 'PAUSED'. To create an ad group, run add_ad_group.rb.
22
- #
23
- # Tags: AdGroupService.mutate
24
-
25
- require 'rubygems'
26
- require 'adwords_api'
27
-
28
- API_VERSION = :v201101
29
-
30
- def update_ad_group()
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_group_srv = adwords.service(:AdGroupService, API_VERSION)
40
-
41
- ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
42
-
43
- # Prepare for updating ad group.
44
- operation = {
45
- :operator => 'SET',
46
- :operand => {
47
- :status => 'PAUSED',
48
- :id => ad_group_id
49
- }
50
- }
51
-
52
- # Update ad group.
53
- response = ad_group_srv.mutate([operation])
54
- if response and response[:value]
55
- ad_group = response[:value].first
56
- puts 'Ad group id %d was successfully updated.' % ad_group[:id]
57
- else
58
- puts 'No ad groups were updated.'
59
- end
60
- end
61
-
62
- if __FILE__ == $0
63
- begin
64
- update_ad_group()
65
-
66
- # HTTP errors.
67
- rescue AdsCommon::Errors::HttpError => e
68
- puts "HTTP Error: %s" % e
69
-
70
- # API errors.
71
- rescue AdwordsApi::Errors::ApiException => e
72
- puts "Message: %s" % e.message
73
- puts 'Errors:'
74
- e.errors.each_with_index do |error, index|
75
- puts "\tError [%d]:" % (index + 1)
76
- error.each do |field, value|
77
- puts "\t\t%s: %s" % [field, value]
78
- end
79
- end
80
- end
81
- end
@@ -1,99 +0,0 @@
1
- #!/usr/bin/ruby
2
- #
3
- # Author:: api.sgomes@gmail.com (Sérgio Gomes)
4
- #
5
- # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
6
- #
7
- # License:: Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16
- # implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
- #
20
- # This example illustrates how to update an ad group criterion, setting its
21
- # bid. To create an ad group criterion, run add_ad_group_criterion.rb.
22
- #
23
- # Tags: AdGroupCriterionService.mutate
24
-
25
- require 'rubygems'
26
- require 'adwords_api'
27
-
28
- API_VERSION = :v201101
29
-
30
- def update_ad_group_criterion()
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_group_criterion_srv =
40
- adwords.service(:AdGroupCriterionService, API_VERSION)
41
-
42
- ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
43
- criterion_id = 'INSERT_CRITERION_ID_HERE'.to_i
44
-
45
- # Prepare for updating ad group criterion.
46
- operation = {
47
- :operator => 'SET',
48
- :operand => {
49
- # The 'xsi_type' field allows you to specify the xsi:type of the object
50
- # being created. It's only necessary when you must provide an explicit
51
- # type that the client library can't infer.
52
- :xsi_type => 'BiddableAdGroupCriterion',
53
- :ad_group_id => ad_group_id,
54
- :criterion => {
55
- :id => criterion_id
56
- },
57
- :bids => {
58
- :xsi_type => 'ManualCPCAdGroupCriterionBids',
59
- :max_cpc => {
60
- :amount => {
61
- :micro_amount => 1000000
62
- }
63
- }
64
- }
65
- }
66
- }
67
-
68
- # Update criterion.
69
- response = ad_group_criterion_srv.mutate([operation])
70
- if response and response[:value]
71
- ad_group_criterion = response[:value].first
72
- puts 'Criterion id %d was successfully updated, bid set to %d.' %
73
- [ad_group_criterion[:criterion][:id],
74
- ad_group_criterion[:bids][:max_cpc][:amount][:micro_amount]]
75
- else
76
- puts 'No criteria were updated.'
77
- end
78
- end
79
-
80
- if __FILE__ == $0
81
- begin
82
- update_ad_group_criterion()
83
-
84
- # HTTP errors.
85
- rescue AdsCommon::Errors::HttpError => e
86
- puts "HTTP Error: %s" % e
87
-
88
- # API errors.
89
- rescue AdwordsApi::Errors::ApiException => e
90
- puts "Message: %s" % e.message
91
- puts 'Errors:'
92
- e.errors.each_with_index do |error, index|
93
- puts "\tError [%d]:" % (index + 1)
94
- error.each do |field, value|
95
- puts "\t\t%s: %s" % [field, value]
96
- end
97
- end
98
- end
99
- end
@@ -1,84 +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 update a campaign, setting its budget delivery
21
- # to 'ACCELERATED'. To create a campaign, run add_campaign.rb.
22
- #
23
- # Tags: CampaignService.mutate
24
-
25
- require 'rubygems'
26
- require 'adwords_api'
27
-
28
- API_VERSION = :v201101
29
-
30
- def update_campaign()
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
- campaign_srv = adwords.service(:CampaignService, API_VERSION)
40
-
41
- campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
42
-
43
- # Prepare for updating campaign.
44
- operation = {
45
- :operator => 'SET',
46
- :operand => {
47
- :id => campaign_id,
48
- :budget => {
49
- :delivery_method => 'ACCELERATED'
50
- }
51
- }
52
- }
53
-
54
- # Update campaign.
55
- response = campaign_srv.mutate([operation])
56
- if response and response[:value]
57
- campaign = response[:value].first
58
- puts 'Campaign id %d successfully updated, delivery method set to %s.' %
59
- [campaign[:id], campaign[:budget][:delivery_method]]
60
- else
61
- puts 'No campaigns were updated.'
62
- end
63
- end
64
-
65
- if __FILE__ == $0
66
- begin
67
- update_campaign()
68
-
69
- # HTTP errors.
70
- rescue AdsCommon::Errors::HttpError => e
71
- puts "HTTP Error: %s" % e
72
-
73
- # API errors.
74
- rescue AdwordsApi::Errors::ApiException => e
75
- puts "Message: %s" % e.message
76
- puts 'Errors:'
77
- e.errors.each_with_index do |error, index|
78
- puts "\tError [%d]:" % (index + 1)
79
- error.each do |field, value|
80
- puts "\t\t%s: %s" % [field, value]
81
- end
82
- end
83
- end
84
- end
@@ -1,87 +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 update a conversion by setting its status to
21
- # 'DISABLED'. To get conversions, run get_all_conversions.rb.
22
- #
23
- # Tags: ConversionTrackerService.mutate
24
-
25
- require 'rubygems'
26
- require 'adwords_api'
27
-
28
- API_VERSION = :v201101
29
-
30
- def update_conversion()
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
- conv_tracker_srv = adwords.service(:ConversionTrackerService, API_VERSION)
40
-
41
- conversion_id = 'INSERT_CONVERSION_ID_HERE'.to_i
42
-
43
- # Prepare for updating conversion.
44
- operation = {
45
- :operator => 'SET',
46
- :operand => {
47
- # The 'xsi_type' field allows you to specify the xsi:type of the object
48
- # being created. It's only necessary when you must provide an explicit
49
- # type that the client library can't infer.
50
- :xsi_type => 'AdWordsConversionTracker',
51
- :id => conversion_id,
52
- :status => 'DISABLED'
53
- }
54
- }
55
-
56
- # Update conversion.
57
- response = conv_tracker_srv.mutate([operation])
58
- if response and response[:value]
59
- conversion = response[:value].first
60
- puts "Conversion with id #{conversion[:id]}, name " +
61
- "\"#{conversion[:name]}\", status \"#{conversion[:status]}\" and " +
62
- " category \"#{conversion[:category]}\" was disabled."
63
- else
64
- puts 'No conversions were updated.'
65
- end
66
- end
67
-
68
- if __FILE__ == $0
69
- begin
70
- update_conversion()
71
-
72
- # HTTP errors.
73
- rescue AdsCommon::Errors::HttpError => e
74
- puts "HTTP Error: %s" % e
75
-
76
- # API errors.
77
- rescue AdwordsApi::Errors::ApiException => e
78
- puts "Message: %s" % e.message
79
- puts 'Errors:'
80
- e.errors.each_with_index do |error, index|
81
- puts "\tError [%d]:" % (index + 1)
82
- error.each do |field, value|
83
- puts "\t\t%s: %s" % [field, value]
84
- end
85
- end
86
- end
87
- 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 update a user list, setting its description.
21
- # To create a user list, run add_user_list.rb.
22
- #
23
- # Tags: UserListService.mutate
24
-
25
- require 'rubygems'
26
- require 'adwords_api'
27
-
28
- API_VERSION = :v201101
29
-
30
- def update_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 updating remarketing user list.
44
- operation = {
45
- :operator => 'SET',
46
- :operand => {
47
- :id => user_list_id,
48
- :description => 'Last updated at %s' % Time.now.to_s
49
- }
50
- }
51
-
52
- # Update user list.
53
- response = user_list_srv.mutate([operation])
54
- if response and response[:value]
55
- user_list = response[:value].first
56
- puts 'User list id %d was successfully updated, description set to "%s."' %
57
- [user_list[:id], user_list[:description]]
58
- else
59
- puts 'No user lists were updated.'
60
- end
61
- end
62
-
63
- if __FILE__ == $0
64
- begin
65
- update_user_list()
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