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,166 @@
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 13:07:07 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%3A589b17fc47a99%3Anym2; Path=/
39
+ X-Route:
40
+ - "/auth"
41
+ X-Route-Time:
42
+ - '1384'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"response":{"status":"OK","token":"hbapi:171678:589b17fc47a99: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":"d17749d2-ab5e-5cda-9308-72221df89e41","warnings":[],"time":795.06611824036,"start_microtime":1486559227.1647,"version":"1.17","output_term":"not_found"},"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"5ba1c4d1-72a3-55f2-92a8-e736cbf5824e","warnings":[],"time":1370.9790706635,"start_microtime":1486559227.1419,"version":"1.17.202","slave_lag":1040764,"output_term":"not_found"}}}'
46
+ http_version:
47
+ recorded_at: Wed, 08 Feb 2017 13:07:06 GMT
48
+ - request:
49
+ method: post
50
+ uri: https://api-test.appnexus.com/publisher?create_default_placement=false
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"publisher":{"name":"spec publisher","code":"spec_publisher_code","expose_domains":true,"reselling_exposure":"public","ad_quality_advanced_mode_enabled":true}}'
54
+ headers:
55
+ User-Agent:
56
+ - Faraday v0.11.0
57
+ Authorization:
58
+ - hbapi:171678:589b17fc47a99: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
+ - '2332'
74
+ Content-Type:
75
+ - application/json
76
+ Date:
77
+ - Wed, 08 Feb 2017 13:07:08 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%3A589b17fc47a99%3Anym2; Path=/
86
+ X-Count-Read:
87
+ - user:8,member:4,serviceHostUser:2,serviceHostMember:2,hostUser:4,hostMember:4,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
+ - "/publisher"
100
+ X-Route-Time:
101
+ - '270'
102
+ body:
103
+ encoding: UTF-8
104
+ string: '{"response":{"status":"OK","count":1,"id":925478,"start_element":0,"num_elements":100,"publisher":{"id":925478,"code":"spec_publisher_code","reselling_name":null,"expose_domains":true,"is_rtb":false,"reselling_exposure":"public","reselling_exposed_on":"2017-02-08
105
+ 13:07:09","timezone":"EST5EDT","last_modified":"2017-02-08 13:07:09","max_learn_pct":0,"accept_demand_partner_usersync":null,"learn_bypass_cpm":5,"ad_quality_advanced_mode_enabled":true,"allow_report_on_default_imps":false,"inventory_source":null,"inventory_relationship":"undeclared","disclosure_status":"undisclosed","name":"spec
106
+ publisher","description":"","state":"active","default_site_id":null,"default_ad_profile_id":null,"billing_dba":null,"billing_address1":null,"billing_address2":null,"billing_city":null,"billing_state":null,"billing_zip":null,"billing_country":null,"accept_supply_partner_usersync":null,"accept_data_provider_usersync":null,"ym_profile_id":null,"allow_cpm_managed":true,"allow_cpm_external":true,"allow_cpa_managed":true,"allow_cpa_external":false,"allow_cpc_managed":true,"allow_cpc_external":false,"managed_cpc_bias_pct":100,"managed_cpa_bias_pct":100,"external_cpc_bias_pct":100,"external_cpa_bias_pct":100,"is_oo":false,"base_payment_rule_id":1192848,"base_ad_quality_rule_id":null,"currency":"USD","visibility_profile_id":null,"cpm_reselling_disabled":false,"cpc_reselling_disabled":false,"platform_ops_notes":null,"pitbull_segment_id":0,"pitbull_segment_value":0,"enable_cookie_tracking_default":true,"seller_page_cap_enabled":false,"inventory_source_name":null,"billing_internal_user":null,"labels":null,"placements":null,"external_inv_codes":null,"contact_info":null,"publisher_brand_exceptions":null,"contact":null},"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","user::reads":8,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":3,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":4,"read_limit":1000,"read_limit_seconds":60,"writes":3,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"5b5d66a4-8048-53a0-bc89-f4c750d36e61","warnings":[],"time":252.25305557251,"start_microtime":1486559228.9859,"version":"1.17.202","slave_lag":1040764,"member_last_modified_age":1486559228,"output_term":"publisher"}}}'
107
+ http_version:
108
+ recorded_at: Wed, 08 Feb 2017 13:07:07 GMT
109
+ - request:
110
+ method: get
111
+ uri: https://api-test.appnexus.com/site?num_elements=100&publisher_id=925478&start_element=0
112
+ body:
113
+ encoding: US-ASCII
114
+ string: ''
115
+ headers:
116
+ User-Agent:
117
+ - Faraday v0.11.0
118
+ Authorization:
119
+ - hbapi:171678:589b17fc47a99:nym2
120
+ Accept-Encoding:
121
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
122
+ Accept:
123
+ - "*/*"
124
+ response:
125
+ status:
126
+ code: 200
127
+ message: OK
128
+ headers:
129
+ Cache-Control:
130
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
131
+ Content-Length:
132
+ - '718'
133
+ Content-Type:
134
+ - application/json
135
+ Date:
136
+ - Wed, 08 Feb 2017 13:07:09 GMT
137
+ Expires:
138
+ - Thu, 19 Nov 1981 08:52:00 GMT
139
+ Pragma:
140
+ - no-cache
141
+ Server:
142
+ - Apache
143
+ Set-Cookie:
144
+ - HBFAPI_SESSID=hbapi%3A171678%3A589b17fc47a99%3Anym2; Path=/
145
+ X-Count-Read:
146
+ - user:9,member:5,serviceHostUser:1,serviceHostMember:1,hostUser:5,hostMember:5,ip:0
147
+ X-Count-Write:
148
+ - user:3,member:3,serviceHostUser:0,serviceHostMember:0,hostUser:3,hostMember:3,ip:0
149
+ X-Ratelimit-Read:
150
+ - '1000'
151
+ X-Ratelimit-Service:
152
+ - 1000-Default
153
+ X-Ratelimit-System:
154
+ - 1000-Default
155
+ X-Ratelimit-Write:
156
+ - '1000'
157
+ X-Route:
158
+ - "/site"
159
+ X-Route-Time:
160
+ - '28'
161
+ body:
162
+ encoding: UTF-8
163
+ string: '{"response":{"status":"OK","start_element":0,"num_elements":100,"sites":[],"count":0,"dbg_info":{"instance":"01.hbapi.test104169.nym2","slave_hit":false,"db":"master","user::reads":9,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":3,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":5,"read_limit":1000,"read_limit_seconds":60,"writes":3,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"bfe18e06-4401-5a23-912e-89ddc4ec08fd","warnings":[],"time":17.114162445068,"start_microtime":1486559229.9419,"version":"1.17.202","slave_miss":"no_slaves_found","slave_lag":1040772,"member_last_modified_age":474,"output_term":"sites"}}}'
164
+ http_version:
165
+ recorded_at: Wed, 08 Feb 2017 13:07:08 GMT
166
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,349 @@
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 13:01:32 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%3A589b16ad9e7b2%3Anym2; Path=/
39
+ X-Route:
40
+ - "/auth"
41
+ X-Route-Time:
42
+ - '1390'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"response":{"status":"OK","token":"hbapi:171678:589b16ad9e7b2: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":"64b38503-530e-53d8-9b45-d11aba79e30d","warnings":[],"time":800.35710334778,"start_microtime":1486558892.5182,"version":"1.17","output_term":"not_found"},"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"4217d5c9-bfe4-553a-8ff3-105970d4650a","warnings":[],"time":1377.2521018982,"start_microtime":1486558892.4907,"version":"1.17.202","slave_lag":1040430,"output_term":"not_found"}}}'
46
+ http_version:
47
+ recorded_at: Wed, 08 Feb 2017 13:01:32 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:589b16ad9e7b2: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 13:01:34 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%3A589b16ad9e7b2%3Anym2; Path=/
86
+ X-Count-Read:
87
+ - user:7,member:4,serviceHostUser:2,serviceHostMember:2,hostUser:4,hostMember:4,ip:0
88
+ X-Count-Write:
89
+ - user:2,member:2,serviceHostUser:2,serviceHostMember:2,hostUser:2,hostMember:2,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
+ - '308'
102
+ body:
103
+ encoding: UTF-8
104
+ string: '{"response":{"status":"OK","count":1,"id":1561327,"start_element":0,"num_elements":100,"advertiser":{"id":1561327,"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
+ 13:01:34","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":7,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":2,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":4,"read_limit":1000,"read_limit_seconds":60,"writes":2,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":true,"uuid":"1f301e5b-00cb-5b00-8929-2cd70146bce4","warnings":[],"time":289.5450592041,"start_microtime":1486558894.3604,"version":"1.17.202","slave_lag":1040430,"member_last_modified_age":1486558894,"output_term":"advertiser"}}}'
107
+ http_version:
108
+ recorded_at: Wed, 08 Feb 2017 13:01:32 GMT
109
+ - request:
110
+ method: post
111
+ uri: https://api-test.appnexus.com/profile?advertiser_id=1561327
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:589b16ad9e7b2: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
+ - '3713'
136
+ Content-Type:
137
+ - application/json
138
+ Date:
139
+ - Wed, 08 Feb 2017 13:01:35 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%3A589b16ad9e7b2%3Anym2; Path=/
148
+ X-Count-Read:
149
+ - user:7,member:4,serviceHostUser:0,serviceHostMember:0,hostUser:4,hostMember:4,ip:0
150
+ X-Count-Write:
151
+ - user:3,member:3,serviceHostUser:1,serviceHostMember:1,hostUser:3,hostMember:3,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
+ - '242'
164
+ body:
165
+ encoding: UTF-8
166
+ string: '{"response":{"status":"OK","count":1,"id":75364291,"start_element":0,"num_elements":100,"profile":{"id":75364291,"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
+ 13:01:35","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":1561327,"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
+ 13:01:35","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":7,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":3,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":4,"read_limit":1000,"read_limit_seconds":60,"writes":3,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"236a382c-dae9-5ddd-b71f-102828a45ee8","warnings":[],"time":223.38199615479,"start_microtime":1486558895.0387,"version":"1.17.202","slave_lag":1040430,"member_last_modified_age":1486558895,"output_term":"profile"}}}'
171
+ http_version:
172
+ recorded_at: Wed, 08 Feb 2017 13:01:33 GMT
173
+ - request:
174
+ method: post
175
+ uri: https://api-test.appnexus.com/line-item?advertiser_id=1561327
176
+ body:
177
+ encoding: UTF-8
178
+ string: '{"line-item":{"name":"some line item","code":"spec_line_code","profile_id":75364291}}'
179
+ headers:
180
+ User-Agent:
181
+ - Faraday v0.11.0
182
+ Authorization:
183
+ - hbapi:171678:589b16ad9e7b2: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
+ - '2176'
199
+ Content-Type:
200
+ - application/json
201
+ Date:
202
+ - Wed, 08 Feb 2017 13:01:35 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%3A589b16ad9e7b2%3Anym2; Path=/
211
+ X-Count-Read:
212
+ - user:7,member:4,serviceHostUser:0,serviceHostMember:0,hostUser:4,hostMember:4,ip:0
213
+ X-Count-Write:
214
+ - user:4,member:4,serviceHostUser:1,serviceHostMember:1,hostUser:4,hostMember:4,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
+ - '358'
227
+ body:
228
+ encoding: UTF-8
229
+ string: '{"response":{"status":"OK","count":1,"id":3764159,"start_element":0,"num_elements":100,"line-item":{"id":3764159,"code":"spec_line_code","name":"some
230
+ line item","advertiser_id":1561327,"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
+ 13:01:35","click_url":null,"currency":"USD","require_cookie_for_tracking":true,"profile_id":75364291,"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":1561327,"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":7,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":4,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":4,"read_limit":1000,"read_limit_seconds":60,"writes":4,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":true,"uuid":"a92134b0-367a-52ba-af97-14d9be3276a6","warnings":[],"time":338.83619308472,"start_microtime":1486558895.7385,"version":"1.17.202","slave_lag":1040430,"member_last_modified_age":1486558895,"output_term":"line-item"}}}'
233
+ http_version:
234
+ recorded_at: Wed, 08 Feb 2017 13:01:34 GMT
235
+ - request:
236
+ method: delete
237
+ uri: https://api-test.appnexus.com/line-item?advertiser_id=1561327&id=3764159
238
+ body:
239
+ encoding: US-ASCII
240
+ string: ''
241
+ headers:
242
+ User-Agent:
243
+ - Faraday v0.11.0
244
+ Authorization:
245
+ - hbapi:171678:589b16ad9e7b2:nym2
246
+ Accept-Encoding:
247
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
248
+ Accept:
249
+ - "*/*"
250
+ response:
251
+ status:
252
+ code: 200
253
+ message: OK
254
+ headers:
255
+ Cache-Control:
256
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
257
+ Content-Length:
258
+ - '695'
259
+ Content-Type:
260
+ - application/json
261
+ Date:
262
+ - Wed, 08 Feb 2017 13:01:36 GMT
263
+ Expires:
264
+ - Thu, 19 Nov 1981 08:52:00 GMT
265
+ Pragma:
266
+ - no-cache
267
+ Server:
268
+ - Apache
269
+ Set-Cookie:
270
+ - HBFAPI_SESSID=hbapi%3A171678%3A589b16ad9e7b2%3Anym2; Path=/
271
+ X-Count-Read:
272
+ - user:7,member:4,serviceHostUser:0,serviceHostMember:0,hostUser:4,hostMember:4,ip:0
273
+ X-Count-Write:
274
+ - user:5,member:5,serviceHostUser:2,serviceHostMember:2,hostUser:5,hostMember:5,ip:0
275
+ X-Ratelimit-Read:
276
+ - '1000'
277
+ X-Ratelimit-Service:
278
+ - 1000-Default
279
+ X-Ratelimit-System:
280
+ - 1000-Default
281
+ X-Ratelimit-Write:
282
+ - '1000'
283
+ X-Route:
284
+ - "/line-item"
285
+ X-Route-Time:
286
+ - '226'
287
+ body:
288
+ encoding: UTF-8
289
+ 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":7,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":5,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":4,"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":"a267c9f5-dbca-520c-8838-798bbb9c3e82","warnings":[],"time":210.50691604614,"start_microtime":1486558896.8749,"version":"1.17.202","slave_lag":1040439,"member_last_modified_age":1486558896,"output_term":"not_found"}}}'
290
+ http_version:
291
+ recorded_at: Wed, 08 Feb 2017 13:01:35 GMT
292
+ - request:
293
+ method: delete
294
+ uri: https://api-test.appnexus.com/advertiser?id=1561327
295
+ body:
296
+ encoding: US-ASCII
297
+ string: ''
298
+ headers:
299
+ User-Agent:
300
+ - Faraday v0.11.0
301
+ Authorization:
302
+ - hbapi:171678:589b16ad9e7b2:nym2
303
+ Accept-Encoding:
304
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
305
+ Accept:
306
+ - "*/*"
307
+ response:
308
+ status:
309
+ code: 200
310
+ message: OK
311
+ headers:
312
+ Cache-Control:
313
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
314
+ Content-Length:
315
+ - '694'
316
+ Content-Type:
317
+ - application/json
318
+ Date:
319
+ - Wed, 08 Feb 2017 13:01:37 GMT
320
+ Expires:
321
+ - Thu, 19 Nov 1981 08:52:00 GMT
322
+ Pragma:
323
+ - no-cache
324
+ Server:
325
+ - Apache
326
+ Set-Cookie:
327
+ - HBFAPI_SESSID=hbapi%3A171678%3A589b16ad9e7b2%3Anym2; Path=/
328
+ X-Count-Read:
329
+ - user:7,member:4,serviceHostUser:2,serviceHostMember:2,hostUser:4,hostMember:4,ip:0
330
+ X-Count-Write:
331
+ - user:6,member:6,serviceHostUser:3,serviceHostMember:3,hostUser:6,hostMember:6,ip:0
332
+ X-Ratelimit-Read:
333
+ - '1000'
334
+ X-Ratelimit-Service:
335
+ - 1000-Default
336
+ X-Ratelimit-System:
337
+ - 1000-Default
338
+ X-Ratelimit-Write:
339
+ - '1000'
340
+ X-Route:
341
+ - "/advertiser"
342
+ X-Route-Time:
343
+ - '1226'
344
+ body:
345
+ encoding: UTF-8
346
+ 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":7,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":6,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":4,"read_limit":1000,"read_limit_seconds":60,"writes":6,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"85da7e82-d8ba-5e81-bb03-152d5d2ba24f","warnings":[],"time":1206.326007843,"start_microtime":1486558897.6329,"version":"1.17.202","slave_lag":1040440,"member_last_modified_age":1486558897,"output_term":"not_found"}}}'
347
+ http_version:
348
+ recorded_at: Wed, 08 Feb 2017 13:01:37 GMT
349
+ recorded_with: VCR 3.0.3