appnexusapi 0.1.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -4
  3. data/UPGRADING.md +10 -0
  4. data/appnexusapi.gemspec +2 -0
  5. data/env_example +1 -3
  6. data/lib/appnexusapi/advertiser_resource.rb +2 -0
  7. data/lib/appnexusapi/advertiser_service.rb +2 -0
  8. data/lib/appnexusapi/campaign_resource.rb +2 -0
  9. data/lib/appnexusapi/campaign_service.rb +2 -0
  10. data/lib/appnexusapi/connection.rb +19 -5
  11. data/lib/appnexusapi/content_category_service.rb +3 -1
  12. data/lib/appnexusapi/creative_service.rb +0 -10
  13. data/lib/appnexusapi/payment_rule_resource.rb +2 -0
  14. data/lib/appnexusapi/payment_rule_service.rb +2 -0
  15. data/lib/appnexusapi/placement_resource.rb +2 -0
  16. data/lib/appnexusapi/placement_service.rb +2 -0
  17. data/lib/appnexusapi/profile_resource.rb +2 -0
  18. data/lib/appnexusapi/profile_service.rb +2 -0
  19. data/lib/appnexusapi/publisher_resource.rb +2 -0
  20. data/lib/appnexusapi/publisher_service.rb +2 -0
  21. data/lib/appnexusapi/resource.rb +5 -4
  22. data/lib/appnexusapi/service.rb +16 -8
  23. data/lib/appnexusapi/site_resource.rb +2 -0
  24. data/lib/appnexusapi/site_service.rb +2 -0
  25. data/lib/appnexusapi/version.rb +1 -1
  26. data/spec/connection_spec.rb +13 -3
  27. data/spec/creative_service_spec.rb +33 -22
  28. data/spec/fixtures/vcr/advertiser_get.yml +108 -0
  29. data/spec/fixtures/vcr/campaign_life_cycle.yml +524 -0
  30. data/spec/fixtures/vcr/content_category_crud.yml +398 -0
  31. data/spec/fixtures/vcr/creative_service_create.yml +216 -0
  32. data/spec/fixtures/vcr/creative_service_delete.yml +354 -0
  33. data/spec/fixtures/vcr/creative_service_get.yml +214 -0
  34. data/spec/fixtures/vcr/creative_service_update.yml +266 -0
  35. data/spec/fixtures/vcr/domain_list_limits.yml +105 -0
  36. data/spec/fixtures/vcr/line_item_life_cycle.yml +521 -0
  37. data/spec/fixtures/vcr/member_get.yml +150 -0
  38. data/spec/fixtures/vcr/object_limit_info.yml +105 -0
  39. data/spec/fixtures/vcr/payment_rule_lifecycle.yml +346 -0
  40. data/spec/fixtures/vcr/placement_service_default_placement.yml +166 -0
  41. data/spec/fixtures/vcr/profile_life_cycle.yml +349 -0
  42. data/spec/fixtures/vcr/profile_limits.yml +105 -0
  43. data/spec/fixtures/vcr/publisher_crud.yml +282 -0
  44. data/spec/fixtures/vcr/site_lifecycle.yml +284 -0
  45. data/spec/fixtures/vcr/user_login.yml +107 -0
  46. data/spec/fixtures/vcr/user_update.yml +288 -0
  47. data/spec/integration/advertiser_spec.rb +11 -0
  48. data/spec/integration/campaign_spec.rb +38 -0
  49. data/spec/integration/content_category_spec.rb +22 -0
  50. data/spec/integration/line_item_spec.rb +27 -0
  51. data/spec/integration/member_spec.rb +9 -0
  52. data/spec/integration/payment_rule_spec.rb +33 -0
  53. data/spec/integration/placement_spec.rb +29 -0
  54. data/spec/integration/profile_spec.rb +29 -0
  55. data/spec/integration/publisher_spec.rb +20 -0
  56. data/spec/integration/site_spec.rb +32 -0
  57. data/spec/integration/user_spec.rb +42 -0
  58. data/spec/object_limit_service_spec.rb +14 -11
  59. data/spec/spec_helper.rb +52 -25
  60. data/spec/support/shared_contexts.rb +28 -0
  61. metadata +109 -3
