google-dfp-api 0.13.1 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. data/ChangeLog +12 -1
  2. data/README.md +1 -1
  3. data/examples/v201508/common/oauth2_jwt_handling.rb +1 -1
  4. data/examples/v201508/common/setup_oauth2.rb +1 -1
  5. data/examples/v201511/common/oauth2_jwt_handling.rb +1 -1
  6. data/examples/v201511/common/setup_oauth2.rb +1 -1
  7. data/examples/v201602/common/oauth2_jwt_handling.rb +1 -1
  8. data/examples/v201602/common/setup_oauth2.rb +1 -1
  9. data/examples/{v201505 → v201605}/activity_group_service/create_activity_groups.rb +1 -1
  10. data/examples/{v201505 → v201605}/activity_group_service/get_active_activity_groups.rb +1 -1
  11. data/examples/{v201505 → v201605}/activity_group_service/get_all_activity_groups.rb +1 -1
  12. data/examples/{v201505 → v201605}/activity_group_service/update_activity_groups.rb +1 -1
  13. data/examples/{v201505 → v201605}/activity_service/create_activities.rb +1 -1
  14. data/examples/{v201505 → v201605}/activity_service/get_active_activities.rb +1 -1
  15. data/examples/{v201505 → v201605}/activity_service/get_all_activities.rb +1 -1
  16. data/examples/{v201505 → v201605}/activity_service/update_activities.rb +1 -1
  17. data/examples/{v201505 → v201605}/audience_segment_service/create_audience_segments.rb +1 -1
  18. data/examples/{v201505 → v201605}/audience_segment_service/get_all_audience_segments.rb +1 -1
  19. data/examples/{v201505 → v201605}/audience_segment_service/get_first_party_audience_segments.rb +1 -1
  20. data/examples/{v201505 → v201605}/audience_segment_service/populate_first_party_audience_segments.rb +1 -1
  21. data/examples/{v201505 → v201605}/audience_segment_service/update_audience_segments.rb +1 -1
  22. data/examples/{v201505 → v201605}/common/error_handling.rb +1 -1
  23. data/examples/{v201505 → v201605}/common/oauth2_jwt_handling.rb +1 -1
  24. data/examples/{v201505 → v201605}/common/setup_oauth2.rb +1 -1
  25. data/examples/{v201505 → v201605}/company_service/create_companies.rb +3 -2
  26. data/examples/{v201505 → v201605}/company_service/get_all_companies.rb +1 -1
  27. data/examples/{v201505 → v201605}/company_service/get_companies_by_statement.rb +1 -1
  28. data/examples/{v201505 → v201605}/company_service/update_companies.rb +1 -1
  29. data/examples/{v201505 → v201605}/contact_service/create_contacts.rb +1 -1
  30. data/examples/{v201505 → v201605}/contact_service/get_all_contacts.rb +1 -1
  31. data/examples/{v201505 → v201605}/contact_service/get_uninvited_contacts.rb +1 -1
  32. data/examples/{v201505 → v201605}/contact_service/update_contacts.rb +1 -1
  33. data/examples/{v201505 → v201605}/content_metadata_key_hierarchy_service/create_content_metadata_key_hierarchies.rb +1 -1
  34. data/examples/{v201505 → v201605}/content_metadata_key_hierarchy_service/delete_content_metadata_key_hierarchies.rb +1 -1
  35. data/examples/{v201505 → v201605}/content_metadata_key_hierarchy_service/get_all_content_metadata_key_hierarchies.rb +1 -1
  36. data/examples/{v201505 → v201605}/content_metadata_key_hierarchy_service/update_content_metadata_key_hierarchies.rb +1 -1
  37. data/examples/{v201505 → v201605}/content_service/get_all_content.rb +1 -1
  38. data/examples/{v201505 → v201605}/content_service/get_content_by_category.rb +1 -1
  39. data/examples/{v201505 → v201605}/creative_service/copy_image_creatives.rb +1 -1
  40. data/examples/{v201505 → v201605}/creative_service/create_creative_from_template.rb +1 -1
  41. data/examples/{v201505 → v201605}/creative_service/create_creatives.rb +1 -1
  42. data/examples/{v201505 → v201605}/creative_service/create_custom_creative.rb +9 -6
  43. data/examples/v201605/creative_service/create_native_creative.rb +189 -0
  44. data/examples/{v201505 → v201605}/creative_service/get_all_creatives.rb +1 -1
  45. data/examples/{v201505 → v201605}/creative_service/get_creatives_by_statement.rb +1 -1
  46. data/examples/{v201505 → v201605}/creative_service/update_creatives.rb +1 -1
  47. data/examples/{v201505 → v201605}/creative_set_service/associate_creative_set_to_line_item.rb +1 -1
  48. data/examples/{v201505 → v201605}/creative_set_service/create_creative_set.rb +1 -1
  49. data/examples/{v201505 → v201605}/creative_set_service/get_all_creative_sets.rb +1 -1
  50. data/examples/{v201505 → v201605}/creative_set_service/get_creative_sets_by_statement.rb +1 -1
  51. data/examples/{v201505 → v201605}/creative_set_service/update_creative_sets.rb +1 -1
  52. data/examples/{v201505 → v201605}/creative_template_service/get_all_creative_templates.rb +1 -1
  53. data/examples/{v201505 → v201605}/creative_template_service/get_system_defined_creative_templates.rb +1 -1
  54. data/examples/{v201505 → v201605}/creative_wrapper_service/create_creative_wrappers.rb +1 -1
  55. data/examples/{v201505 → v201605}/creative_wrapper_service/deactivate_creative_wrapper.rb +1 -1
  56. data/examples/{v201505 → v201605}/creative_wrapper_service/get_all_creative_wrappers.rb +1 -1
  57. data/examples/{v201505 → v201605}/creative_wrapper_service/get_creative_wrappers_by_statement.rb +1 -1
  58. data/examples/{v201505 → v201605}/creative_wrapper_service/update_creative_wrappers.rb +1 -1
  59. data/examples/{v201505 → v201605}/custom_field_service/create_custom_field_options.rb +1 -1
  60. data/examples/{v201505 → v201605}/custom_field_service/create_custom_fields.rb +1 -1
  61. data/examples/{v201505 → v201605}/custom_field_service/deactivate_all_line_item_custom_fields.rb +1 -1
  62. data/examples/{v201505 → v201605}/custom_field_service/get_all_custom_fields.rb +1 -1
  63. data/examples/{v201505 → v201605}/custom_field_service/get_all_line_item_custom_fields.rb +1 -1
  64. data/examples/{v201505 → v201605}/custom_field_service/set_line_item_custom_field_value.rb +1 -1
  65. data/examples/{v201505 → v201605}/custom_field_service/update_custom_fields.rb +1 -1
  66. data/examples/{v201505 → v201605}/custom_targeting_service/create_custom_targeting_keys_and_values.rb +1 -1
  67. data/examples/{v201505 → v201605}/custom_targeting_service/delete_custom_targeting_keys.rb +1 -1
  68. data/examples/{v201505 → v201605}/custom_targeting_service/delete_custom_targeting_values.rb +1 -1
  69. data/examples/{v201505 → v201605}/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +1 -1
  70. data/examples/{v201505 → v201605}/custom_targeting_service/get_custom_targeting_keys_by_statement.rb +1 -1
  71. data/examples/{v201505 → v201605}/custom_targeting_service/get_custom_targeting_values_by_statement.rb +1 -1
  72. data/examples/{v201505 → v201605}/custom_targeting_service/update_custom_targeting_keys.rb +1 -1
  73. data/examples/{v201505 → v201605}/custom_targeting_service/update_custom_targeting_values.rb +1 -1
  74. data/examples/{v201505 → v201605}/forecast_service/get_availability_forecast.rb +9 -1
  75. data/examples/{v201505 → v201605}/forecast_service/get_availability_forecast_for_line_item.rb +5 -1
  76. data/examples/{v201505 → v201605}/forecast_service/get_delivery_forecast_for_line_items.rb +5 -1
  77. data/examples/{v201505 → v201605}/inventory_service/create_ad_units.rb +1 -1
  78. data/examples/{v201505 → v201605}/inventory_service/create_video_ad_unit.rb +1 -2
  79. data/examples/{v201505 → v201605}/inventory_service/deactivate_ad_units.rb +1 -1
  80. data/examples/{v201505 → v201605}/inventory_service/get_ad_unit_sizes.rb +1 -1
  81. data/examples/{v201505 → v201605}/inventory_service/get_ad_units_by_statement.rb +1 -1
  82. data/examples/{v201505 → v201605}/inventory_service/get_all_ad_units.rb +1 -1
  83. data/examples/{v201505 → v201605}/inventory_service/update_ad_units.rb +1 -1
  84. data/examples/{v201505 → v201605}/label_service/create_labels.rb +1 -1
  85. data/examples/{v201505 → v201605}/label_service/deactivate_labels.rb +1 -1
  86. data/examples/{v201505 → v201605}/label_service/get_all_labels.rb +1 -1
  87. data/examples/{v201505 → v201605}/label_service/get_labels_by_statement.rb +1 -1
  88. data/examples/{v201505 → v201605}/label_service/update_labels.rb +1 -1
  89. data/examples/{v201505 → v201605}/line_item_creative_association_service/create_licas.rb +1 -1
  90. data/examples/{v201505 → v201605}/line_item_creative_association_service/deactivate_licas.rb +1 -1
  91. data/examples/{v201505 → v201605}/line_item_creative_association_service/get_all_licas.rb +1 -1
  92. data/examples/{v201505 → v201605}/line_item_creative_association_service/get_licas_by_statement.rb +1 -1
  93. data/examples/{v201505 → v201605}/line_item_creative_association_service/update_licas.rb +1 -1
  94. data/examples/{v201505 → v201605}/line_item_service/activate_line_items.rb +1 -1
  95. data/examples/{v201505 → v201605}/line_item_service/create_line_items.rb +1 -1
  96. data/examples/{v201505 → v201605}/line_item_service/create_video_line_item.rb +1 -1
  97. data/examples/{v201505 → v201605}/line_item_service/get_all_line_items.rb +1 -1
  98. data/examples/{v201505 → v201605}/line_item_service/get_line_items_by_statement.rb +1 -1
  99. data/examples/{v201505 → v201605}/line_item_service/get_recently_updated_line_items.rb +1 -1
  100. data/examples/{v201505 → v201605}/line_item_service/target_custom_criteria.rb +1 -1
  101. data/examples/{v201505 → v201605}/line_item_service/update_line_items.rb +1 -1
  102. data/examples/{v201505 → v201605}/network_service/get_all_networks.rb +1 -1
  103. data/examples/{v201505 → v201605}/network_service/get_current_network.rb +1 -1
  104. data/examples/{v201505 → v201605}/network_service/make_test_network.rb +1 -1
  105. data/examples/{v201505 → v201605}/order_service/approve_orders.rb +1 -1
  106. data/examples/{v201505 → v201605}/order_service/create_orders.rb +1 -1
  107. data/examples/{v201505 → v201605}/order_service/get_all_orders.rb +1 -1
  108. data/examples/{v201505 → v201605}/order_service/get_orders_by_statement.rb +1 -1
  109. data/examples/{v201505 → v201605}/order_service/update_orders.rb +1 -1
  110. data/examples/{v201505 → v201605}/placement_service/create_placements.rb +1 -1
  111. data/examples/{v201505 → v201605}/placement_service/deactivate_placements.rb +1 -1
  112. data/examples/{v201505 → v201605}/placement_service/get_all_placements.rb +1 -1
  113. data/examples/{v201505 → v201605}/placement_service/get_placements_by_statement.rb +1 -1
  114. data/examples/{v201505 → v201605}/placement_service/update_placements.rb +2 -2
  115. data/examples/{v201505 → v201605}/publisher_query_language_service/fetch_match_tables.rb +2 -2
  116. data/examples/{v201505 → v201605}/publisher_query_language_service/get_all_line_items.rb +1 -1
  117. data/examples/{v201505 → v201605}/publisher_query_language_service/get_geo_targets.rb +1 -1
  118. data/examples/{v201505 → v201605}/publisher_query_language_service/get_line_items_named_like.rb +1 -1
  119. data/examples/{v201505 → v201605}/report_service/display_report.rb +1 -1
  120. data/examples/{v201505 → v201605}/report_service/download_report.rb +1 -1
  121. data/examples/{v201505 → v201605}/report_service/run_delivery_report.rb +13 -2
  122. data/examples/{v201505 → v201605}/report_service/run_inventory_report.rb +1 -1
  123. data/examples/{v201505 → v201605}/report_service/run_reach_report.rb +1 -1
  124. data/examples/{v201505 → v201605}/report_service/run_report_with_custom_fields.rb +1 -1
  125. data/examples/{v201505 → v201605}/report_service/run_sales_report.rb +1 -1
  126. data/examples/{v201505 → v201605}/suggested_ad_unit_service/approve_all_suggested_ad_units.rb +2 -2
  127. data/examples/{v201505 → v201605}/suggested_ad_unit_service/get_all_suggested_ad_units.rb +1 -1
  128. data/examples/{v201505 → v201605}/suggested_ad_unit_service/get_suggested_ad_units_by_statement.rb +1 -1
  129. data/examples/{v201505 → v201605}/team_service/create_teams.rb +1 -1
  130. data/examples/{v201505 → v201605}/team_service/get_all_teams.rb +1 -1
  131. data/examples/{v201505 → v201605}/team_service/get_teams_by_statement.rb +1 -1
  132. data/examples/{v201505 → v201605}/team_service/update_teams.rb +1 -1
  133. data/examples/{v201505 → v201605}/user_service/create_users.rb +2 -2
  134. data/examples/{v201505 → v201605}/user_service/deactivate_users.rb +1 -1
  135. data/examples/{v201505 → v201605}/user_service/get_all_roles.rb +1 -1
  136. data/examples/{v201505 → v201605}/user_service/get_all_users.rb +1 -1
  137. data/examples/{v201505 → v201605}/user_service/get_current_user.rb +1 -1
  138. data/examples/{v201505 → v201605}/user_service/get_users_by_statement.rb +1 -1
  139. data/examples/{v201505 → v201605}/user_service/update_users.rb +1 -1
  140. data/examples/{v201505 → v201605}/user_team_association_service/create_user_team_associations.rb +1 -1
  141. data/examples/{v201505 → v201605}/user_team_association_service/delete_user_team_associations.rb +1 -1
  142. data/examples/{v201505 → v201605}/user_team_association_service/get_all_user_team_associations.rb +1 -1
  143. data/examples/{v201505 → v201605}/user_team_association_service/get_user_team_associations_by_statement.rb +1 -1
  144. data/examples/{v201505 → v201605}/user_team_association_service/update_user_team_associations.rb +1 -1
  145. data/lib/dfp_api/api_config.rb +11 -10
  146. data/lib/dfp_api/version.rb +1 -1
  147. metadata +140 -140
  148. data/examples/v201505/inventory_service/create_mobile_ad_unit.rb +0 -97
