appnexusapi 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +71 -39
- data/appnexusapi.gemspec +1 -2
- data/lib/appnexusapi.rb +21 -10
- data/lib/appnexusapi/configuration.rb +12 -0
- data/lib/appnexusapi/connection.rb +83 -90
- data/lib/appnexusapi/error.rb +3 -0
- data/lib/appnexusapi/faraday/raise_http_error.rb +15 -1
- data/lib/appnexusapi/read_only_service.rb +8 -0
- data/lib/appnexusapi/resource.rb +19 -15
- data/lib/appnexusapi/service.rb +35 -48
- data/lib/appnexusapi/services/ad_server_service.rb +9 -0
- data/lib/appnexusapi/{advertiser_service.rb → services/advertiser_service.rb} +0 -0
- data/lib/appnexusapi/{bidder_instance_service.rb → services/bidder_instance_service.rb} +0 -6
- data/lib/appnexusapi/{bidder_profile_service.rb → services/bidder_profile_service.rb} +0 -6
- data/lib/appnexusapi/{bidder_service.rb → services/bidder_service.rb} +0 -0
- data/lib/appnexusapi/services/brand_service.rb +2 -0
- data/lib/appnexusapi/services/browser_service.rb +2 -0
- data/lib/appnexusapi/{campaign_service.rb → services/campaign_service.rb} +0 -0
- data/lib/appnexusapi/services/category_service.rb +5 -0
- data/lib/appnexusapi/{content_category_service.rb → services/content_category_service.rb} +0 -1
- data/lib/appnexusapi/{creative_service.rb → services/creative_service.rb} +0 -0
- data/lib/appnexusapi/{creative_template_service.rb → services/creative_template_service.rb} +1 -6
- data/lib/appnexusapi/services/device_model_service.rb +2 -0
- data/lib/appnexusapi/{domain_list_service.rb → services/domain_list_service.rb} +0 -0
- data/lib/appnexusapi/services/inventory_attribute_service.rb +2 -0
- data/lib/appnexusapi/{inventory_source_service.rb → services/inventory_source_service.rb} +0 -0
- data/lib/appnexusapi/services/language_service.rb +2 -0
- data/lib/appnexusapi/{line_item_service.rb → services/line_item_service.rb} +0 -0
- data/lib/appnexusapi/services/log_level_data_download_service.rb +13 -0
- data/lib/appnexusapi/services/log_level_data_service.rb +105 -0
- data/lib/appnexusapi/services/media_type_service.rb +2 -0
- data/lib/appnexusapi/{member_service.rb → services/member_service.rb} +0 -0
- data/lib/appnexusapi/{object_limit_service.rb → services/object_limit_service.rb} +0 -0
- data/lib/appnexusapi/{operating_system_extended_service.rb → services/operating_system_extended_service.rb} +1 -6
- data/lib/appnexusapi/services/operating_system_service.rb +2 -0
- data/lib/appnexusapi/{payment_rule_service.rb → services/payment_rule_service.rb} +0 -0
- data/lib/appnexusapi/{placement_service.rb → services/placement_service.rb} +0 -0
- data/lib/appnexusapi/services/platform_member_service.rb +2 -0
- data/lib/appnexusapi/{profile_service.rb → services/profile_service.rb} +0 -0
- data/lib/appnexusapi/{publisher_service.rb → services/publisher_service.rb} +0 -0
- data/lib/appnexusapi/{segment_service.rb → services/segment_service.rb} +0 -2
- data/lib/appnexusapi/{site_service.rb → services/site_service.rb} +0 -0
- data/lib/appnexusapi/services/technical_attribute_service.rb +2 -0
- data/lib/appnexusapi/{tiny_tag_service.rb → services/tiny_tag_service.rb} +0 -6
- data/lib/appnexusapi/{user_service.rb → services/user_service.rb} +0 -0
- data/lib/appnexusapi/version.rb +1 -1
- data/spec/connection_spec.rb +46 -10
- data/spec/fixtures/vcr/content_category_crud.yml +188 -69
- data/spec/fixtures/vcr/log_level_data_service_download.yml +213 -0
- data/spec/integration/content_category_spec.rb +4 -0
- data/spec/{creative_service_spec.rb → integration/creative_service_spec.rb} +0 -0
- data/spec/integration/log_level_data_service_spec.rb +13 -0
- data/spec/{object_limit_service_spec.rb → integration/object_limit_service_spec.rb} +0 -0
- data/spec/integration/placement_spec.rb +0 -1
- data/spec/spec_helper.rb +2 -3
- metadata +52 -94
- data/lib/appnexusapi/ad_server_resource.rb +0 -2
- data/lib/appnexusapi/ad_server_service.rb +0 -20
- data/lib/appnexusapi/advertiser_resource.rb +0 -2
- data/lib/appnexusapi/bidder_instance_resource.rb +0 -2
- data/lib/appnexusapi/bidder_profile_resource.rb +0 -2
- data/lib/appnexusapi/bidder_resource.rb +0 -2
- data/lib/appnexusapi/brand_resource.rb +0 -2
- data/lib/appnexusapi/brand_service.rb +0 -8
- data/lib/appnexusapi/browser_resource.rb +0 -2
- data/lib/appnexusapi/browser_service.rb +0 -8
- data/lib/appnexusapi/campaign_resource.rb +0 -2
- data/lib/appnexusapi/category_resource.rb +0 -2
- data/lib/appnexusapi/category_service.rb +0 -12
- data/lib/appnexusapi/content_category_resource.rb +0 -2
- data/lib/appnexusapi/creative_resource.rb +0 -2
- data/lib/appnexusapi/creative_template_resource.rb +0 -2
- data/lib/appnexusapi/device_model_resource.rb +0 -2
- data/lib/appnexusapi/device_model_service.rb +0 -6
- data/lib/appnexusapi/domain_list_resource.rb +0 -2
- data/lib/appnexusapi/inventory_attribute_resource.rb +0 -2
- data/lib/appnexusapi/inventory_attribute_service.rb +0 -8
- data/lib/appnexusapi/inventory_source_resource.rb +0 -2
- data/lib/appnexusapi/language_resource.rb +0 -2
- data/lib/appnexusapi/language_service.rb +0 -8
- data/lib/appnexusapi/line_item_resource.rb +0 -2
- data/lib/appnexusapi/log_level_data_download_service.rb +0 -68
- data/lib/appnexusapi/log_level_data_resource.rb +0 -19
- data/lib/appnexusapi/log_level_data_service.rb +0 -26
- data/lib/appnexusapi/media_type_resource.rb +0 -2
- data/lib/appnexusapi/media_type_service.rb +0 -8
- data/lib/appnexusapi/member_resource.rb +0 -2
- data/lib/appnexusapi/object_limit_resource.rb +0 -2
- data/lib/appnexusapi/operating_system_extended_resource.rb +0 -2
- data/lib/appnexusapi/operating_system_resource.rb +0 -2
- data/lib/appnexusapi/operating_system_service.rb +0 -8
- data/lib/appnexusapi/payment_rule_resource.rb +0 -2
- data/lib/appnexusapi/placement_resource.rb +0 -2
- data/lib/appnexusapi/platform_member_resource.rb +0 -2
- data/lib/appnexusapi/platform_member_service.rb +0 -8
- data/lib/appnexusapi/profile_resource.rb +0 -2
- data/lib/appnexusapi/publisher_resource.rb +0 -2
- data/lib/appnexusapi/segment_resource.rb +0 -2
- data/lib/appnexusapi/site_resource.rb +0 -2
- data/lib/appnexusapi/technical_attribute_resource.rb +0 -2
- data/lib/appnexusapi/technical_attribute_service.rb +0 -8
- data/lib/appnexusapi/tiny_tag_resource.rb +0 -2
- data/lib/appnexusapi/user_resource.rb +0 -2
File without changes
|
File without changes
|
@@ -1,9 +1,4 @@
|
|
1
|
-
class AppnexusApi::OperatingSystemExtendedService < AppnexusApi::
|
2
|
-
def initialize(connection)
|
3
|
-
@read_only = true
|
4
|
-
super(connection)
|
5
|
-
end
|
6
|
-
|
1
|
+
class AppnexusApi::OperatingSystemExtendedService < AppnexusApi::ReadOnlyService
|
7
2
|
def plural_name
|
8
3
|
'operating-systems-extended'
|
9
4
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,5 +1,4 @@
|
|
1
1
|
class AppnexusApi::SegmentService < AppnexusApi::Service
|
2
|
-
|
3
2
|
def initialize(connection, member_id)
|
4
3
|
@member_id = member_id
|
5
4
|
super(connection)
|
@@ -8,5 +7,4 @@ class AppnexusApi::SegmentService < AppnexusApi::Service
|
|
8
7
|
def uri_suffix
|
9
8
|
"#{super}/#{@member_id}"
|
10
9
|
end
|
11
|
-
|
12
10
|
end
|
File without changes
|
@@ -1,5 +1,4 @@
|
|
1
1
|
class AppnexusApi::TinyTagService < AppnexusApi::Service
|
2
|
-
|
3
2
|
def initialize(connection, member_id)
|
4
3
|
@member_id = member_id
|
5
4
|
super(connection)
|
@@ -9,12 +8,7 @@ class AppnexusApi::TinyTagService < AppnexusApi::Service
|
|
9
8
|
"tinytag"
|
10
9
|
end
|
11
10
|
|
12
|
-
def resource_class
|
13
|
-
AppnexusApi::TinyTagResource
|
14
|
-
end
|
15
|
-
|
16
11
|
def uri_suffix
|
17
12
|
"tt/#{@member_id}"
|
18
13
|
end
|
19
|
-
|
20
14
|
end
|
File without changes
|
data/lib/appnexusapi/version.rb
CHANGED
data/spec/connection_spec.rb
CHANGED
@@ -1,21 +1,57 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe AppnexusApi::Connection do
|
4
|
-
|
4
|
+
let(:connection_with_null_logger) { AppnexusApi::Connection.new(connection_params) }
|
5
|
+
|
6
|
+
subject do
|
7
|
+
connection = described_class.new({})
|
8
|
+
connection.logger.level = Logger::FATAL
|
9
|
+
connection
|
10
|
+
end
|
5
11
|
|
6
12
|
it 'allows no logger to be specified' do
|
7
13
|
expect { AppnexusApi::CreativeService.new(connection_with_null_logger) }.to_not raise_error
|
8
14
|
end
|
9
15
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
counter
|
16
|
-
|
17
|
-
|
16
|
+
context 'retries' do
|
17
|
+
let(:reponse_data) { { not_an_error: 1 } }
|
18
|
+
|
19
|
+
it 'returns data from expiration' do
|
20
|
+
#stub to raise error the first time and then return []
|
21
|
+
counter = 0
|
22
|
+
expect(subject).to receive(:login)
|
23
|
+
expect(subject.connection).to receive(:run_request).twice do |arg|
|
24
|
+
counter += 1
|
25
|
+
raise AppnexusApi::Unauthorized.new if counter == 1
|
26
|
+
Faraday::Response.new(body: reponse_data)
|
27
|
+
end
|
28
|
+
|
29
|
+
expect(subject.get('http://localhost', {}, {}).body).to eq(reponse_data)
|
30
|
+
end
|
31
|
+
|
32
|
+
context 'rate limited errors' do
|
33
|
+
let(:response) do
|
34
|
+
Faraday::Response.new(
|
35
|
+
status: 405,
|
36
|
+
body: { 'error_code' => AppnexusApi::Faraday::Response::RaiseHttpError::RATE_EXCEEDED_ERROR },
|
37
|
+
response_headers: { 'retry-after' => 15 }
|
38
|
+
)
|
39
|
+
end
|
40
|
+
|
41
|
+
before do
|
42
|
+
described_class.const_set('RATE_EXCEEDED_DEFAULT_TIMEOUT', 0)
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'retries 3 times' do
|
46
|
+
expect(subject).to receive(:login)
|
47
|
+
|
48
|
+
counter = 0
|
49
|
+
expect(subject.connection).to receive(:run_request).exactly(3).times do |arg|
|
50
|
+
raise AppnexusApi::RateLimitExceeded, 'Retry after 0s'
|
51
|
+
end
|
52
|
+
|
53
|
+
expect { subject.get('http://localhost', {}, {}).body }.to raise_error(AppnexusApi::RateLimitExceeded)
|
54
|
+
end
|
18
55
|
end
|
19
|
-
expect(subject.run_request(:get, 'http://localhost', nil, {})).not_to eq({})
|
20
56
|
end
|
21
57
|
end
|
@@ -23,11 +23,11 @@ http_interactions:
|
|
23
23
|
Cache-Control:
|
24
24
|
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
|
25
25
|
Content-Length:
|
26
|
-
- '
|
26
|
+
- '697'
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Tue, 21 Feb 2017 06:36:20 GMT
|
31
31
|
Expires:
|
32
32
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
33
33
|
Pragma:
|
@@ -35,16 +35,16 @@ http_interactions:
|
|
35
35
|
Server:
|
36
36
|
- Apache
|
37
37
|
Set-Cookie:
|
38
|
-
- HBFAPI_SESSID=hbapi%3A171678%
|
38
|
+
- HBFAPI_SESSID=hbapi%3A171678%3A58abdfe5637c0%3Anym2; Path=/
|
39
39
|
X-Route:
|
40
40
|
- "/auth"
|
41
41
|
X-Route-Time:
|
42
|
-
- '
|
42
|
+
- '1385'
|
43
43
|
body:
|
44
44
|
encoding: UTF-8
|
45
|
-
string: '{"response":{"status":"OK","token":"hbapi:171678:
|
45
|
+
string: '{"response":{"status":"OK","token":"hbapi:171678:58abdfe5637c0: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":"36cf26c3-f943-5a77-843e-548b5b8c8d82","warnings":[],"time":794.025182724,"start_microtime":1487658980.2764,"version":"1.17","output_term":"not_found"},"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"4bc92de1-a2e7-56ee-a137-8c2caa406fea","warnings":[],"time":1371.7579841614,"start_microtime":1487658980.2566,"version":"1.17.202","slave_lag":2140522,"output_term":"not_found"}}}'
|
46
46
|
http_version:
|
47
|
-
recorded_at:
|
47
|
+
recorded_at: Tue, 21 Feb 2017 06:36:19 GMT
|
48
48
|
- request:
|
49
49
|
method: post
|
50
50
|
uri: https://api-test.appnexus.com/content-category
|
@@ -55,7 +55,7 @@ http_interactions:
|
|
55
55
|
User-Agent:
|
56
56
|
- Faraday v0.11.0
|
57
57
|
Authorization:
|
58
|
-
- hbapi:171678:
|
58
|
+
- hbapi:171678:58abdfe5637c0:nym2
|
59
59
|
Content-Type:
|
60
60
|
- application/json
|
61
61
|
Accept-Encoding:
|
@@ -70,11 +70,11 @@ http_interactions:
|
|
70
70
|
Cache-Control:
|
71
71
|
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
|
72
72
|
Content-Length:
|
73
|
-
- '
|
73
|
+
- '913'
|
74
74
|
Content-Type:
|
75
75
|
- application/json
|
76
76
|
Date:
|
77
|
-
-
|
77
|
+
- Tue, 21 Feb 2017 06:36:26 GMT
|
78
78
|
Expires:
|
79
79
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
80
80
|
Pragma:
|
@@ -82,11 +82,11 @@ http_interactions:
|
|
82
82
|
Server:
|
83
83
|
- Apache
|
84
84
|
Set-Cookie:
|
85
|
-
- HBFAPI_SESSID=hbapi%3A171678%
|
85
|
+
- HBFAPI_SESSID=hbapi%3A171678%3A58abdfe5637c0%3Anym2; Path=/
|
86
86
|
X-Count-Read:
|
87
|
-
- user:
|
87
|
+
- user:7,member:4,serviceHostUser:0,serviceHostMember:0,hostUser:4,hostMember:4,ip:0
|
88
88
|
X-Count-Write:
|
89
|
-
- user:
|
89
|
+
- user:1,member:1,serviceHostUser:1,serviceHostMember:1,hostUser:1,hostMember:1,ip:0
|
90
90
|
X-Ratelimit-Read:
|
91
91
|
- '1000'
|
92
92
|
X-Ratelimit-Service:
|
@@ -98,16 +98,16 @@ http_interactions:
|
|
98
98
|
X-Route:
|
99
99
|
- "/content-category"
|
100
100
|
X-Route-Time:
|
101
|
-
- '
|
101
|
+
- '289'
|
102
102
|
body:
|
103
103
|
encoding: UTF-8
|
104
|
-
string: '{"response":{"status":"OK","count":1,"id":
|
105
|
-
|
104
|
+
string: '{"response":{"status":"OK","count":1,"id":47125,"start_element":0,"num_elements":100,"content-category":{"id":47125,"name":"rspec_content_category","description":null,"is_system":false,"last_modified":"2017-02-21
|
105
|
+
06:36:26","type":"standard","member_id":487,"code":null,"parent_category":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":1,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":4,"read_limit":1000,"read_limit_seconds":60,"writes":1,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"4d436460-c516-5907-b0fd-fdf648025552","warnings":[],"time":275.21300315857,"start_microtime":1487658986.0666,"version":"1.17.202","slave_lag":2140523,"member_last_modified_age":1487658986,"output_term":"content-category"}}}'
|
106
106
|
http_version:
|
107
|
-
recorded_at:
|
107
|
+
recorded_at: Tue, 21 Feb 2017 06:36:24 GMT
|
108
108
|
- request:
|
109
109
|
method: get
|
110
|
-
uri: https://api-test.appnexus.com/content-category?id=
|
110
|
+
uri: https://api-test.appnexus.com/content-category?id=47125&num_elements=100&start_element=0
|
111
111
|
body:
|
112
112
|
encoding: US-ASCII
|
113
113
|
string: ''
|
@@ -115,7 +115,7 @@ http_interactions:
|
|
115
115
|
User-Agent:
|
116
116
|
- Faraday v0.11.0
|
117
117
|
Authorization:
|
118
|
-
- hbapi:171678:
|
118
|
+
- hbapi:171678:58abdfe5637c0:nym2
|
119
119
|
Accept-Encoding:
|
120
120
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
121
121
|
Accept:
|
@@ -128,11 +128,11 @@ http_interactions:
|
|
128
128
|
Cache-Control:
|
129
129
|
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
|
130
130
|
Content-Length:
|
131
|
-
- '
|
131
|
+
- '924'
|
132
132
|
Content-Type:
|
133
133
|
- application/json
|
134
134
|
Date:
|
135
|
-
-
|
135
|
+
- Tue, 21 Feb 2017 06:36:26 GMT
|
136
136
|
Expires:
|
137
137
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
138
138
|
Pragma:
|
@@ -140,11 +140,11 @@ http_interactions:
|
|
140
140
|
Server:
|
141
141
|
- Apache
|
142
142
|
Set-Cookie:
|
143
|
-
- HBFAPI_SESSID=hbapi%3A171678%
|
143
|
+
- HBFAPI_SESSID=hbapi%3A171678%3A58abdfe5637c0%3Anym2; Path=/
|
144
144
|
X-Count-Read:
|
145
|
-
- user:
|
145
|
+
- user:8,member:5,serviceHostUser:1,serviceHostMember:1,hostUser:5,hostMember:5,ip:0
|
146
146
|
X-Count-Write:
|
147
|
-
- user:
|
147
|
+
- user:1,member:1,serviceHostUser:1,serviceHostMember:1,hostUser:1,hostMember:1,ip:0
|
148
148
|
X-Ratelimit-Read:
|
149
149
|
- '1000'
|
150
150
|
X-Ratelimit-Service:
|
@@ -156,16 +156,16 @@ http_interactions:
|
|
156
156
|
X-Route:
|
157
157
|
- "/content-category"
|
158
158
|
X-Route-Time:
|
159
|
-
- '
|
159
|
+
- '44'
|
160
160
|
body:
|
161
161
|
encoding: UTF-8
|
162
|
-
string: '{"response":{"status":"OK","start_element":0,"num_elements":100,"content-category":{"id":
|
163
|
-
|
162
|
+
string: '{"response":{"status":"OK","start_element":0,"num_elements":100,"content-category":{"id":47125,"name":"rspec_content_category","description":null,"is_system":false,"last_modified":"2017-02-21
|
163
|
+
06:36:26","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":8,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":1,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":5,"read_limit":1000,"read_limit_seconds":60,"writes":1,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"b4ac1ffc-6f72-5e16-8854-b3340eceb860","warnings":[],"time":33.450126647949,"start_microtime":1487658986.7216,"version":"1.17.202","slave_miss":"no_slaves_found","slave_lag":2140523,"member_last_modified_age":0,"output_term":"content-category"}}}'
|
164
164
|
http_version:
|
165
|
-
recorded_at:
|
165
|
+
recorded_at: Tue, 21 Feb 2017 06:36:24 GMT
|
166
166
|
- request:
|
167
167
|
method: put
|
168
|
-
uri: https://api-test.appnexus.com/content-category?id=
|
168
|
+
uri: https://api-test.appnexus.com/content-category?id=47125
|
169
169
|
body:
|
170
170
|
encoding: UTF-8
|
171
171
|
string: '{"content-category":{"name":"rspec_content_category_part_2"}}'
|
@@ -173,7 +173,7 @@ http_interactions:
|
|
173
173
|
User-Agent:
|
174
174
|
- Faraday v0.11.0
|
175
175
|
Authorization:
|
176
|
-
- hbapi:171678:
|
176
|
+
- hbapi:171678:58abdfe5637c0:nym2
|
177
177
|
Content-Type:
|
178
178
|
- application/json
|
179
179
|
Accept-Encoding:
|
@@ -188,11 +188,69 @@ http_interactions:
|
|
188
188
|
Cache-Control:
|
189
189
|
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
|
190
190
|
Content-Length:
|
191
|
-
- '
|
191
|
+
- '921'
|
192
|
+
Content-Type:
|
193
|
+
- application/json
|
194
|
+
Date:
|
195
|
+
- Tue, 21 Feb 2017 06:36:27 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%3A58abdfe5637c0%3Anym2; Path=/
|
204
|
+
X-Count-Read:
|
205
|
+
- user:8,member:5,serviceHostUser:1,serviceHostMember:1,hostUser:5,hostMember:5,ip:0
|
206
|
+
X-Count-Write:
|
207
|
+
- user:2,member:2,serviceHostUser:2,serviceHostMember:2,hostUser:2,hostMember:2,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
|
+
- '276'
|
220
|
+
body:
|
221
|
+
encoding: UTF-8
|
222
|
+
string: '{"response":{"status":"OK","count":1,"id":"47125","start_element":0,"num_elements":100,"content-category":{"id":47125,"name":"rspec_content_category_part_2","description":null,"is_system":false,"last_modified":"2017-02-21
|
223
|
+
06:36:27","type":"standard","member_id":487,"code":null,"parent_category":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":2,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":5,"read_limit":1000,"read_limit_seconds":60,"writes":2,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"3410d65c-1585-55fd-af60-bada549684bd","warnings":[],"time":261.69610023499,"start_microtime":1487658987.125,"version":"1.17.202","slave_lag":2140523,"member_last_modified_age":1487658987,"output_term":"content-category"}}}'
|
224
|
+
http_version:
|
225
|
+
recorded_at: Tue, 21 Feb 2017 06:36:25 GMT
|
226
|
+
- request:
|
227
|
+
method: get
|
228
|
+
uri: https://api-test.appnexus.com/content-category?id=47125&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:58abdfe5637c0: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
|
+
- '931'
|
192
250
|
Content-Type:
|
193
251
|
- application/json
|
194
252
|
Date:
|
195
|
-
-
|
253
|
+
- Tue, 21 Feb 2017 06:36:27 GMT
|
196
254
|
Expires:
|
197
255
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
198
256
|
Pragma:
|
@@ -200,11 +258,11 @@ http_interactions:
|
|
200
258
|
Server:
|
201
259
|
- Apache
|
202
260
|
Set-Cookie:
|
203
|
-
- HBFAPI_SESSID=hbapi%3A171678%
|
261
|
+
- HBFAPI_SESSID=hbapi%3A171678%3A58abdfe5637c0%3Anym2; Path=/
|
204
262
|
X-Count-Read:
|
205
|
-
- user:
|
263
|
+
- user:9,member:6,serviceHostUser:2,serviceHostMember:2,hostUser:6,hostMember:6,ip:0
|
206
264
|
X-Count-Write:
|
207
|
-
- user:
|
265
|
+
- user:2,member:2,serviceHostUser:2,serviceHostMember:2,hostUser:2,hostMember:2,ip:0
|
208
266
|
X-Ratelimit-Read:
|
209
267
|
- '1000'
|
210
268
|
X-Ratelimit-Service:
|
@@ -216,16 +274,77 @@ http_interactions:
|
|
216
274
|
X-Route:
|
217
275
|
- "/content-category"
|
218
276
|
X-Route-Time:
|
219
|
-
- '
|
277
|
+
- '28'
|
278
|
+
body:
|
279
|
+
encoding: UTF-8
|
280
|
+
string: '{"response":{"status":"OK","start_element":0,"num_elements":100,"content-category":{"id":47125,"name":"rspec_content_category_part_2","description":null,"is_system":false,"last_modified":"2017-02-21
|
281
|
+
06:36:27","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":9,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":2,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":6,"read_limit":1000,"read_limit_seconds":60,"writes":2,"write_limit":1000,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"uuid":"1e6a0bf4-61ad-56f1-a5a1-afe0bafb88be","warnings":[],"time":17.959117889404,"start_microtime":1487658987.9017,"version":"1.17.202","slave_miss":"no_slaves_found","slave_lag":2140523,"member_last_modified_age":0,"output_term":"content-category"}}}'
|
282
|
+
http_version:
|
283
|
+
recorded_at: Tue, 21 Feb 2017 06:36:25 GMT
|
284
|
+
- request:
|
285
|
+
method: put
|
286
|
+
uri: https://api-test.appnexus.com/content-category?id=47125
|
287
|
+
body:
|
288
|
+
encoding: UTF-8
|
289
|
+
string: '{"content-category":{"id":47125,"name":"rspec_content_category_part_2","description":null,"is_system":false,"last_modified":"2017-02-21
|
290
|
+
06:36:27","type":"standard","member_id":487,"code":null,"parent_category":null,"name":"rspec_content_category"}}'
|
291
|
+
headers:
|
292
|
+
User-Agent:
|
293
|
+
- Faraday v0.11.0
|
294
|
+
Authorization:
|
295
|
+
- hbapi:171678:58abdfe5637c0:nym2
|
296
|
+
Content-Type:
|
297
|
+
- application/json
|
298
|
+
Accept-Encoding:
|
299
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
300
|
+
Accept:
|
301
|
+
- "*/*"
|
302
|
+
response:
|
303
|
+
status:
|
304
|
+
code: 200
|
305
|
+
message: OK
|
306
|
+
headers:
|
307
|
+
Cache-Control:
|
308
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
|
309
|
+
Content-Length:
|
310
|
+
- '915'
|
311
|
+
Content-Type:
|
312
|
+
- application/json
|
313
|
+
Date:
|
314
|
+
- Tue, 21 Feb 2017 06:36:28 GMT
|
315
|
+
Expires:
|
316
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
317
|
+
Pragma:
|
318
|
+
- no-cache
|
319
|
+
Server:
|
320
|
+
- Apache
|
321
|
+
Set-Cookie:
|
322
|
+
- HBFAPI_SESSID=hbapi%3A171678%3A58abdfe5637c0%3Anym2; Path=/
|
323
|
+
X-Count-Read:
|
324
|
+
- user:9,member:6,serviceHostUser:2,serviceHostMember:2,hostUser:6,hostMember:6,ip:0
|
325
|
+
X-Count-Write:
|
326
|
+
- user:3,member:3,serviceHostUser:3,serviceHostMember:3,hostUser:3,hostMember:3,ip:0
|
327
|
+
X-Ratelimit-Read:
|
328
|
+
- '1000'
|
329
|
+
X-Ratelimit-Service:
|
330
|
+
- 1000-Default
|
331
|
+
X-Ratelimit-System:
|
332
|
+
- 1000-Default
|
333
|
+
X-Ratelimit-Write:
|
334
|
+
- '1000'
|
335
|
+
X-Route:
|
336
|
+
- "/content-category"
|
337
|
+
X-Route-Time:
|
338
|
+
- '266'
|
220
339
|
body:
|
221
340
|
encoding: UTF-8
|
222
|
-
string: '{"response":{"status":"OK","count":1,"id":"
|
223
|
-
|
341
|
+
string: '{"response":{"status":"OK","count":1,"id":"47125","start_element":0,"num_elements":100,"content-category":{"id":47125,"name":"rspec_content_category","description":null,"is_system":false,"last_modified":"2017-02-21
|
342
|
+
06:36:28","type":"standard","member_id":487,"code":null,"parent_category":null},"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":6,"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":"70a601e0-cae3-5f2b-b518-85601c9ca499","warnings":[],"time":251.14107131958,"start_microtime":1487658988.2921,"version":"1.17.202","slave_lag":2140523,"member_last_modified_age":1487658988,"output_term":"content-category"}}}'
|
224
343
|
http_version:
|
225
|
-
recorded_at:
|
344
|
+
recorded_at: Tue, 21 Feb 2017 06:36:26 GMT
|
226
345
|
- request:
|
227
346
|
method: get
|
228
|
-
uri: https://api-test.appnexus.com/content-category?id=
|
347
|
+
uri: https://api-test.appnexus.com/content-category?id=47125&num_elements=100&start_element=0
|
229
348
|
body:
|
230
349
|
encoding: US-ASCII
|
231
350
|
string: ''
|
@@ -233,7 +352,7 @@ http_interactions:
|
|
233
352
|
User-Agent:
|
234
353
|
- Faraday v0.11.0
|
235
354
|
Authorization:
|
236
|
-
- hbapi:171678:
|
355
|
+
- hbapi:171678:58abdfe5637c0:nym2
|
237
356
|
Accept-Encoding:
|
238
357
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
239
358
|
Accept:
|
@@ -246,11 +365,11 @@ http_interactions:
|
|
246
365
|
Cache-Control:
|
247
366
|
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
|
248
367
|
Content-Length:
|
249
|
-
- '
|
368
|
+
- '925'
|
250
369
|
Content-Type:
|
251
370
|
- application/json
|
252
371
|
Date:
|
253
|
-
-
|
372
|
+
- Tue, 21 Feb 2017 06:36:29 GMT
|
254
373
|
Expires:
|
255
374
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
256
375
|
Pragma:
|
@@ -258,11 +377,11 @@ http_interactions:
|
|
258
377
|
Server:
|
259
378
|
- Apache
|
260
379
|
Set-Cookie:
|
261
|
-
- HBFAPI_SESSID=hbapi%3A171678%
|
380
|
+
- HBFAPI_SESSID=hbapi%3A171678%3A58abdfe5637c0%3Anym2; Path=/
|
262
381
|
X-Count-Read:
|
263
|
-
- user:
|
382
|
+
- user:10,member:7,serviceHostUser:3,serviceHostMember:3,hostUser:7,hostMember:7,ip:0
|
264
383
|
X-Count-Write:
|
265
|
-
- user:
|
384
|
+
- user:3,member:3,serviceHostUser:3,serviceHostMember:3,hostUser:3,hostMember:3,ip:0
|
266
385
|
X-Ratelimit-Read:
|
267
386
|
- '1000'
|
268
387
|
X-Ratelimit-Service:
|
@@ -274,16 +393,16 @@ http_interactions:
|
|
274
393
|
X-Route:
|
275
394
|
- "/content-category"
|
276
395
|
X-Route-Time:
|
277
|
-
- '
|
396
|
+
- '29'
|
278
397
|
body:
|
279
398
|
encoding: UTF-8
|
280
|
-
string: '{"response":{"status":"OK","start_element":0,"num_elements":100,"content-category":{"id":
|
281
|
-
|
399
|
+
string: '{"response":{"status":"OK","start_element":0,"num_elements":100,"content-category":{"id":47125,"name":"rspec_content_category","description":null,"is_system":false,"last_modified":"2017-02-21
|
400
|
+
06:36:28","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":10,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":3,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":7,"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":"0226e304-445a-52c3-bcc9-6c18dd3a6822","warnings":[],"time":18.754005432129,"start_microtime":1487658989.1268,"version":"1.17.202","slave_miss":"no_slaves_found","slave_lag":2140523,"member_last_modified_age":1,"output_term":"content-category"}}}'
|
282
401
|
http_version:
|
283
|
-
recorded_at:
|
402
|
+
recorded_at: Tue, 21 Feb 2017 06:36:27 GMT
|
284
403
|
- request:
|
285
404
|
method: delete
|
286
|
-
uri: https://api-test.appnexus.com/content-category?id=
|
405
|
+
uri: https://api-test.appnexus.com/content-category?id=47125
|
287
406
|
body:
|
288
407
|
encoding: US-ASCII
|
289
408
|
string: ''
|
@@ -291,7 +410,7 @@ http_interactions:
|
|
291
410
|
User-Agent:
|
292
411
|
- Faraday v0.11.0
|
293
412
|
Authorization:
|
294
|
-
- hbapi:171678:
|
413
|
+
- hbapi:171678:58abdfe5637c0:nym2
|
295
414
|
Accept-Encoding:
|
296
415
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
297
416
|
Accept:
|
@@ -304,11 +423,11 @@ http_interactions:
|
|
304
423
|
Cache-Control:
|
305
424
|
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
|
306
425
|
Content-Length:
|
307
|
-
- '
|
426
|
+
- '692'
|
308
427
|
Content-Type:
|
309
428
|
- application/json
|
310
429
|
Date:
|
311
|
-
-
|
430
|
+
- Tue, 21 Feb 2017 06:36:29 GMT
|
312
431
|
Expires:
|
313
432
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
314
433
|
Pragma:
|
@@ -316,11 +435,11 @@ http_interactions:
|
|
316
435
|
Server:
|
317
436
|
- Apache
|
318
437
|
Set-Cookie:
|
319
|
-
- HBFAPI_SESSID=hbapi%3A171678%
|
438
|
+
- HBFAPI_SESSID=hbapi%3A171678%3A58abdfe5637c0%3Anym2; Path=/
|
320
439
|
X-Count-Read:
|
321
|
-
- user:
|
440
|
+
- user:10,member:7,serviceHostUser:3,serviceHostMember:3,hostUser:7,hostMember:7,ip:0
|
322
441
|
X-Count-Write:
|
323
|
-
- user:
|
442
|
+
- user:4,member:4,serviceHostUser:4,serviceHostMember:4,hostUser:4,hostMember:4,ip:0
|
324
443
|
X-Ratelimit-Read:
|
325
444
|
- '1000'
|
326
445
|
X-Ratelimit-Service:
|
@@ -332,15 +451,15 @@ http_interactions:
|
|
332
451
|
X-Route:
|
333
452
|
- "/content-category"
|
334
453
|
X-Route-Time:
|
335
|
-
- '
|
454
|
+
- '321'
|
336
455
|
body:
|
337
456
|
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":
|
457
|
+
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":10,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":4,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":7,"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":"3b2b4ae9-0cce-51ca-a603-39ec481cf037","warnings":[],"time":307.41906166077,"start_microtime":1487658989.5346,"version":"1.17.202","slave_lag":2140532,"member_last_modified_age":1487658989,"output_term":"not_found"}}}'
|
339
458
|
http_version:
|
340
|
-
recorded_at:
|
459
|
+
recorded_at: Tue, 21 Feb 2017 06:36:28 GMT
|
341
460
|
- request:
|
342
461
|
method: get
|
343
|
-
uri: https://api-test.appnexus.com/content-category?id=
|
462
|
+
uri: https://api-test.appnexus.com/content-category?id=47125&num_elements=100&start_element=0
|
344
463
|
body:
|
345
464
|
encoding: US-ASCII
|
346
465
|
string: ''
|
@@ -348,7 +467,7 @@ http_interactions:
|
|
348
467
|
User-Agent:
|
349
468
|
- Faraday v0.11.0
|
350
469
|
Authorization:
|
351
|
-
- hbapi:171678:
|
470
|
+
- hbapi:171678:58abdfe5637c0:nym2
|
352
471
|
Accept-Encoding:
|
353
472
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
354
473
|
Accept:
|
@@ -361,11 +480,11 @@ http_interactions:
|
|
361
480
|
Cache-Control:
|
362
481
|
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0;no-cache
|
363
482
|
Content-Length:
|
364
|
-
- '
|
483
|
+
- '817'
|
365
484
|
Content-Type:
|
366
485
|
- application/json
|
367
486
|
Date:
|
368
|
-
-
|
487
|
+
- Tue, 21 Feb 2017 06:36:30 GMT
|
369
488
|
Expires:
|
370
489
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
371
490
|
Pragma:
|
@@ -373,11 +492,11 @@ http_interactions:
|
|
373
492
|
Server:
|
374
493
|
- Apache
|
375
494
|
Set-Cookie:
|
376
|
-
- HBFAPI_SESSID=hbapi%3A171678%
|
495
|
+
- HBFAPI_SESSID=hbapi%3A171678%3A58abdfe5637c0%3Anym2; Path=/
|
377
496
|
X-Count-Read:
|
378
|
-
- user:
|
497
|
+
- user:11,member:8,serviceHostUser:4,serviceHostMember:4,hostUser:8,hostMember:8,ip:0
|
379
498
|
X-Count-Write:
|
380
|
-
- user:
|
499
|
+
- user:4,member:4,serviceHostUser:4,serviceHostMember:4,hostUser:4,hostMember:4,ip:0
|
381
500
|
X-Ratelimit-Read:
|
382
501
|
- '1000'
|
383
502
|
X-Ratelimit-Service:
|
@@ -389,10 +508,10 @@ http_interactions:
|
|
389
508
|
X-Route:
|
390
509
|
- "/content-category"
|
391
510
|
X-Route-Time:
|
392
|
-
- '
|
511
|
+
- '28'
|
393
512
|
body:
|
394
513
|
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":
|
514
|
+
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":11,"user::read_limit":1000,"user::read_limit_seconds":60,"user::writes":4,"user::write_limit":1000,"user::write_limit_seconds":60,"reads":8,"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":"dc4e9425-1d3c-5e47-b143-613136cc9aec","warnings":[],"time":18.599987030029,"start_microtime":1487658990.9863,"version":"1.17.202","slave_miss":"no_slaves_found","slave_lag":2140533,"member_last_modified_age":1,"output_term":"not_found"}}}'
|
396
515
|
http_version:
|
397
|
-
recorded_at:
|
516
|
+
recorded_at: Tue, 21 Feb 2017 06:36:29 GMT
|
398
517
|
recorded_with: VCR 3.0.3
|