appnexusapi 0.1.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +33 -4
- data/UPGRADING.md +10 -0
- data/appnexusapi.gemspec +2 -0
- data/env_example +1 -3
- data/lib/appnexusapi/advertiser_resource.rb +2 -0
- data/lib/appnexusapi/advertiser_service.rb +2 -0
- data/lib/appnexusapi/campaign_resource.rb +2 -0
- data/lib/appnexusapi/campaign_service.rb +2 -0
- data/lib/appnexusapi/connection.rb +19 -5
- data/lib/appnexusapi/content_category_service.rb +3 -1
- data/lib/appnexusapi/creative_service.rb +0 -10
- data/lib/appnexusapi/payment_rule_resource.rb +2 -0
- data/lib/appnexusapi/payment_rule_service.rb +2 -0
- data/lib/appnexusapi/placement_resource.rb +2 -0
- data/lib/appnexusapi/placement_service.rb +2 -0
- data/lib/appnexusapi/profile_resource.rb +2 -0
- data/lib/appnexusapi/profile_service.rb +2 -0
- data/lib/appnexusapi/publisher_resource.rb +2 -0
- data/lib/appnexusapi/publisher_service.rb +2 -0
- data/lib/appnexusapi/resource.rb +5 -4
- data/lib/appnexusapi/service.rb +16 -8
- data/lib/appnexusapi/site_resource.rb +2 -0
- data/lib/appnexusapi/site_service.rb +2 -0
- data/lib/appnexusapi/version.rb +1 -1
- data/spec/connection_spec.rb +13 -3
- data/spec/creative_service_spec.rb +33 -22
- data/spec/fixtures/vcr/advertiser_get.yml +108 -0
- data/spec/fixtures/vcr/campaign_life_cycle.yml +524 -0
- data/spec/fixtures/vcr/content_category_crud.yml +398 -0
- data/spec/fixtures/vcr/creative_service_create.yml +216 -0
- data/spec/fixtures/vcr/creative_service_delete.yml +354 -0
- data/spec/fixtures/vcr/creative_service_get.yml +214 -0
- data/spec/fixtures/vcr/creative_service_update.yml +266 -0
- data/spec/fixtures/vcr/domain_list_limits.yml +105 -0
- data/spec/fixtures/vcr/line_item_life_cycle.yml +521 -0
- data/spec/fixtures/vcr/member_get.yml +150 -0
- data/spec/fixtures/vcr/object_limit_info.yml +105 -0
- data/spec/fixtures/vcr/payment_rule_lifecycle.yml +346 -0
- data/spec/fixtures/vcr/placement_service_default_placement.yml +166 -0
- data/spec/fixtures/vcr/profile_life_cycle.yml +349 -0
- data/spec/fixtures/vcr/profile_limits.yml +105 -0
- data/spec/fixtures/vcr/publisher_crud.yml +282 -0
- data/spec/fixtures/vcr/site_lifecycle.yml +284 -0
- data/spec/fixtures/vcr/user_login.yml +107 -0
- data/spec/fixtures/vcr/user_update.yml +288 -0
- data/spec/integration/advertiser_spec.rb +11 -0
- data/spec/integration/campaign_spec.rb +38 -0
- data/spec/integration/content_category_spec.rb +22 -0
- data/spec/integration/line_item_spec.rb +27 -0
- data/spec/integration/member_spec.rb +9 -0
- data/spec/integration/payment_rule_spec.rb +33 -0
- data/spec/integration/placement_spec.rb +29 -0
- data/spec/integration/profile_spec.rb +29 -0
- data/spec/integration/publisher_spec.rb +20 -0
- data/spec/integration/site_spec.rb +32 -0
- data/spec/integration/user_spec.rb +42 -0
- data/spec/object_limit_service_spec.rb +14 -11
- data/spec/spec_helper.rb +52 -25
- data/spec/support/shared_contexts.rb +28 -0
- metadata +109 -3
@@ -0,0 +1,398 @@
|
|
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
|
+
- Wed, 08 Feb 2017 12:58:48 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%3A589b1609cb274%3Anym2; Path=/
|
39
|
+
X-Route:
|
40
|
+
- "/auth"
|
41
|
+
X-Route-Time:
|
42
|
+
- '1592'
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"response":{"status":"OK","token":"hbapi:171678:589b1609cb274: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":"3d1e0e02-f71a-5807-bdf5-0479ef48121d","warnings":[],"time":997.15304374695,"start_microtime":1486558728.4975,"version":"1.17","output_term":"not_found"},"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"95b19dd0-f70f-5e9f-a2f6-d1469920c6a4","warnings":[],"time":1578.1240463257,"start_microtime":1486558728.4727,"version":"1.17.202","slave_lag":1040269,"output_term":"not_found"}}}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 08 Feb 2017 12:58:48 GMT
|
48
|
+
- request:
|
49
|
+
method: post
|
50
|
+
uri: https://api-test.appnexus.com/content-category
|
51
|
+
body:
|
52
|
+
encoding: UTF-8
|
53
|
+
string: '{"content-category":{"name":"rspec_content_category"}}'
|
54
|
+
headers:
|
55
|
+
User-Agent:
|
56
|
+
- Faraday v0.11.0
|
57
|
+
Authorization:
|
58
|
+
- hbapi:171678:589b1609cb274: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
|
+
- '916'
|
74
|
+
Content-Type:
|
75
|
+
- application/json
|
76
|
+
Date:
|
77
|
+
- Wed, 08 Feb 2017 12:58:50 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%3A589b1609cb274%3Anym2; Path=/
|
86
|
+
X-Count-Read:
|
87
|
+
- user:14,member:6,serviceHostUser:0,serviceHostMember:0,hostUser:3,hostMember:3,ip:0
|
88
|
+
X-Count-Write:
|
89
|
+
- user:22,member:22,serviceHostUser:1,serviceHostMember:1,hostUser:17,hostMember:17,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
|
+
- "/content-category"
|
100
|
+
X-Route-Time:
|
101
|
+
- '270'
|
102
|
+
body:
|
103
|
+
encoding: UTF-8
|
104
|
+
string: '{"response":{"status":"OK","count":1,"id":46956,"start_element":0,"num_elements":100,"content-category":{"id":46956,"name":"rspec_content_category","description":null,"is_system":false,"last_modified":"2017-02-08
|
105
|
+
12:58:50","type":"standard","member_id":487,"code":null,"parent_category":null},"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","user::reads":14,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":22,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":6,"read_limit":1000,"read_limit_seconds":60,"writes":22,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"b894604d-442c-51a4-af29-d060e2bbe007","warnings":[],"time":254.33492660522,"start_microtime":1486558730.4919,"version":"1.17.202","slave_lag":1040269,"member_last_modified_age":1486558730,"output_term":"content-category"}}}'
|
106
|
+
http_version:
|
107
|
+
recorded_at: Wed, 08 Feb 2017 12:58:49 GMT
|
108
|
+
- request:
|
109
|
+
method: get
|
110
|
+
uri: https://api-test.appnexus.com/content-category?id=46956&num_elements=100&start_element=0
|
111
|
+
body:
|
112
|
+
encoding: US-ASCII
|
113
|
+
string: ''
|
114
|
+
headers:
|
115
|
+
User-Agent:
|
116
|
+
- Faraday v0.11.0
|
117
|
+
Authorization:
|
118
|
+
- hbapi:171678:589b1609cb274:nym2
|
119
|
+
Accept-Encoding:
|
120
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
121
|
+
Accept:
|
122
|
+
- "*/*"
|
123
|
+
response:
|
124
|
+
status:
|
125
|
+
code: 200
|
126
|
+
message: OK
|
127
|
+
headers:
|
128
|
+
Cache-Control:
|
129
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
|
130
|
+
Content-Length:
|
131
|
+
- '927'
|
132
|
+
Content-Type:
|
133
|
+
- application/json
|
134
|
+
Date:
|
135
|
+
- Wed, 08 Feb 2017 12:58:51 GMT
|
136
|
+
Expires:
|
137
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
138
|
+
Pragma:
|
139
|
+
- no-cache
|
140
|
+
Server:
|
141
|
+
- Apache
|
142
|
+
Set-Cookie:
|
143
|
+
- HBFAPI_SESSID=hbapi%3A171678%3A589b1609cb274%3Anym2; Path=/
|
144
|
+
X-Count-Read:
|
145
|
+
- user:15,member:7,serviceHostUser:1,serviceHostMember:1,hostUser:4,hostMember:4,ip:0
|
146
|
+
X-Count-Write:
|
147
|
+
- user:22,member:22,serviceHostUser:1,serviceHostMember:1,hostUser:17,hostMember:17,ip:0
|
148
|
+
X-Ratelimit-Read:
|
149
|
+
- '1000'
|
150
|
+
X-Ratelimit-Service:
|
151
|
+
- 1000-Default
|
152
|
+
X-Ratelimit-System:
|
153
|
+
- 1000-Default
|
154
|
+
X-Ratelimit-Write:
|
155
|
+
- '1000'
|
156
|
+
X-Route:
|
157
|
+
- "/content-category"
|
158
|
+
X-Route-Time:
|
159
|
+
- '28'
|
160
|
+
body:
|
161
|
+
encoding: UTF-8
|
162
|
+
string: '{"response":{"status":"OK","start_element":0,"num_elements":100,"content-category":{"id":46956,"name":"rspec_content_category","description":null,"is_system":false,"last_modified":"2017-02-08
|
163
|
+
12:58:50","type":"standard","member_id":487,"code":null,"parent_category":null},"count":1,"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","user::reads":15,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":22,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":7,"read_limit":1000,"read_limit_seconds":60,"writes":22,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"3f99c4b2-8df0-51ee-b23b-41fdebdcb977","warnings":[],"time":17.628908157349,"start_microtime":1486558731.3187,"version":"1.17.202","slave_miss":"no_slaves_found","slave_lag":1040269,"member_last_modified_age":1,"output_term":"content-category"}}}'
|
164
|
+
http_version:
|
165
|
+
recorded_at: Wed, 08 Feb 2017 12:58:49 GMT
|
166
|
+
- request:
|
167
|
+
method: put
|
168
|
+
uri: https://api-test.appnexus.com/content-category?id=46956
|
169
|
+
body:
|
170
|
+
encoding: UTF-8
|
171
|
+
string: '{"content-category":{"name":"rspec_content_category_part_2"}}'
|
172
|
+
headers:
|
173
|
+
User-Agent:
|
174
|
+
- Faraday v0.11.0
|
175
|
+
Authorization:
|
176
|
+
- hbapi:171678:589b1609cb274:nym2
|
177
|
+
Content-Type:
|
178
|
+
- application/json
|
179
|
+
Accept-Encoding:
|
180
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
181
|
+
Accept:
|
182
|
+
- "*/*"
|
183
|
+
response:
|
184
|
+
status:
|
185
|
+
code: 200
|
186
|
+
message: OK
|
187
|
+
headers:
|
188
|
+
Cache-Control:
|
189
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
|
190
|
+
Content-Length:
|
191
|
+
- '924'
|
192
|
+
Content-Type:
|
193
|
+
- application/json
|
194
|
+
Date:
|
195
|
+
- Wed, 08 Feb 2017 12:58:51 GMT
|
196
|
+
Expires:
|
197
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
198
|
+
Pragma:
|
199
|
+
- no-cache
|
200
|
+
Server:
|
201
|
+
- Apache
|
202
|
+
Set-Cookie:
|
203
|
+
- HBFAPI_SESSID=hbapi%3A171678%3A589b1609cb274%3Anym2; Path=/
|
204
|
+
X-Count-Read:
|
205
|
+
- user:15,member:7,serviceHostUser:1,serviceHostMember:1,hostUser:4,hostMember:4,ip:0
|
206
|
+
X-Count-Write:
|
207
|
+
- user:23,member:23,serviceHostUser:2,serviceHostMember:2,hostUser:18,hostMember:18,ip:0
|
208
|
+
X-Ratelimit-Read:
|
209
|
+
- '1000'
|
210
|
+
X-Ratelimit-Service:
|
211
|
+
- 1000-Default
|
212
|
+
X-Ratelimit-System:
|
213
|
+
- 1000-Default
|
214
|
+
X-Ratelimit-Write:
|
215
|
+
- '1000'
|
216
|
+
X-Route:
|
217
|
+
- "/content-category"
|
218
|
+
X-Route-Time:
|
219
|
+
- '273'
|
220
|
+
body:
|
221
|
+
encoding: UTF-8
|
222
|
+
string: '{"response":{"status":"OK","count":1,"id":"46956","start_element":0,"num_elements":100,"content-category":{"id":46956,"name":"rspec_content_category_part_2","description":null,"is_system":false,"last_modified":"2017-02-08
|
223
|
+
12:58:51","type":"standard","member_id":487,"code":null,"parent_category":null},"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","user::reads":15,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":23,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":7,"read_limit":1000,"read_limit_seconds":60,"writes":23,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"dcfd3603-ef24-5117-8723-9807b1a93c03","warnings":[],"time":257.5569152832,"start_microtime":1486558731.7081,"version":"1.17.202","slave_lag":1040269,"member_last_modified_age":1486558731,"output_term":"content-category"}}}'
|
224
|
+
http_version:
|
225
|
+
recorded_at: Wed, 08 Feb 2017 12:58:50 GMT
|
226
|
+
- request:
|
227
|
+
method: get
|
228
|
+
uri: https://api-test.appnexus.com/content-category?id=46956&num_elements=100&start_element=0
|
229
|
+
body:
|
230
|
+
encoding: US-ASCII
|
231
|
+
string: ''
|
232
|
+
headers:
|
233
|
+
User-Agent:
|
234
|
+
- Faraday v0.11.0
|
235
|
+
Authorization:
|
236
|
+
- hbapi:171678:589b1609cb274:nym2
|
237
|
+
Accept-Encoding:
|
238
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
239
|
+
Accept:
|
240
|
+
- "*/*"
|
241
|
+
response:
|
242
|
+
status:
|
243
|
+
code: 200
|
244
|
+
message: OK
|
245
|
+
headers:
|
246
|
+
Cache-Control:
|
247
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
|
248
|
+
Content-Length:
|
249
|
+
- '934'
|
250
|
+
Content-Type:
|
251
|
+
- application/json
|
252
|
+
Date:
|
253
|
+
- Wed, 08 Feb 2017 12:58:52 GMT
|
254
|
+
Expires:
|
255
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
256
|
+
Pragma:
|
257
|
+
- no-cache
|
258
|
+
Server:
|
259
|
+
- Apache
|
260
|
+
Set-Cookie:
|
261
|
+
- HBFAPI_SESSID=hbapi%3A171678%3A589b1609cb274%3Anym2; Path=/
|
262
|
+
X-Count-Read:
|
263
|
+
- user:16,member:8,serviceHostUser:2,serviceHostMember:2,hostUser:5,hostMember:5,ip:0
|
264
|
+
X-Count-Write:
|
265
|
+
- user:23,member:23,serviceHostUser:2,serviceHostMember:2,hostUser:18,hostMember:18,ip:0
|
266
|
+
X-Ratelimit-Read:
|
267
|
+
- '1000'
|
268
|
+
X-Ratelimit-Service:
|
269
|
+
- 1000-Default
|
270
|
+
X-Ratelimit-System:
|
271
|
+
- 1000-Default
|
272
|
+
X-Ratelimit-Write:
|
273
|
+
- '1000'
|
274
|
+
X-Route:
|
275
|
+
- "/content-category"
|
276
|
+
X-Route-Time:
|
277
|
+
- '25'
|
278
|
+
body:
|
279
|
+
encoding: UTF-8
|
280
|
+
string: '{"response":{"status":"OK","start_element":0,"num_elements":100,"content-category":{"id":46956,"name":"rspec_content_category_part_2","description":null,"is_system":false,"last_modified":"2017-02-08
|
281
|
+
12:58:51","type":"standard","member_id":487,"code":null,"parent_category":null},"count":1,"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","user::reads":16,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":23,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":8,"read_limit":1000,"read_limit_seconds":60,"writes":23,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"0bb34907-765f-5db4-8536-bbdc32970833","warnings":[],"time":16.390085220337,"start_microtime":1486558732.3625,"version":"1.17.202","slave_miss":"no_slaves_found","slave_lag":1040269,"member_last_modified_age":1,"output_term":"content-category"}}}'
|
282
|
+
http_version:
|
283
|
+
recorded_at: Wed, 08 Feb 2017 12:58:50 GMT
|
284
|
+
- request:
|
285
|
+
method: delete
|
286
|
+
uri: https://api-test.appnexus.com/content-category?id=46956
|
287
|
+
body:
|
288
|
+
encoding: US-ASCII
|
289
|
+
string: ''
|
290
|
+
headers:
|
291
|
+
User-Agent:
|
292
|
+
- Faraday v0.11.0
|
293
|
+
Authorization:
|
294
|
+
- hbapi:171678:589b1609cb274:nym2
|
295
|
+
Accept-Encoding:
|
296
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
297
|
+
Accept:
|
298
|
+
- "*/*"
|
299
|
+
response:
|
300
|
+
status:
|
301
|
+
code: 200
|
302
|
+
message: OK
|
303
|
+
headers:
|
304
|
+
Cache-Control:
|
305
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
|
306
|
+
Content-Length:
|
307
|
+
- '694'
|
308
|
+
Content-Type:
|
309
|
+
- application/json
|
310
|
+
Date:
|
311
|
+
- Wed, 08 Feb 2017 12:58:52 GMT
|
312
|
+
Expires:
|
313
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
314
|
+
Pragma:
|
315
|
+
- no-cache
|
316
|
+
Server:
|
317
|
+
- Apache
|
318
|
+
Set-Cookie:
|
319
|
+
- HBFAPI_SESSID=hbapi%3A171678%3A589b1609cb274%3Anym2; Path=/
|
320
|
+
X-Count-Read:
|
321
|
+
- user:16,member:8,serviceHostUser:2,serviceHostMember:2,hostUser:5,hostMember:5,ip:0
|
322
|
+
X-Count-Write:
|
323
|
+
- user:24,member:24,serviceHostUser:3,serviceHostMember:3,hostUser:19,hostMember:19,ip:0
|
324
|
+
X-Ratelimit-Read:
|
325
|
+
- '1000'
|
326
|
+
X-Ratelimit-Service:
|
327
|
+
- 1000-Default
|
328
|
+
X-Ratelimit-System:
|
329
|
+
- 1000-Default
|
330
|
+
X-Ratelimit-Write:
|
331
|
+
- '1000'
|
332
|
+
X-Route:
|
333
|
+
- "/content-category"
|
334
|
+
X-Route-Time:
|
335
|
+
- '265'
|
336
|
+
body:
|
337
|
+
encoding: UTF-8
|
338
|
+
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":16,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":24,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":8,"read_limit":1000,"read_limit_seconds":60,"writes":24,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"b713aea5-39f2-5563-a2b0-507bda26a1ac","warnings":[],"time":252.21800804138,"start_microtime":1486558732.7655,"version":"1.17.202","slave_lag":1040269,"member_last_modified_age":1486558732,"output_term":"not_found"}}}'
|
339
|
+
http_version:
|
340
|
+
recorded_at: Wed, 08 Feb 2017 12:58:51 GMT
|
341
|
+
- request:
|
342
|
+
method: get
|
343
|
+
uri: https://api-test.appnexus.com/content-category?id=46956&num_elements=100&start_element=0
|
344
|
+
body:
|
345
|
+
encoding: US-ASCII
|
346
|
+
string: ''
|
347
|
+
headers:
|
348
|
+
User-Agent:
|
349
|
+
- Faraday v0.11.0
|
350
|
+
Authorization:
|
351
|
+
- hbapi:171678:589b1609cb274:nym2
|
352
|
+
Accept-Encoding:
|
353
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
354
|
+
Accept:
|
355
|
+
- "*/*"
|
356
|
+
response:
|
357
|
+
status:
|
358
|
+
code: 200
|
359
|
+
message: OK
|
360
|
+
headers:
|
361
|
+
Cache-Control:
|
362
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
|
363
|
+
Content-Length:
|
364
|
+
- '819'
|
365
|
+
Content-Type:
|
366
|
+
- application/json
|
367
|
+
Date:
|
368
|
+
- Wed, 08 Feb 2017 12:58:53 GMT
|
369
|
+
Expires:
|
370
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
371
|
+
Pragma:
|
372
|
+
- no-cache
|
373
|
+
Server:
|
374
|
+
- Apache
|
375
|
+
Set-Cookie:
|
376
|
+
- HBFAPI_SESSID=hbapi%3A171678%3A589b1609cb274%3Anym2; Path=/
|
377
|
+
X-Count-Read:
|
378
|
+
- user:17,member:9,serviceHostUser:3,serviceHostMember:3,hostUser:6,hostMember:6,ip:0
|
379
|
+
X-Count-Write:
|
380
|
+
- user:24,member:24,serviceHostUser:3,serviceHostMember:3,hostUser:19,hostMember:19,ip:0
|
381
|
+
X-Ratelimit-Read:
|
382
|
+
- '1000'
|
383
|
+
X-Ratelimit-Service:
|
384
|
+
- 1000-Default
|
385
|
+
X-Ratelimit-System:
|
386
|
+
- 1000-Default
|
387
|
+
X-Ratelimit-Write:
|
388
|
+
- '1000'
|
389
|
+
X-Route:
|
390
|
+
- "/content-category"
|
391
|
+
X-Route-Time:
|
392
|
+
- '27'
|
393
|
+
body:
|
394
|
+
encoding: UTF-8
|
395
|
+
string: '{"response":{"error_id":"SYNTAX","error":"resource not found","error_description":null,"service":null,"method":null,"error_code":null,"count":0,"start_element":0,"num_elements":100,"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","user::reads":17,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":24,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":9,"read_limit":1000,"read_limit_seconds":60,"writes":24,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"0a149092-ec3c-5abd-8012-4e7b2c0119ab","warnings":[],"time":18.123149871826,"start_microtime":1486558733.5657,"version":"1.17.202","slave_miss":"no_slaves_found","slave_lag":1040269,"member_last_modified_age":0,"output_term":"not_found"}}}'
|
396
|
+
http_version:
|
397
|
+
recorded_at: Wed, 08 Feb 2017 12:58:51 GMT
|
398
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,216 @@
|
|
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
|
+
- Wed, 08 Feb 2017 12:58:18 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%3A589b15ebdfab4%3Anym2; Path=/
|
39
|
+
X-Route:
|
40
|
+
- "/auth"
|
41
|
+
X-Route-Time:
|
42
|
+
- '1376'
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"response":{"status":"OK","token":"hbapi:171678:589b15ebdfab4: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":"782e8efd-d756-5ccf-8c67-df93c8ef9396","warnings":[],"time":793.22409629822,"start_microtime":1486558698.7971,"version":"1.17","output_term":"not_found"},"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"781cc597-0897-5ad6-86b7-2014e1cc59dd","warnings":[],"time":1364.4289970398,"start_microtime":1486558698.7703,"version":"1.17.202","slave_lag":1040240,"output_term":"not_found"}}}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 08 Feb 2017 12:58:18 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:589b15ebdfab4: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
|
+
- '1641'
|
74
|
+
Content-Type:
|
75
|
+
- application/json
|
76
|
+
Date:
|
77
|
+
- Wed, 08 Feb 2017 12:58:20 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%3A589b15ebdfab4%3Anym2; Path=/
|
86
|
+
X-Count-Read:
|
87
|
+
- user:6,member:3,serviceHostUser:1,serviceHostMember:1,hostUser:2,hostMember:2,ip:0
|
88
|
+
X-Count-Write:
|
89
|
+
- user:3,member:3,serviceHostUser:3,serviceHostMember:3,hostUser:3,hostMember:3,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
|
+
- '299'
|
102
|
+
body:
|
103
|
+
encoding: UTF-8
|
104
|
+
string: '{"response":{"status":"OK","count":1,"id":1561318,"start_element":0,"num_elements":100,"advertiser":{"id":1561318,"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:20","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":6,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":3,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":3,"read_limit":1000,"read_limit_seconds":60,"writes":3,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":true,"uuid":"307b16d6-2c69-5225-9e47-d231767cd23f","warnings":[],"time":282.94515609741,"start_microtime":1486558700.595,"version":"1.17.202","slave_lag":1040240,"member_last_modified_age":1486558700,"output_term":"advertiser"}}}'
|
107
|
+
http_version:
|
108
|
+
recorded_at: Wed, 08 Feb 2017 12:58:19 GMT
|
109
|
+
- request:
|
110
|
+
method: post
|
111
|
+
uri: https://api-test.appnexus.com/creative?advertiser_id=1561318
|
112
|
+
body:
|
113
|
+
encoding: UTF-8
|
114
|
+
string: '{"creative":{"name":"rspec test creative","content":"<iframe src=\"helloword.html\"></iframe>","width":"300","height":"250","template":{"id":7}}}'
|
115
|
+
headers:
|
116
|
+
User-Agent:
|
117
|
+
- Faraday v0.11.0
|
118
|
+
Authorization:
|
119
|
+
- hbapi:171678:589b15ebdfab4:nym2
|
120
|
+
Content-Type:
|
121
|
+
- application/json
|
122
|
+
Accept-Encoding:
|
123
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
124
|
+
Accept:
|
125
|
+
- "*/*"
|
126
|
+
response:
|
127
|
+
status:
|
128
|
+
code: 200
|
129
|
+
message: OK
|
130
|
+
headers:
|
131
|
+
Content-Length:
|
132
|
+
- '3045'
|
133
|
+
Content-Type:
|
134
|
+
- application/json
|
135
|
+
X-Count-Read:
|
136
|
+
- user:6,member:3,serviceHostUser:1,serviceHostMember:1,hostUser:1,hostMember:1,ip:0
|
137
|
+
X-Count-Write:
|
138
|
+
- user:4,member:4,serviceHostUser:1,serviceHostMember:1,hostUser:1,hostMember:1,ip:0
|
139
|
+
X-Ratelimit-Read:
|
140
|
+
- '1000'
|
141
|
+
X-Ratelimit-Service:
|
142
|
+
- 1000-Default
|
143
|
+
X-Ratelimit-System:
|
144
|
+
- 1000-Default
|
145
|
+
X-Ratelimit-Write:
|
146
|
+
- '1000'
|
147
|
+
X-Route:
|
148
|
+
- "/creative"
|
149
|
+
X-Route-Time:
|
150
|
+
- '470'
|
151
|
+
body:
|
152
|
+
encoding: UTF-8
|
153
|
+
string: '{"response":{"status":"OK","count":1,"id":62215800,"start_element":0,"num_elements":100,"creative":{"name":"rspec
|
154
|
+
test creative","brand_id":1,"media_url":null,"id":62215800,"code":null,"code2":null,"member_id":487,"state":"active","click_track_result":"not_tested","advertiser_id":1561318,"publisher_id":null,"format":"iframe-html","width":300,"height":250,"click_url":null,"flash_click_variable":null,"no_iframes":false,"content":"<iframe
|
155
|
+
src=\"helloword.html\"><\/iframe>","original_content":null,"file_name":null,"track_clicks":true,"audit_status":"pending","macros":null,"profile_id":null,"audit_feedback":null,"is_prohibited":false,"created_on":"2017-02-08
|
156
|
+
12:58:21","flash_backup_url":null,"last_modified":"2017-02-08 12:58:21","is_control":false,"allow_audit":true,"is_expired":false,"creative_upload_status":null,"backup_upload_status":null,"use_dynamic_click_url":false,"media_subtypes":["banner"],"size_in_bytes":0,"is_self_audited":false,"no_adservers":false,"text_title":null,"text_description":null,"text_display_url":null,"click_action":"click-to-web","click_target":null,"ssl_status":"disabled","allow_ssl_audit":false,"media_url_secure":null,"content_secure":null,"original_content_secure":null,"flash_backup_url_secure":null,"is_hosted":false,"content_source":"standard","lifetime_budget":null,"lifetime_budget_imps":null,"daily_budget":null,"daily_budget_imps":null,"enable_pacing":null,"allow_safety_pacing":null,"landing_page_url":null,"thirdparty_creative_id":null,"thirdparty_campaign_id":null,"facebook_audit_status":null,"facebook_audit_feedback":null,"custom_request_template":null,"language":{"id":1,"name":"English"},"pop_values":null,"brand":{"id":1,"name":"Unknown","category_id":0},"template":{"id":7,"name":"Standard","media_subtype_id":1,"format_id":7},"ios_ssl_audit":null,"adx_audit":null,"thirdparty_page":null,"custom_macros":null,"segments":null,"folder":null,"campaigns":null,"line_items":null,"competitive_brands":null,"competitive_categories":null,"pixels":null,"mobile":null,"video_attribute":null,"media_assets":null,"sla":null,"thirdparty_pixels":null,"native":null,"click_trackers":null,"impression_trackers":null,"thirdparty_viewability_providers":null,"status":{"user_ready":true,"hosted_assets_association_complete":null},"sla_eta":null,"currency":"USD","type":"standard"},"dbg_info":{"instance":"01.creative-api.test104169.nym2","db":"","output_term":"creative","parent_dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","user::reads":6,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":4,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":3,"read_limit":1000,"read_limit_seconds":60,"writes":4,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"28bef2e6-18b0-5bd4-bd9c-f371e5f8f681","warnings":[],"time":428.22504043579,"start_microtime":1.4865587015253E9,"version":"1.17.202","slave_lag":1040240,"member_last_modified_age":1486558701,"output_term":"creative"},"proxy":true}}}'
|
157
|
+
http_version:
|
158
|
+
recorded_at: Wed, 08 Feb 2017 12:58:20 GMT
|
159
|
+
- request:
|
160
|
+
method: delete
|
161
|
+
uri: https://api-test.appnexus.com/advertiser?id=1561318
|
162
|
+
body:
|
163
|
+
encoding: US-ASCII
|
164
|
+
string: ''
|
165
|
+
headers:
|
166
|
+
User-Agent:
|
167
|
+
- Faraday v0.11.0
|
168
|
+
Authorization:
|
169
|
+
- hbapi:171678:589b15ebdfab4:nym2
|
170
|
+
Accept-Encoding:
|
171
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
172
|
+
Accept:
|
173
|
+
- "*/*"
|
174
|
+
response:
|
175
|
+
status:
|
176
|
+
code: 200
|
177
|
+
message: OK
|
178
|
+
headers:
|
179
|
+
Cache-Control:
|
180
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
|
181
|
+
Content-Length:
|
182
|
+
- '695'
|
183
|
+
Content-Type:
|
184
|
+
- application/json
|
185
|
+
Date:
|
186
|
+
- Wed, 08 Feb 2017 12:58:22 GMT
|
187
|
+
Expires:
|
188
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
189
|
+
Pragma:
|
190
|
+
- no-cache
|
191
|
+
Server:
|
192
|
+
- Apache
|
193
|
+
Set-Cookie:
|
194
|
+
- HBFAPI_SESSID=hbapi%3A171678%3A589b15ebdfab4%3Anym2; Path=/
|
195
|
+
X-Count-Read:
|
196
|
+
- user:6,member:3,serviceHostUser:1,serviceHostMember:1,hostUser:2,hostMember:2,ip:0
|
197
|
+
X-Count-Write:
|
198
|
+
- user:5,member:5,serviceHostUser:4,serviceHostMember:4,hostUser:4,hostMember:4,ip:0
|
199
|
+
X-Ratelimit-Read:
|
200
|
+
- '1000'
|
201
|
+
X-Ratelimit-Service:
|
202
|
+
- 1000-Default
|
203
|
+
X-Ratelimit-System:
|
204
|
+
- 1000-Default
|
205
|
+
X-Ratelimit-Write:
|
206
|
+
- '1000'
|
207
|
+
X-Route:
|
208
|
+
- "/advertiser"
|
209
|
+
X-Route-Time:
|
210
|
+
- '1134'
|
211
|
+
body:
|
212
|
+
encoding: UTF-8
|
213
|
+
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":6,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":5,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":3,"read_limit":1000,"read_limit_seconds":60,"writes":5,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"88cb3a54-4f28-5252-ba21-4e7d0a4fca0b","warnings":[],"time":1113.1370067596,"start_microtime":1486558702.5136,"version":"1.17.202","slave_lag":1040240,"member_last_modified_age":1486558702,"output_term":"not_found"}}}'
|
214
|
+
http_version:
|
215
|
+
recorded_at: Wed, 08 Feb 2017 12:58:21 GMT
|
216
|
+
recorded_with: VCR 3.0.3
|