data/ChangeLog CHANGED
@@ -1,3 +1,14 @@
1
+ 0.15.0:
2
+ - Added support for v201605.
3
+ - Removed support for v201502.
4
+ - Removed examples for v201505.
5
+ - Require google-ads-common 0.12.1 or later from now on.
6
+ - Added JSON keyfile support or OAuth2 service accounts.
7
+
8
+ 0.14.0:
9
+ - Require google-ads-common 0.12.0 or later from now on. This also means
10
+ that Ruby 2.0 or later is required. Ruby 2.1 or later is recommended.
11
+
1
12
  0.13.1:
2
13
  - Require google-ads-common 0.11.3 or later from now on.
3
14
 
@@ -108,7 +119,7 @@
108
119
 
109
120
  0.3.2:
110
121
  - Require google-ads-common 0.7.3 or later from now on.
111
- - Support for OAuth2.0 authentication method.
122
+ - Support for OAuth2 authentication method.
112
123
  - Updated User-Agent to a single standard.
113
124
 
114
125
  0.3.1:
data/README.md CHANGED
@@ -103,7 +103,7 @@ or add it to the bash configuration file:
103
103
  $ echo 'export RUBYOPT="rubygems"' >> ~/.bashrc
104
104
 
105
105
 
106
- ## Using OAuth2.0
106
+ ## Using OAuth2
107
107
 