@@ -0,0 +1,108 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api-test.appnexus.com/auth
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"auth":{"username":"<APPNEXUS_USERNAME>","password":"<APPNEXUS_PASSWORD>"}}'
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.11.0
12
+ Content-Type:
13
+ - application/json
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Cache-Control:
24
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
25
+ Content-Length:
26
+ - '699'
27
+ Content-Type:
28
+ - application/json
29
+ Date:
30
+ - Thu, 09 Feb 2017 02:17:46 GMT
31
+ Expires:
32
+ - Thu, 19 Nov 1981 08:52:00 GMT
33
+ Pragma:
34
+ - no-cache
35
+ Server:
36
+ - Apache
37
+ Set-Cookie:
38
+ - HBFAPI_SESSID=hbapi%3A171678%3A589bd14b4b9c6%3Anym2; Path=/
39
+ X-Route:
40
+ - "/auth"
41
+ X-Route-Time:
42
+ - '1282'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"response":{"status":"OK","token":"hbapi:171678:589bd14b4b9c6:nym2","dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","parent_dbg_info":{"instance":"01.api.test104169.nym2","slave_hit":false,"db":"master","awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"8ecef284-5dd2-5f05-b6ed-78f696b5b1c3","warnings":[],"time":686.65385246277,"start_microtime":1486606666.2813,"version":"1.17","output_term":"not_found"},"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"0c28a63f-9942-5fc6-9259-43c5f6c91b7f","warnings":[],"time":1270.2870368958,"start_microtime":1486606666.2567,"version":"1.17.202","slave_lag":1088207,"output_term":"not_found"}}}'
46
+ http_version:
47
+ recorded_at: Thu, 09 Feb 2017 02:17:46 GMT
48
+ - request:
49
+ method: get
50
+ uri: https://api-test.appnexus.com/advertiser?num_elements=1&start_element=0
51
+ body:
52
+ encoding: US-ASCII
53
+ string: ''
54
+ headers:
55
+ User-Agent:
56
+ - Faraday v0.11.0
57
+ Authorization:
58
+ - hbapi:171678:589bd14b4b9c6:nym2
59
+ Accept-Encoding:
60
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
61
+ Accept:
62
+ - "*/*"
63
+ response:
64
+ status:
65
+ code: 200
66
+ message: OK
67
+ headers:
68
+ Cache-Control:
69
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
70
+ Content-Length:
71
+ - '1719'
72
+ Content-Type:
73
+ - application/json
74
+ Date:
75
+ - Thu, 09 Feb 2017 02:17:49 GMT
76
+ Expires:
77
+ - Thu, 19 Nov 1981 08:52:00 GMT
78
+ Pragma:
79
+ - no-cache
80
+ Server:
81
+ - Apache
82
+ Set-Cookie:
83
+ - HBFAPI_SESSID=hbapi%3A171678%3A589bd14b4b9c6%3Anym2; Path=/
84
+ X-Count-Read:
85
+ - user:5,member:3,serviceHostUser:2,serviceHostMember:2,hostUser:3,hostMember:3,ip:0
86
+ X-Count-Write:
87
+ - user:0,member:0,serviceHostUser:0,serviceHostMember:0,hostUser:0,hostMember:0,ip:0
88
+ X-Ratelimit-Read:
89
+ - '1000'
90
+ X-Ratelimit-Service:
91
+ - 1000-Default
92
+ X-Ratelimit-System:
93
+ - 1000-Default
94
+ X-Ratelimit-Write:
95
+ - '1000'
96
+ X-Route:
97
+ - "/advertiser"
98
+ X-Route-Time:
99
+ - '31'
100
+ body:
101
+ encoding: UTF-8
102
+ string: '{"response":{"status":"OK","start_element":0,"num_elements":1,"advertisers":[{"id":595902,"code":null,"name":"Lumosity
103
+ US","state":"active","default_brand_id":947,"remarketing_segment_id":7358144,"profile_id":41598291,"control_pct":0,"timezone":"UTC","last_modified":"2016-12-14
104
+ 01:57:02","member_id":487,"billing_name":null,"billing_phone":null,"billing_address1":null,"billing_address2":null,"billing_city":null,"billing_state":null,"billing_country":null,"billing_zip":null,"default_currency":"USD","use_insertion_orders":true,"time_format":"12-hour","is_malicious":false,"is_mediated":false,"billing_internal_user":null,"default_category":{"id":9,"name":"Education"},"default_brand":{"id":947,"name":"Lumos
105
+ Labs Inc","category_id":9},"labels":null,"competitive_brands":null,"competitive_categories":null,"thirdparty_pixels":null,"macros":null,"lifetime_budget":null,"lifetime_budget_imps":null,"daily_budget":null,"daily_budget_imps":null,"enable_pacing":null,"allow_safety_pacing":null,"lifetime_pacing":null,"lifetime_pacing_span":null,"lifetime_pacing_pct":null}],"count":1,"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","user::reads":5,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":0,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":3,"read_limit":1000,"read_limit_seconds":60,"writes":0,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":true,"uuid":"e43149a7-df62-5f74-aab6-56ddc90e44b5","warnings":[],"time":21.543979644775,"start_microtime":1486606669.1577,"version":"1.17.202","slave_miss":"no_slaves_found","slave_lag":1088210,"member_last_modified_age":290,"output_term":"advertisers"}}}'
106
+ http_version:
107
+ recorded_at: Thu, 09 Feb 2017 02:17:47 GMT
108
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,524 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api-test.appnexus.com/auth
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"auth":{"username":"<APPNEXUS_USERNAME>","password":"<APPNEXUS_PASSWORD>"}}'
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.11.0
12
+ Content-Type:
13
+ - application/json
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Cache-Control:
24
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
25
+ Content-Length:
26
+ - '697'
27
+ Content-Type:
28
+ - application/json
29
+ Date:
30
+ - Wed, 08 Feb 2017 12:58:39 GMT
31
+ Expires:
32
+ - Thu, 19 Nov 1981 08:52:00 GMT
33
+ Pragma:
34
+ - no-cache
35
+ Server:
36
+ - Apache
37
+ Set-Cookie:
38
+ - HBFAPI_SESSID=hbapi%3A171678%3A589b1600d434b%3Anym2; Path=/
39
+ X-Route:
40
+ - "/auth"
41
+ X-Route-Time:
42
+ - '1385'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"response":{"status":"OK","token":"hbapi:171678:589b1600d434b:nym2","dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","parent_dbg_info":{"instance":"01.api.test104169.nym2","slave_hit":false,"db":"master","awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"911d09ca-b262-54b4-8ee1-c38825d96203","warnings":[],"time":798.09713363647,"start_microtime":1486558719.74,"version":"1.17","output_term":"not_found"},"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"e1c9b38a-c6d2-527f-88d4-5ec43f926cd0","warnings":[],"time":1371.2739944458,"start_microtime":1486558719.7163,"version":"1.17.202","slave_lag":1040260,"output_term":"not_found"}}}'
46
+ http_version:
47
+ recorded_at: Wed, 08 Feb 2017 12:58:39 GMT
48
+ - request:
49
+ method: post
50
+ uri: https://api-test.appnexus.com/advertiser
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"advertiser":{"name":"rspec advertiser"}}'
54
+ headers:
55
+ User-Agent:
56
+ - Faraday v0.11.0
57
+ Authorization:
58
+ - hbapi:171678:589b1600d434b:nym2
59
+ Content-Type:
60
+ - application/json
61
+ Accept-Encoding:
62
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
63
+ Accept:
64
+ - "*/*"
65
+ response:
66
+ status:
67
+ code: 200
68
+ message: OK
69
+ headers:
70
+ Cache-Control:
71
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
72
+ Content-Length:
73
+ - '1645'
74
+ Content-Type:
75
+ - application/json
76
+ Date:
77
+ - Wed, 08 Feb 2017 12:58:41 GMT
78
+ Expires:
79
+ - Thu, 19 Nov 1981 08:52:00 GMT
80
+ Pragma:
81
+ - no-cache
82
+ Server:
83
+ - Apache
84
+ Set-Cookie:
85
+ - HBFAPI_SESSID=hbapi%3A171678%3A589b1600d434b%3Anym2; Path=/
86
+ X-Count-Read:
87
+ - user:13,member:6,serviceHostUser:2,serviceHostMember:2,hostUser:3,hostMember:3,ip:0
88
+ X-Count-Write:
89
+ - user:14,member:14,serviceHostUser:9,serviceHostMember:9,hostUser:9,hostMember:9,ip:0
90
+ X-Ratelimit-Read:
91
+ - '1000'
92
+ X-Ratelimit-Service:
93
+ - 1000-Default
94
+ X-Ratelimit-System:
95
+ - 1000-Default
96
+ X-Ratelimit-Write:
97
+ - '1000'
98
+ X-Route:
99
+ - "/advertiser"
100
+ X-Route-Time:
101
+ - '311'
102
+ body:
103
+ encoding: UTF-8
104
+ string: '{"response":{"status":"OK","count":1,"id":1561321,"start_element":0,"num_elements":100,"advertiser":{"id":1561321,"code":null,"name":"rspec
105
+ advertiser","state":"active","default_brand_id":null,"remarketing_segment_id":null,"profile_id":null,"control_pct":0,"timezone":"EST5EDT","last_modified":"2017-02-08
106
+ 12:58:41","member_id":487,"billing_name":null,"billing_phone":null,"billing_address1":null,"billing_address2":null,"billing_city":null,"billing_state":null,"billing_country":null,"billing_zip":null,"default_currency":"USD","use_insertion_orders":false,"time_format":"12-hour","is_malicious":false,"is_mediated":false,"billing_internal_user":null,"default_category":null,"default_brand":null,"labels":null,"competitive_brands":null,"competitive_categories":null,"thirdparty_pixels":null,"macros":null,"lifetime_budget":null,"lifetime_budget_imps":null,"daily_budget":null,"daily_budget_imps":null,"enable_pacing":null,"allow_safety_pacing":null,"lifetime_pacing":null,"lifetime_pacing_span":null,"lifetime_pacing_pct":null},"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","user::reads":13,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":14,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":6,"read_limit":1000,"read_limit_seconds":60,"writes":14,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":true,"uuid":"9abed4ea-7cf8-5ff0-b0f4-3ed5c2f8d7c4","warnings":[],"time":292.89197921753,"start_microtime":1486558721.4868,"version":"1.17.202","slave_lag":1040260,"member_last_modified_age":1486558721,"output_term":"advertiser"}}}'
107
+ http_version:
108
+ recorded_at: Wed, 08 Feb 2017 12:58:40 GMT
109
+ - request:
110
+ method: post
111
+ uri: https://api-test.appnexus.com/profile?advertiser_id=1561321
112
+ body:
113
+ encoding: UTF-8
114
+ string: '{"profile":{"code":"spec_profile_code","description":"Targeting only
115
+ the US","country_targets":[{"id":233}],"country_action":"include"}}'
116
+ headers:
117
+ User-Agent:
118
+ - Faraday v0.11.0
119
+ Authorization:
120
+ - hbapi:171678:589b1600d434b:nym2
121
+ Content-Type:
122
+ - application/json
123
+ Accept-Encoding:
124
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
125
+ Accept:
126
+ - "*/*"
127
+ response:
128
+ status:
129
+ code: 200
130
+ message: OK
131
+ headers:
132
+ Cache-Control:
133
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
134
+ Content-Length:
135
+ - '3716'
136
+ Content-Type:
137
+ - application/json
138
+ Date:
139
+ - Wed, 08 Feb 2017 12:58:42 GMT
140
+ Expires:
141
+ - Thu, 19 Nov 1981 08:52:00 GMT
142
+ Pragma:
143
+ - no-cache
144
+ Server:
145
+ - Apache
146
+ Set-Cookie:
147
+ - HBFAPI_SESSID=hbapi%3A171678%3A589b1600d434b%3Anym2; Path=/
148
+ X-Count-Read:
149
+ - user:13,member:6,serviceHostUser:0,serviceHostMember:0,hostUser:3,hostMember:3,ip:0
150
+ X-Count-Write:
151
+ - user:15,member:15,serviceHostUser:1,serviceHostMember:1,hostUser:10,hostMember:10,ip:0
152
+ X-Ratelimit-Read:
153
+ - '1000'
154
+ X-Ratelimit-Service:
155
+ - 1000-Default
156
+ X-Ratelimit-System:
157
+ - 1000-Default
158
+ X-Ratelimit-Write:
159
+ - '1000'
160
+ X-Route:
161
+ - "/profile"
162
+ X-Route-Time:
163
+ - '573'
164
+ body:
165
+ encoding: UTF-8
166
+ string: '{"response":{"status":"OK","count":1,"id":75364289,"start_element":0,"num_elements":100,"profile":{"id":75364289,"code":"spec_profile_code","description":"Targeting
167
+ only the US","country_action":"include","region_action":"exclude","city_action":"exclude","browser_action":"exclude","use_inventory_attribute_targets":false,"last_modified":"2017-02-08
168
+ 12:58:42","daypart_timezone":null,"dma_action":"exclude","domain_action":"exclude","domain_list_action":"exclude","inventory_action":"exclude","language_action":"exclude","segment_boolean_operator":"and","min_session_imps":null,"session_freq_type":"platform","carrier_action":"exclude","supply_type_action":"exclude","device_type_action":"exclude","screen_size_action":"exclude","device_model_action":"exclude","location_target_radius":null,"location_target_latitude":null,"location_target_longitude":null,"querystring_action":"exclude","querystring_boolean_operator":"and","is_expired":false,"non_audited_url_action":"include","optimization_zone_action":"exclude","advertiser_id":1561321,"publisher_id":null,"max_session_imps":null,"max_day_imps":null,"max_lifetime_imps":null,"max_page_imps":null,"min_minutes_per_imp":null,"venue_action":"exclude","operating_system_action":"exclude","require_cookie_for_freq_cap":true,"trust":"seller","allow_unaudited":false,"is_template":false,"created_on":"2017-02-08
169
+ 12:58:42","operating_system_family_action":"exclude","use_operating_system_extended_targeting":false,"mobile_app_instance_action_include":false,"mobile_app_instance_list_action_include":false,"certified_supply":false,"inventory_prefer_direct":false,"deal_action_include":true,"user_group_targets":null,"country_targets":[{"id":233,"name":"United
170
+ States","code":"US","active":true}],"region_targets":null,"city_targets":null,"inventory_attribute_targets":null,"age_targets":null,"daypart_targets":null,"browser_targets":null,"dma_targets":null,"domain_targets":null,"domain_list_targets":null,"language_targets":null,"size_targets":null,"zip_targets":null,"member_targets":null,"video_targets":{"allow_unknown_playback_method":false,"allow_unknown_context":false,"allow_unknown_player_size":false},"engagement_rate_targets":null,"segment_group_targets":null,"carrier_targets":null,"supply_type_targets":null,"device_type_targets":null,"screen_size_targets":null,"device_model_targets":null,"querystring_targets":null,"gender_targets":null,"intended_audience_targets":null,"inventory_network_resold_targets":null,"operating_system_targets":null,"operating_system_family_targets":null,"position_targets":null,"site_targets":null,"venue_targets":null,"operating_system_extended_targets":null,"optimization_zone_targets":null,"postal_code_targets":null,"seller_member_group_targets":null,"cross_device":null,"key_value_targets":null,"content_category_targets":null,"deal_targets":null,"placement_targets":null,"platform_content_category_targets":null,"platform_placement_targets":null,"platform_publisher_targets":null,"publisher_targets":null,"ip_range_list_targets":null,"mobile_app_instance_targets":null,"mobile_app_instance_list_targets":null},"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","user::reads":13,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":15,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":6,"read_limit":1000,"read_limit_seconds":60,"writes":15,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"41b59bab-98c4-5241-97ed-6587de850cef","warnings":[],"time":552.89483070374,"start_microtime":1486558722.2543,"version":"1.17.202","slave_lag":1040260,"member_last_modified_age":1486558722,"output_term":"profile"}}}'
171
+ http_version:
172
+ recorded_at: Wed, 08 Feb 2017 12:58:41 GMT
173
+ - request:
174
+ method: post
175
+ uri: https://api-test.appnexus.com/line-item?advertiser_id=1561321
176
+ body:
177
+ encoding: UTF-8
178
+ string: '{"line-item":{"name":"some line item","code":"spec_line_code"}}'
179
+ headers:
180
+ User-Agent:
181
+ - Faraday v0.11.0
182
+ Authorization:
183
+ - hbapi:171678:589b1600d434b:nym2
184
+ Content-Type:
185
+ - application/json
186
+ Accept-Encoding:
187
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
188
+ Accept:
189
+ - "*/*"
190
+ response:
191
+ status:
192
+ code: 200
193
+ message: OK
194
+ headers:
195
+ Cache-Control:
196
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
197
+ Content-Length:
198
+ - '2175'
199
+ Content-Type:
200
+ - application/json
201
+ Date:
202
+ - Wed, 08 Feb 2017 12:58:43 GMT
203
+ Expires:
204
+ - Thu, 19 Nov 1981 08:52:00 GMT
205
+ Pragma:
206
+ - no-cache
207
+ Server:
208
+ - Apache
209
+ Set-Cookie:
210
+ - HBFAPI_SESSID=hbapi%3A171678%3A589b1600d434b%3Anym2; Path=/
211
+ X-Count-Read:
212
+ - user:13,member:6,serviceHostUser:0,serviceHostMember:0,hostUser:3,hostMember:3,ip:0
213
+ X-Count-Write:
214
+ - user:16,member:16,serviceHostUser:1,serviceHostMember:1,hostUser:11,hostMember:11,ip:0
215
+ X-Ratelimit-Read:
216
+ - '1000'
217
+ X-Ratelimit-Service:
218
+ - 1000-Default
219
+ X-Ratelimit-System:
220
+ - 1000-Default
221
+ X-Ratelimit-Write:
222
+ - '1000'
223
+ X-Route:
224
+ - "/line-item"
225
+ X-Route-Time:
226
+ - '331'
227
+ body:
228
+ encoding: UTF-8
229
+ string: '{"response":{"status":"OK","count":1,"id":3764156,"start_element":0,"num_elements":100,"line-item":{"id":3764156,"code":"spec_line_code","name":"some
230
+ line item","advertiser_id":1561321,"state":"active","start_date":null,"end_date":null,"timezone":"EST5EDT","discrepancy_pct":0,"publishers_allowed":"all","revenue_value":0,"revenue_type":"cpm","goal_type":"none","goal_value":null,"last_modified":"2017-02-08
231
+ 12:58:43","click_url":null,"currency":"USD","require_cookie_for_tracking":true,"profile_id":null,"member_id":487,"flat_fee_type":null,"comments":null,"remaining_days":null,"total_days":null,"manage_creative":false,"creative_distribution_type":null,"line_item_type":"standard_v1","prefer_delivery_over_performance":false,"advertiser":{"id":1561321,"name":"rspec
232
+ advertiser"},"flat_fee":null,"delivery_goal":null,"labels":null,"broker_fees":null,"pixels":null,"insertion_orders":null,"goal_pixels":null,"imptrackers":null,"clicktrackers":null,"campaigns":null,"valuation":{"performance_offer":false,"performance_mkt_managed":false,"performance_mkt_crossnet":false},"creatives":null,"budget_intervals":null,"click_model":null,"expected_value_model":null,"custom_models":null,"inventory_discovery":null,"inventory_discovery_budget":null,"incrementality":null,"auction_event":null,"custom_optimization_note":null,"lifetime_budget":null,"lifetime_budget_imps":null,"daily_budget":null,"daily_budget_imps":null,"enable_pacing":null,"allow_safety_pacing":null,"lifetime_pacing":null,"lifetime_pacing_span":null,"lifetime_pacing_pct":null,"payout_margin":null},"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","user::reads":13,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":16,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":6,"read_limit":1000,"read_limit_seconds":60,"writes":16,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":true,"uuid":"6e872645-e47d-5f1d-b7fa-d09b14284e70","warnings":[],"time":310.69493293762,"start_microtime":1486558723.3382,"version":"1.17.202","slave_lag":1040260,"member_last_modified_age":1486558723,"output_term":"line-item"}}}'
233
+ http_version:
234
+ recorded_at: Wed, 08 Feb 2017 12:58:41 GMT
235
+ - request:
236
+ method: post
237
+ uri: https://api-test.appnexus.com/campaign?advertiser_id=1561321
238
+ body:
239
+ encoding: UTF-8
240
+ string: '{"campaign":{"name":"campaign name","code":"codecode","line_item_id":3764156,"inventory_type":"direct","profile_id":75364289}}'
241
+ headers:
242
+ User-Agent:
243
+ - Faraday v0.11.0
244
+ Authorization:
245
+ - hbapi:171678:589b1600d434b:nym2
246
+ Content-Type:
247
+ - application/json
248
+ Accept-Encoding:
249
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
250
+ Accept:
251
+ - "*/*"
252
+ response:
253
+ status:
254
+ code: 200
255
+ message: OK
256
+ headers:
257
+ Cache-Control:
258
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
259
+ Content-Length:
260
+ - '2197'
261
+ Content-Type:
262
+ - application/json
263
+ Date:
264
+ - Wed, 08 Feb 2017 12:58:44 GMT
265
+ Expires:
266
+ - Thu, 19 Nov 1981 08:52:00 GMT
267
+ Pragma:
268
+ - no-cache
269
+ Server:
270
+ - Apache
271
+ Set-Cookie:
272
+ - HBFAPI_SESSID=hbapi%3A171678%3A589b1600d434b%3Anym2; Path=/
273
+ X-Count-Read:
274
+ - user:13,member:6,serviceHostUser:0,serviceHostMember:0,hostUser:3,hostMember:3,ip:0
275
+ X-Count-Write:
276
+ - user:17,member:17,serviceHostUser:1,serviceHostMember:1,hostUser:12,hostMember:12,ip:0
277
+ X-Ratelimit-Read:
278
+ - '1000'
279
+ X-Ratelimit-Service:
280
+ - 1000-Default
281
+ X-Ratelimit-System:
282
+ - 1000-Default
283
+ X-Ratelimit-Write:
284
+ - '1000'
285
+ X-Route:
286
+ - "/campaign"
287
+ X-Route-Time:
288
+ - '527'
289
+ body:
290
+ encoding: UTF-8
291
+ string: '{"response":{"status":"OK","count":1,"id":15720224,"start_element":0,"num_elements":100,"campaign":{"id":15720224,"state":"active","code":"codecode","advertiser_id":1561321,"line_item_id":3764156,"creative_id":null,"pixel_id":null,"short_name":null,"name":"campaign
292
+ name","profile_id":75364289,"start_date":null,"end_date":null,"timezone":"EST5EDT","priority":5,"cadence_modifier_enabled":false,"cpc_goal":null,"cpm_bid_type":"margin","base_bid":null,"min_bid":null,"max_bid":null,"bid_margin":0,"roadblock_creatives":false,"roadblock_type":"no_roadblock","inventory_type":"direct","last_modified":"2017-02-08
293
+ 12:58:44","max_learn_bid":null,"cadence_type":"advertiser","member_id":487,"click_url":null,"require_cookie_for_tracking":true,"allow_unverified_ecp":false,"defer_to_li_prediction":false,"ecp_learn_divisor":null,"projected_learn_events":null,"learn_threshold":3,"cpc_payout":null,"comments":null,"optimization_version":"v7","learn_override_type":null,"base_cpm_bid_value":null,"impression_limit":40000,"bid_multiplier":1,"remaining_days":null,"total_days":null,"campaign_type":"default","creative_distribution_type":null,"supply_type_action":"exclude","supply_type":null,"creatives":null,"pixels":null,"optimization_lookback":null,"campaign_modifiers":null,"labels":null,"broker_fees":null,"valuation":null,"bid_model":null,"bid_modifier_model":null,"lifetime_budget":null,"lifetime_budget_imps":null,"daily_budget":null,"daily_budget_imps":null,"enable_pacing":null,"allow_safety_pacing":null,"lifetime_pacing":null,"lifetime_pacing_span":null,"lifetime_pacing_pct":null},"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","user::reads":13,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":17,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":6,"read_limit":1000,"read_limit_seconds":60,"writes":17,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":true,"uuid":"719b4aeb-9f98-5bd7-b522-c0f54e38fcb3","warnings":[],"time":505.71894645691,"start_microtime":1486558724.0474,"version":"1.17.202","slave_lag":1040260,"member_last_modified_age":1486558724,"output_term":"campaign"}}}'
294
+ http_version:
295
+ recorded_at: Wed, 08 Feb 2017 12:58:42 GMT
296
+ - request:
297
+ method: delete
298
+ uri: https://api-test.appnexus.com/campaign?advertiser_id=1561321&id=15720224
299
+ body:
300
+ encoding: US-ASCII
301
+ string: ''
302
+ headers:
303
+ User-Agent:
304
+ - Faraday v0.11.0
305
+ Authorization:
306
+ - hbapi:171678:589b1600d434b:nym2
307
+ Accept-Encoding:
308
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
309
+ Accept:
310
+ - "*/*"
311
+ response:
312
+ status:
313
+ code: 200
314
+ message: OK
315
+ headers:
316
+ Cache-Control:
317
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
318
+ Content-Length:
319
+ - '698'
320
+ Content-Type:
321
+ - application/json
322
+ Date:
323
+ - Wed, 08 Feb 2017 12:58:44 GMT
324
+ Expires:
325
+ - Thu, 19 Nov 1981 08:52:00 GMT
326
+ Pragma:
327
+ - no-cache
328
+ Server:
329
+ - Apache
330
+ Set-Cookie:
331
+ - HBFAPI_SESSID=hbapi%3A171678%3A589b1600d434b%3Anym2; Path=/
332
+ X-Count-Read:
333
+ - user:13,member:6,serviceHostUser:0,serviceHostMember:0,hostUser:3,hostMember:3,ip:0
334
+ X-Count-Write:
335
+ - user:18,member:18,serviceHostUser:2,serviceHostMember:2,hostUser:13,hostMember:13,ip:0
336
+ X-Ratelimit-Read:
337
+ - '1000'
338
+ X-Ratelimit-Service:
339
+ - 1000-Default
340
+ X-Ratelimit-System:
341
+ - 1000-Default
342
+ X-Ratelimit-Write:
343
+ - '1000'
344
+ X-Route:
345
+ - "/campaign"
346
+ X-Route-Time:
347
+ - '210'
348
+ body:
349
+ encoding: UTF-8
350
+ string: '{"response":{"status":"OK","count":1,"start_element":null,"num_elements":null,"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":true,"db":"10.3.204.17","user::reads":13,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":18,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":6,"read_limit":1000,"read_limit_seconds":60,"writes":18,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"d7a89821-f3bc-5c9a-9cd5-d2941463d8d2","warnings":[],"time":192.72398948669,"start_microtime":1486558724.9666,"version":"1.17.202","slave_lag":1040260,"member_last_modified_age":1486558724,"output_term":"not_found"}}}'
351
+ http_version:
352
+ recorded_at: Wed, 08 Feb 2017 12:58:43 GMT
353
+ - request:
354
+ method: delete
355
+ uri: https://api-test.appnexus.com/line-item?advertiser_id=1561321&id=3764156
356
+ body:
357
+ encoding: US-ASCII
358
+ string: ''
359
+ headers:
360
+ User-Agent:
361
+ - Faraday v0.11.0
362
+ Authorization:
363
+ - hbapi:171678:589b1600d434b:nym2
364
+ Accept-Encoding:
365
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
366
+ Accept:
367
+ - "*/*"
368
+ response:
369
+ status:
370
+ code: 200
371
+ message: OK
372
+ headers:
373
+ Cache-Control:
374
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
375
+ Content-Length:
376
+ - '698'
377
+ Content-Type:
378
+ - application/json
379
+ Date:
380
+ - Wed, 08 Feb 2017 12:58:45 GMT
381
+ Expires:
382
+ - Thu, 19 Nov 1981 08:52:00 GMT
383
+ Pragma:
384
+ - no-cache
385
+ Server:
386
+ - Apache
387
+ Set-Cookie:
388
+ - HBFAPI_SESSID=hbapi%3A171678%3A589b1600d434b%3Anym2; Path=/
389
+ X-Count-Read:
390
+ - user:13,member:6,serviceHostUser:0,serviceHostMember:0,hostUser:3,hostMember:3,ip:0
391
+ X-Count-Write:
392
+ - user:19,member:19,serviceHostUser:2,serviceHostMember:2,hostUser:14,hostMember:14,ip:0
393
+ X-Ratelimit-Read:
394
+ - '1000'
395
+ X-Ratelimit-Service:
396
+ - 1000-Default
397
+ X-Ratelimit-System:
398
+ - 1000-Default
399
+ X-Ratelimit-Write:
400
+ - '1000'
401
+ X-Route:
402
+ - "/line-item"
403
+ X-Route-Time:
404
+ - '226'
405
+ body:
406
+ encoding: UTF-8
407
+ string: '{"response":{"status":"OK","count":1,"start_element":null,"num_elements":null,"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":true,"db":"10.3.204.17","user::reads":13,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":19,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":6,"read_limit":1000,"read_limit_seconds":60,"writes":19,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"2af58cf9-b69b-50c1-85cf-6eb1959c49ca","warnings":[],"time":208.77289772034,"start_microtime":1486558725.5548,"version":"1.17.202","slave_lag":1040268,"member_last_modified_age":1486558725,"output_term":"not_found"}}}'
408
+ http_version:
409
+ recorded_at: Wed, 08 Feb 2017 12:58:43 GMT
410
+ - request:
411
+ method: delete
412
+ uri: https://api-test.appnexus.com/profile?advertiser_id=1561321&id=75364289
413
+ body:
414
+ encoding: US-ASCII
415
+ string: ''
416
+ headers:
417
+ User-Agent:
418
+ - Faraday v0.11.0
419
+ Authorization:
420
+ - hbapi:171678:589b1600d434b:nym2
421
+ Accept-Encoding:
422
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
423
+ Accept:
424
+ - "*/*"
425
+ response:
426
+ status:
427
+ code: 200
428
+ message: OK
429
+ headers:
430
+ Cache-Control:
431
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
432
+ Content-Length:
433
+ - '694'
434
+ Content-Type:
435
+ - application/json
436
+ Date:
437
+ - Wed, 08 Feb 2017 12:58:46 GMT
438
+ Expires:
439
+ - Thu, 19 Nov 1981 08:52:00 GMT
440
+ Pragma:
441
+ - no-cache
442
+ Server:
443
+ - Apache
444
+ Set-Cookie:
445
+ - HBFAPI_SESSID=hbapi%3A171678%3A589b1600d434b%3Anym2; Path=/
446
+ X-Count-Read:
447
+ - user:13,member:6,serviceHostUser:0,serviceHostMember:0,hostUser:3,hostMember:3,ip:0
448
+ X-Count-Write:
449
+ - user:20,member:20,serviceHostUser:2,serviceHostMember:2,hostUser:15,hostMember:15,ip:0
450
+ X-Ratelimit-Read:
451
+ - '1000'
452
+ X-Ratelimit-Service:
453
+ - 1000-Default
454
+ X-Ratelimit-System:
455
+ - 1000-Default
456
+ X-Ratelimit-Write:
457
+ - '1000'
458
+ X-Route:
459
+ - "/profile"
460
+ X-Route-Time:
461
+ - '246'
462
+ body:
463
+ encoding: UTF-8
464
+ string: '{"response":{"status":"OK","count":1,"start_element":0,"num_elements":100,"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":true,"db":"10.3.204.17","user::reads":13,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":20,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":6,"read_limit":1000,"read_limit_seconds":60,"writes":20,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"6b305278-6e32-53e8-a31d-76330f781056","warnings":[],"time":228.87992858887,"start_microtime":1486558726.1404,"version":"1.17.202","slave_lag":1040268,"member_last_modified_age":1486558726,"output_term":"not_found"}}}'
465
+ http_version:
466
+ recorded_at: Wed, 08 Feb 2017 12:58:44 GMT
467
+ - request:
468
+ method: delete
469
+ uri: https://api-test.appnexus.com/advertiser?id=1561321
470
+ body:
471
+ encoding: US-ASCII
472
+ string: ''
473
+ headers:
474
+ User-Agent:
475
+ - Faraday v0.11.0
476
+ Authorization:
477
+ - hbapi:171678:589b1600d434b:nym2
478
+ Accept-Encoding:
479
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
480
+ Accept:
481
+ - "*/*"
482
+ response:
483
+ status:
484
+ code: 200
485
+ message: OK
486
+ headers:
487
+ Cache-Control:
488
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
489
+ Content-Length:
490
+ - '698'
491
+ Content-Type:
492
+ - application/json
493
+ Date:
494
+ - Wed, 08 Feb 2017 12:58:46 GMT
495
+ Expires:
496
+ - Thu, 19 Nov 1981 08:52:00 GMT
497
+ Pragma:
498
+ - no-cache
499
+ Server:
500
+ - Apache
501
+ Set-Cookie:
502
+ - HBFAPI_SESSID=hbapi%3A171678%3A589b1600d434b%3Anym2; Path=/
503
+ X-Count-Read:
504
+ - user:13,member:6,serviceHostUser:2,serviceHostMember:2,hostUser:3,hostMember:3,ip:0
505
+ X-Count-Write:
506
+ - user:21,member:21,serviceHostUser:10,serviceHostMember:10,hostUser:16,hostMember:16,ip:0
507
+ X-Ratelimit-Read:
508
+ - '1000'
509
+ X-Ratelimit-Service:
510
+ - 1000-Default
511
+ X-Ratelimit-System:
512
+ - 1000-Default
513
+ X-Ratelimit-Write:
514
+ - '1000'
515
+ X-Route:
516
+ - "/advertiser"
517
+ X-Route-Time:
518
+ - '1147'
519
+ body:
520
+ encoding: UTF-8
521
+ string: '{"response":{"status":"OK","count":1,"start_element":null,"num_elements":null,"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":true,"db":"10.3.204.17","user::reads":13,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":21,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":6,"read_limit":1000,"read_limit_seconds":60,"writes":21,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"a7491fa4-8145-529d-950b-61af4f89847f","warnings":[],"time":1130.7418346405,"start_microtime":1486558726.8189,"version":"1.17.202","slave_lag":1040269,"member_last_modified_age":1486558726,"output_term":"not_found"}}}'
522
+ http_version:
523
+ recorded_at: Wed, 08 Feb 2017 12:58:46 GMT
524
+ recorded_with: VCR 3.0.3