108
108
  In order to use OAuth you just need to:
109
109
 
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
  #
19
- # This example illustrates how to use OAuth2.0 authentication method with
19
+ # This example illustrates how to use OAuth2 authentication method with
20
20
  # Service Account (JWT). For this example to work, your Service Account must be
21
21
  # a Google Apps for Business Account.
22
22
  #
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
  #
19
- # This example shows how to use OAuth2.0 authorization method. It is designed to
19
+ # This example shows how to use OAuth2 authorization method. It is designed to
20
20
  # be run from console and requires user input.
21
21
 
22
22
  require 'dfp_api'
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
  #
19
- # This example illustrates how to use OAuth2.0 authentication method with
19
+ # This example illustrates how to use OAuth2 authentication method with
20
20
  # Service Account (JWT). For this example to work, your Service Account must be
21
21
  # a Google Apps for Business Account.
22
22
  #
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
  #
19
- # This example shows how to use OAuth2.0 authorization method. It is designed to
19
+ # This example shows how to use OAuth2 authorization method. It is designed to
20
20
  # be run from console and requires user input.
21
21
 
22
22
  require 'dfp_api'
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
  #
19
- # This example illustrates how to use OAuth2.0 authentication method with
19
+ # This example illustrates how to use OAuth2 authentication method with
20
20
  # Service Account (JWT). For this example to work, your Service Account must be
21
21
  # a Google Apps for Business Account.
22
22
  #
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
  #
19
- # This example shows how to use OAuth2.0 authorization method. It is designed to
19
+ # This example shows how to use OAuth2 authorization method. It is designed to
20
20
  # be run from console and requires user input.
21
21
 
22
22
  require 'dfp_api'
@@ -21,7 +21,7 @@
21
21
 
22
22
  require 'dfp_api'
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
 
26
26
  def create_activity_groups()
27
27
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def get_active_activity_groups()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def get_all_activity_groups()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def update_activity_groups()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -21,7 +21,7 @@
21
21
 
22
22
  require 'dfp_api'
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
 
26
26
  def create_activities()
27
27
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def get_active_activities()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def get_all_activities()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def update_activities()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -21,7 +21,7 @@
21
21
 
22
22
  require 'dfp_api'
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
 
26
26
  def create_audience_segments(custom_targeting_key_id, custom_targeting_value_id)
27
27
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def get_all_audience_segments()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def get_first_party_audience_segments()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def populate_first_party_audience_segments(audience_segment_id)
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -23,7 +23,7 @@
23
23
  require 'dfp_api'
24
24
 
25
25
 
26
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
27
27
 
28
28
  def update_audience_segments()
29
29
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -20,7 +20,7 @@
20
20
 
21
21
  require 'dfp_api'
22
22
 
23
- API_VERSION = :v201505
23
+ API_VERSION = :v201605
24
24
 
25
25
  def produce_api_error()
26
26
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -26,7 +26,7 @@
26
26
  require 'dfp_api'
27
27
 
28
28
 
29
- API_VERSION = :v201505
29
+ API_VERSION = :v201605
30
30
 
31
31
  def oauth2_jwt_handling()
32
32
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -21,7 +21,7 @@
21
21
 
22
22
  require 'dfp_api'
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
 
26
26
  def setup_oauth2()
27
27
  # DfpApi::Api will read a config file from ENV['HOME']/dfp_api.yml
@@ -21,7 +21,7 @@
21
21
 
22
22
  require 'dfp_api'
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
  # Number of companies to create.
26
26
  ITEM_COUNT = 5
27
27
 
@@ -38,7 +38,8 @@ def create_companies()
38
38
 
39
39
  # Create an array to store local company objects.
40
40
  companies = (1..ITEM_COUNT).map do |index|
41
- {:name => "Advertiser #%d" % index, :type => 'ADVERTISER'}
41
+ {:name => "Advertiser #%d-%d" % [Time.new.to_f * 1000, index],
42
+ :type => 'ADVERTISER'}
42
43
  end
43
44
 
44
45
  # Create the companies on the server.
@@ -21,7 +21,7 @@
21
21
  require 'dfp_api'
22
22
 
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
 
26
26
  def get_all_companies()
27
27
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -23,7 +23,7 @@
23
23
  require 'dfp_api'
24
24
 
25
25
 
26
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
27
27
 
28
28
  def get_companies_by_statement()
29
29
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -23,7 +23,7 @@
23
23
  require 'dfp_api'
24
24
 
25
25
 
26
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
27
27
 
28
28
  def update_companies()
29
29
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -21,7 +21,7 @@
21
21
 
22
22
  require 'dfp_api'
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
 
26
26
  def create_contacts()
27
27
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -21,7 +21,7 @@
21
21
  require 'dfp_api'
22
22
 
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
 
26
26
  def get_all_contacts()
27
27
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
  PAGE_SIZE = 500
27
27
 
28
28
  def get_uninvited_contacts()
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def update_contacts()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
 
23
23
  require 'dfp_api'
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def create_content_metadata_key_hierarchies()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -23,7 +23,7 @@
23
23
  require 'dfp_api'
24
24
 
25
25
 
26
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
27
27
 
28
28
  def delete_content_metadata_key_hierarchies()
29
29
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -23,7 +23,7 @@
23
23
  require 'dfp_api'
24
24
 
25
25
 
26
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
27
27
 
28
28
  def get_all_content_metadata_key_hierarchies()
29
29
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -23,7 +23,7 @@
23
23
  require 'dfp_api'
24
24
 
25
25
 
26
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
27
27
 
28
28
  def update_content_metadata_key_hierarchies()
29
29
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -23,7 +23,7 @@
23
23
  require 'dfp_api'
24
24
 
25
25
 
26
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
27
27
 
28
28
  def get_all_content()
29
29
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -24,7 +24,7 @@
24
24
  require 'dfp_api'
25
25
 
26
26
 
27
- API_VERSION = :v201505
27
+ API_VERSION = :v201605
28
28
 
29
29
  def get_content_by_statement()
30
30
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -24,7 +24,7 @@ require 'dfp_api'
24
24
 
25
25
  require 'base64'
26
26
 
27
- API_VERSION = :v201505
27
+ API_VERSION = :v201605
28
28
 
29
29
  def copy_image_creatives()
30
30
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -24,7 +24,7 @@
24
24
  require 'base64'
25
25
  require 'dfp_api'
26
26
 
27
- API_VERSION = :v201505
27
+ API_VERSION = :v201605
28
28
 
29
29
  def create_creative_from_template()
30
30
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -23,7 +23,7 @@
23
23
  require 'base64'
24
24
  require 'dfp_api'
25
25
 
26
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
27
27
  # Number of creatives to create.
28
28
  ITEM_COUNT = 5
29
29
 
@@ -25,7 +25,7 @@
25
25
  require 'base64'
26
26
  require 'dfp_api'
27
27
 
28
- API_VERSION = :v201505
28
+ API_VERSION = :v201605
29
29
 
30
30
  def create_custom_creative()
31
31
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -54,11 +54,14 @@ def create_custom_creative()
54
54
  :name => 'Custom creative',
55
55
  :advertiser_id => advertiser_id,
56
56
  :destination_url => 'http://www.google.com',
57
- :custom_creative_assets => [
58
- {:macro_name => 'IMAGE_ASSET',
59
- :file_name => "image%d.jpg" % Time.new.to_i,
60
- :asset_byte_array => image_data_base64}
61
- ],
57
+ :custom_creative_assets => [{
58
+ :macro_name => 'IMAGE_ASSET',
59
+ :asset => {
60
+ :file_name => "image%d.jpg" % Time.new.to_i,
61
+ :asset_byte_array => image_data_base64
62
+ }
63
+ }],
64
+
62
65
  # Set the HTML snippet using the custom creative asset macro.
63
66
  :html_snippet => "<a href='%%CLICK_URL_UNESC%%%%DEST_URL%%'>" +
64
67
  "<img src='%%FILE:IMAGE_ASSET%%'/></a><br>Click above for great deals!",