access 1.1.7 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -0
- data/.gitignore +2 -0
- data/.travis.yml +12 -0
- data/Guardfile +7 -0
- data/README.md +159 -23
- data/Rakefile +13 -0
- data/access.gemspec +6 -1
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/access.rb +21 -10
- data/lib/access/api.rb +188 -64
- data/lib/access/autocomplete.rb +11 -0
- data/lib/access/campaign.rb +24 -0
- data/lib/access/category.rb +16 -2
- data/lib/access/channel.rb +24 -0
- data/lib/access/city_savings.rb +16 -0
- data/lib/access/config.rb +8 -7
- data/lib/access/error.rb +8 -2
- data/lib/access/filter.rb +30 -2
- data/lib/access/info.rb +13 -0
- data/lib/access/link.rb +17 -0
- data/lib/access/location.rb +17 -2
- data/lib/access/member.rb +11 -0
- data/lib/access/oauth_application.rb +31 -0
- data/lib/access/offer.rb +24 -20
- data/lib/access/redeem.rb +11 -4
- data/lib/access/report.rb +10 -0
- data/lib/access/request.rb +25 -20
- data/lib/access/response.rb +127 -0
- data/lib/access/spot.rb +28 -0
- data/lib/access/store.rb +16 -2
- data/lib/access/token.rb +18 -0
- data/lib/access/verify.rb +11 -2
- data/lib/access/version.rb +1 -1
- data/test/access/autocomplete_test.rb +53 -0
- data/test/access/category_test.rb +64 -0
- data/test/access/city_savings_test.rb +5 -0
- data/test/access/filter_test.rb +40 -0
- data/test/access/location_test.rb +59 -0
- data/test/access/member_test.rb +5 -0
- data/test/access/oauth_application_test.rb +91 -0
- data/test/access/offer_test.rb +71 -0
- data/test/access/redeem_test.rb +38 -0
- data/test/access/report_test.rb +36 -0
- data/test/access/store_test.rb +65 -0
- data/test/access/token_test.rb +35 -0
- data/test/access/verify_test.rb +29 -0
- data/test/access/version_test.rb +9 -0
- data/test/fixtures/autocomplete_search.yml +207 -0
- data/test/fixtures/autocomplete_search_categories.yml +181 -0
- data/test/fixtures/autocomplete_search_locations.yml +173 -0
- data/test/fixtures/autocomplete_search_offers.yml +181 -0
- data/test/fixtures/autocomplete_search_stores.yml +185 -0
- data/test/fixtures/category_find.yml +303 -0
- data/test/fixtures/category_search.yml +683 -0
- data/test/fixtures/category_search_fail_member_key.yml +102 -0
- data/test/fixtures/filter_find.yml +70 -0
- data/test/fixtures/filter_search.yml +195 -0
- data/test/fixtures/location_find.yml +923 -0
- data/test/fixtures/location_search.yml +378 -0
- data/test/fixtures/location_search_fail_member_key.yml +367 -0
- data/test/fixtures/national_stores.yml +4135 -0
- data/test/fixtures/oauth_application_find.yml +163 -0
- data/test/fixtures/oauth_application_search.yml +134 -0
- data/test/fixtures/oauth_application_search_fail_member_key.yml +268 -0
- data/test/fixtures/oauth_application_token_find.yml +249 -0
- data/test/fixtures/oauth_application_token_search.yml +98 -0
- data/test/fixtures/offer_find.yml +683 -0
- data/test/fixtures/offer_search.yml +329 -0
- data/test/fixtures/offer_search_fail_member_key.yml +102 -0
- data/test/fixtures/redeem_offer_no_redeem_type.yml +423 -0
- data/test/fixtures/store_find.yml +333 -0
- data/test/fixtures/store_search.yml +227 -0
- data/test/fixtures/store_search_fail_member_key.yml +102 -0
- data/test/fixtures/subcategory_find.yml +283 -0
- data/test/fixtures/token_find.yml +245 -0
- data/test/fixtures/token_search.yml +301 -0
- data/test/fixtures/verify_filter.yml +290 -0
- data/test/fixtures/verify_token.yml +78 -0
- data/test/test_helper.rb +15 -0
- metadata +183 -11
- data/test/offers/offer_test.rb +0 -5
@@ -0,0 +1,683 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://offer-demo.adcrws.com/v1/categories
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: member_key=guest&per_page=1
|
9
|
+
headers:
|
10
|
+
Access-Token:
|
11
|
+
- token_without_limit
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 400
|
19
|
+
message: Bad Request
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Date:
|
24
|
+
- Thu, 06 Aug 2015 17:30:03 GMT
|
25
|
+
Server:
|
26
|
+
- nginx/1.6.2
|
27
|
+
Strict-Transport-Security:
|
28
|
+
- max-age=31536000
|
29
|
+
X-Request-Id:
|
30
|
+
- 4e467354-c922-49bd-bc70-33cd41e6276d
|
31
|
+
X-Runtime:
|
32
|
+
- '0.000287'
|
33
|
+
Content-Length:
|
34
|
+
- '133'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"status":400,"message":"There was a problem in the JSON you submitted:
|
40
|
+
795: unexpected token at ''member_key=guest\u0026per_page=1''"}'
|
41
|
+
http_version:
|
42
|
+
recorded_at: Thu, 06 Aug 2015 17:30:03 GMT
|
43
|
+
- request:
|
44
|
+
method: get
|
45
|
+
uri: https://offer-demo.adcrws.com/v1/categories?member_key=guest&per_page=1
|
46
|
+
body:
|
47
|
+
encoding: US-ASCII
|
48
|
+
string: ''
|
49
|
+
headers:
|
50
|
+
Access-Token:
|
51
|
+
- token_without_limit
|
52
|
+
Content-Type:
|
53
|
+
- application/json
|
54
|
+
Accept:
|
55
|
+
- application/json
|
56
|
+
response:
|
57
|
+
status:
|
58
|
+
code: 200
|
59
|
+
message: OK
|
60
|
+
headers:
|
61
|
+
Access-Control-Allow-Headers:
|
62
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
|
63
|
+
Access-Control-Allow-Methods:
|
64
|
+
- POST, GET, PUT, DELETE, OPTIONS
|
65
|
+
Access-Control-Max-Age:
|
66
|
+
- '1728000'
|
67
|
+
Access-Control-Request-Method:
|
68
|
+
- GET
|
69
|
+
Cache-Control:
|
70
|
+
- max-age=0, private, must-revalidate
|
71
|
+
Content-Type:
|
72
|
+
- application/json
|
73
|
+
Date:
|
74
|
+
- Thu, 06 Aug 2015 17:51:02 GMT
|
75
|
+
Etag:
|
76
|
+
- '"bfcd9d337e74a9f83509dc08b8d3566b"'
|
77
|
+
Server:
|
78
|
+
- nginx/1.6.2
|
79
|
+
Strict-Transport-Security:
|
80
|
+
- max-age=31536000
|
81
|
+
X-Content-Type-Options:
|
82
|
+
- nosniff
|
83
|
+
X-Frame-Options:
|
84
|
+
- SAMEORIGIN
|
85
|
+
X-Request-Id:
|
86
|
+
- 4b5b3295-24af-4783-a00d-aa3d96799508
|
87
|
+
X-Runtime:
|
88
|
+
- '0.016613'
|
89
|
+
X-Xss-Protection:
|
90
|
+
- 1; mode=block
|
91
|
+
Content-Length:
|
92
|
+
- '4040'
|
93
|
+
Connection:
|
94
|
+
- keep-alive
|
95
|
+
body:
|
96
|
+
encoding: UTF-8
|
97
|
+
string: |-
|
98
|
+
{
|
99
|
+
"info": {
|
100
|
+
"total_results": 16,
|
101
|
+
"current_page": 1,
|
102
|
+
"total_pages": 16,
|
103
|
+
"results_per_page": 1
|
104
|
+
},
|
105
|
+
"categories": [
|
106
|
+
{
|
107
|
+
"category_name": "Automotive",
|
108
|
+
"category_key": 51,
|
109
|
+
"category_type": "category",
|
110
|
+
"category_parent_name": null,
|
111
|
+
"category_parent_key": null,
|
112
|
+
"links": {
|
113
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
114
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=51"
|
115
|
+
},
|
116
|
+
"subcategories": [
|
117
|
+
{
|
118
|
+
"category_name": "Auto Body & Paint",
|
119
|
+
"category_key": 1000,
|
120
|
+
"category_type": "subcategory",
|
121
|
+
"category_parent_key": 51,
|
122
|
+
"links": {
|
123
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1000",
|
124
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
125
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1000"
|
126
|
+
}
|
127
|
+
},
|
128
|
+
{
|
129
|
+
"category_name": "Auto Parts",
|
130
|
+
"category_key": 1001,
|
131
|
+
"category_type": "subcategory",
|
132
|
+
"category_parent_key": 51,
|
133
|
+
"links": {
|
134
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1001",
|
135
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
136
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1001"
|
137
|
+
}
|
138
|
+
},
|
139
|
+
{
|
140
|
+
"category_name": "Auto Service & Repair",
|
141
|
+
"category_key": 1002,
|
142
|
+
"category_type": "subcategory",
|
143
|
+
"category_parent_key": 51,
|
144
|
+
"links": {
|
145
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1002",
|
146
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
147
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1002"
|
148
|
+
}
|
149
|
+
},
|
150
|
+
{
|
151
|
+
"category_name": "Car Wash & Detail",
|
152
|
+
"category_key": 1003,
|
153
|
+
"category_type": "subcategory",
|
154
|
+
"category_parent_key": 51,
|
155
|
+
"links": {
|
156
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1003",
|
157
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
158
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1003"
|
159
|
+
}
|
160
|
+
},
|
161
|
+
{
|
162
|
+
"category_name": "Gas Station",
|
163
|
+
"category_key": 1004,
|
164
|
+
"category_type": "subcategory",
|
165
|
+
"category_parent_key": 51,
|
166
|
+
"links": {
|
167
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1004",
|
168
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
169
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1004"
|
170
|
+
}
|
171
|
+
},
|
172
|
+
{
|
173
|
+
"category_name": "Tires",
|
174
|
+
"category_key": 1005,
|
175
|
+
"category_type": "subcategory",
|
176
|
+
"category_parent_key": 51,
|
177
|
+
"links": {
|
178
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1005",
|
179
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
180
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1005"
|
181
|
+
}
|
182
|
+
},
|
183
|
+
{
|
184
|
+
"category_name": "Auto Sales & Warranties",
|
185
|
+
"category_key": 1006,
|
186
|
+
"category_type": "subcategory",
|
187
|
+
"category_parent_key": 51,
|
188
|
+
"links": {
|
189
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1006",
|
190
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
191
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1006"
|
192
|
+
}
|
193
|
+
}
|
194
|
+
]
|
195
|
+
}
|
196
|
+
],
|
197
|
+
"links": {
|
198
|
+
"next_page": "https://offer-demo.adcrws.com/v1/categories?member_key=guest&page=2&per_page=1"
|
199
|
+
}
|
200
|
+
}
|
201
|
+
http_version:
|
202
|
+
recorded_at: Thu, 06 Aug 2015 17:51:02 GMT
|
203
|
+
- request:
|
204
|
+
method: get
|
205
|
+
uri: https://offer-demo.adcrws.com/v1/categories?member_key=guest&per_page=1
|
206
|
+
body:
|
207
|
+
encoding: US-ASCII
|
208
|
+
string: ''
|
209
|
+
headers:
|
210
|
+
Access-Token:
|
211
|
+
- token_without_limit
|
212
|
+
Content-Type:
|
213
|
+
- application/json
|
214
|
+
Accept:
|
215
|
+
- application/json
|
216
|
+
response:
|
217
|
+
status:
|
218
|
+
code: 200
|
219
|
+
message: OK
|
220
|
+
headers:
|
221
|
+
Access-Control-Allow-Headers:
|
222
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
|
223
|
+
Access-Control-Allow-Methods:
|
224
|
+
- POST, GET, PUT, DELETE, OPTIONS
|
225
|
+
Access-Control-Max-Age:
|
226
|
+
- '1728000'
|
227
|
+
Access-Control-Request-Method:
|
228
|
+
- GET
|
229
|
+
Cache-Control:
|
230
|
+
- max-age=0, private, must-revalidate
|
231
|
+
Content-Type:
|
232
|
+
- application/json
|
233
|
+
Date:
|
234
|
+
- Thu, 06 Aug 2015 17:51:02 GMT
|
235
|
+
Etag:
|
236
|
+
- '"bfcd9d337e74a9f83509dc08b8d3566b"'
|
237
|
+
Server:
|
238
|
+
- nginx/1.6.2
|
239
|
+
Strict-Transport-Security:
|
240
|
+
- max-age=31536000
|
241
|
+
X-Content-Type-Options:
|
242
|
+
- nosniff
|
243
|
+
X-Frame-Options:
|
244
|
+
- SAMEORIGIN
|
245
|
+
X-Request-Id:
|
246
|
+
- ab1fc13d-ce00-4c5f-bdf3-c9ccd3ac4d80
|
247
|
+
X-Runtime:
|
248
|
+
- '0.017141'
|
249
|
+
X-Xss-Protection:
|
250
|
+
- 1; mode=block
|
251
|
+
Content-Length:
|
252
|
+
- '4040'
|
253
|
+
Connection:
|
254
|
+
- keep-alive
|
255
|
+
body:
|
256
|
+
encoding: UTF-8
|
257
|
+
string: |-
|
258
|
+
{
|
259
|
+
"info": {
|
260
|
+
"total_results": 16,
|
261
|
+
"current_page": 1,
|
262
|
+
"total_pages": 16,
|
263
|
+
"results_per_page": 1
|
264
|
+
},
|
265
|
+
"categories": [
|
266
|
+
{
|
267
|
+
"category_name": "Automotive",
|
268
|
+
"category_key": 51,
|
269
|
+
"category_type": "category",
|
270
|
+
"category_parent_name": null,
|
271
|
+
"category_parent_key": null,
|
272
|
+
"links": {
|
273
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
274
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=51"
|
275
|
+
},
|
276
|
+
"subcategories": [
|
277
|
+
{
|
278
|
+
"category_name": "Auto Body & Paint",
|
279
|
+
"category_key": 1000,
|
280
|
+
"category_type": "subcategory",
|
281
|
+
"category_parent_key": 51,
|
282
|
+
"links": {
|
283
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1000",
|
284
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
285
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1000"
|
286
|
+
}
|
287
|
+
},
|
288
|
+
{
|
289
|
+
"category_name": "Auto Parts",
|
290
|
+
"category_key": 1001,
|
291
|
+
"category_type": "subcategory",
|
292
|
+
"category_parent_key": 51,
|
293
|
+
"links": {
|
294
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1001",
|
295
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
296
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1001"
|
297
|
+
}
|
298
|
+
},
|
299
|
+
{
|
300
|
+
"category_name": "Auto Service & Repair",
|
301
|
+
"category_key": 1002,
|
302
|
+
"category_type": "subcategory",
|
303
|
+
"category_parent_key": 51,
|
304
|
+
"links": {
|
305
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1002",
|
306
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
307
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1002"
|
308
|
+
}
|
309
|
+
},
|
310
|
+
{
|
311
|
+
"category_name": "Car Wash & Detail",
|
312
|
+
"category_key": 1003,
|
313
|
+
"category_type": "subcategory",
|
314
|
+
"category_parent_key": 51,
|
315
|
+
"links": {
|
316
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1003",
|
317
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
318
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1003"
|
319
|
+
}
|
320
|
+
},
|
321
|
+
{
|
322
|
+
"category_name": "Gas Station",
|
323
|
+
"category_key": 1004,
|
324
|
+
"category_type": "subcategory",
|
325
|
+
"category_parent_key": 51,
|
326
|
+
"links": {
|
327
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1004",
|
328
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
329
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1004"
|
330
|
+
}
|
331
|
+
},
|
332
|
+
{
|
333
|
+
"category_name": "Tires",
|
334
|
+
"category_key": 1005,
|
335
|
+
"category_type": "subcategory",
|
336
|
+
"category_parent_key": 51,
|
337
|
+
"links": {
|
338
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1005",
|
339
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
340
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1005"
|
341
|
+
}
|
342
|
+
},
|
343
|
+
{
|
344
|
+
"category_name": "Auto Sales & Warranties",
|
345
|
+
"category_key": 1006,
|
346
|
+
"category_type": "subcategory",
|
347
|
+
"category_parent_key": 51,
|
348
|
+
"links": {
|
349
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1006",
|
350
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
351
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1006"
|
352
|
+
}
|
353
|
+
}
|
354
|
+
]
|
355
|
+
}
|
356
|
+
],
|
357
|
+
"links": {
|
358
|
+
"next_page": "https://offer-demo.adcrws.com/v1/categories?member_key=guest&page=2&per_page=1"
|
359
|
+
}
|
360
|
+
}
|
361
|
+
http_version:
|
362
|
+
recorded_at: Thu, 06 Aug 2015 17:51:02 GMT
|
363
|
+
- request:
|
364
|
+
method: get
|
365
|
+
uri: https://offer-demo.adcrws.com/v1/categories?member_key=API_RUBY_GEM_TEST&per_page=1
|
366
|
+
body:
|
367
|
+
encoding: US-ASCII
|
368
|
+
string: ''
|
369
|
+
headers:
|
370
|
+
Access-Token:
|
371
|
+
- token_without_limit
|
372
|
+
Content-Type:
|
373
|
+
- application/json
|
374
|
+
Accept:
|
375
|
+
- application/json
|
376
|
+
response:
|
377
|
+
status:
|
378
|
+
code: 200
|
379
|
+
message: OK
|
380
|
+
headers:
|
381
|
+
Access-Control-Allow-Headers:
|
382
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
|
383
|
+
Access-Control-Allow-Methods:
|
384
|
+
- POST, GET, PUT, DELETE, OPTIONS
|
385
|
+
Access-Control-Max-Age:
|
386
|
+
- '1728000'
|
387
|
+
Access-Control-Request-Method:
|
388
|
+
- GET
|
389
|
+
Cache-Control:
|
390
|
+
- max-age=0, private, must-revalidate
|
391
|
+
Content-Type:
|
392
|
+
- application/json
|
393
|
+
Date:
|
394
|
+
- Wed, 12 Aug 2015 17:46:34 GMT
|
395
|
+
Etag:
|
396
|
+
- '"6aabadd453befa6a76c2350cfbc70034"'
|
397
|
+
Server:
|
398
|
+
- nginx/1.6.2
|
399
|
+
Strict-Transport-Security:
|
400
|
+
- max-age=31536000
|
401
|
+
X-Content-Type-Options:
|
402
|
+
- nosniff
|
403
|
+
X-Frame-Options:
|
404
|
+
- SAMEORIGIN
|
405
|
+
X-Request-Id:
|
406
|
+
- 897ef2db-aaf9-4bbb-ade7-1ac67608ee7a
|
407
|
+
X-Runtime:
|
408
|
+
- '0.015377'
|
409
|
+
X-Xss-Protection:
|
410
|
+
- 1; mode=block
|
411
|
+
Content-Length:
|
412
|
+
- '4052'
|
413
|
+
Connection:
|
414
|
+
- keep-alive
|
415
|
+
body:
|
416
|
+
encoding: UTF-8
|
417
|
+
string: |-
|
418
|
+
{
|
419
|
+
"info": {
|
420
|
+
"total_results": 16,
|
421
|
+
"current_page": 1,
|
422
|
+
"total_pages": 16,
|
423
|
+
"results_per_page": 1
|
424
|
+
},
|
425
|
+
"categories": [
|
426
|
+
{
|
427
|
+
"category_name": "Automotive",
|
428
|
+
"category_key": 51,
|
429
|
+
"category_type": "category",
|
430
|
+
"category_parent_name": null,
|
431
|
+
"category_parent_key": null,
|
432
|
+
"links": {
|
433
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
434
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=51"
|
435
|
+
},
|
436
|
+
"subcategories": [
|
437
|
+
{
|
438
|
+
"category_name": "Auto Body & Paint",
|
439
|
+
"category_key": 1000,
|
440
|
+
"category_type": "subcategory",
|
441
|
+
"category_parent_key": 51,
|
442
|
+
"links": {
|
443
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1000",
|
444
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
445
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1000"
|
446
|
+
}
|
447
|
+
},
|
448
|
+
{
|
449
|
+
"category_name": "Auto Parts",
|
450
|
+
"category_key": 1001,
|
451
|
+
"category_type": "subcategory",
|
452
|
+
"category_parent_key": 51,
|
453
|
+
"links": {
|
454
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1001",
|
455
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
456
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1001"
|
457
|
+
}
|
458
|
+
},
|
459
|
+
{
|
460
|
+
"category_name": "Auto Service & Repair",
|
461
|
+
"category_key": 1002,
|
462
|
+
"category_type": "subcategory",
|
463
|
+
"category_parent_key": 51,
|
464
|
+
"links": {
|
465
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1002",
|
466
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
467
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1002"
|
468
|
+
}
|
469
|
+
},
|
470
|
+
{
|
471
|
+
"category_name": "Car Wash & Detail",
|
472
|
+
"category_key": 1003,
|
473
|
+
"category_type": "subcategory",
|
474
|
+
"category_parent_key": 51,
|
475
|
+
"links": {
|
476
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1003",
|
477
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
478
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1003"
|
479
|
+
}
|
480
|
+
},
|
481
|
+
{
|
482
|
+
"category_name": "Gas Station",
|
483
|
+
"category_key": 1004,
|
484
|
+
"category_type": "subcategory",
|
485
|
+
"category_parent_key": 51,
|
486
|
+
"links": {
|
487
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1004",
|
488
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
489
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1004"
|
490
|
+
}
|
491
|
+
},
|
492
|
+
{
|
493
|
+
"category_name": "Tires",
|
494
|
+
"category_key": 1005,
|
495
|
+
"category_type": "subcategory",
|
496
|
+
"category_parent_key": 51,
|
497
|
+
"links": {
|
498
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1005",
|
499
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
500
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1005"
|
501
|
+
}
|
502
|
+
},
|
503
|
+
{
|
504
|
+
"category_name": "Auto Sales & Warranties",
|
505
|
+
"category_key": 1006,
|
506
|
+
"category_type": "subcategory",
|
507
|
+
"category_parent_key": 51,
|
508
|
+
"links": {
|
509
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1006",
|
510
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
511
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1006"
|
512
|
+
}
|
513
|
+
}
|
514
|
+
]
|
515
|
+
}
|
516
|
+
],
|
517
|
+
"links": {
|
518
|
+
"next_page": "https://offer-demo.adcrws.com/v1/categories?member_key=API_RUBY_GEM_TEST&page=2&per_page=1"
|
519
|
+
}
|
520
|
+
}
|
521
|
+
http_version:
|
522
|
+
recorded_at: Wed, 12 Aug 2015 17:46:34 GMT
|
523
|
+
- request:
|
524
|
+
method: get
|
525
|
+
uri: https://offer-demo.adcrws.com/v1/categories?member_key=API_RUBY_GEM_TEST&per_page=1
|
526
|
+
body:
|
527
|
+
encoding: US-ASCII
|
528
|
+
string: ''
|
529
|
+
headers:
|
530
|
+
Access-Token:
|
531
|
+
- token_without_limit
|
532
|
+
Content-Type:
|
533
|
+
- application/json
|
534
|
+
Accept:
|
535
|
+
- application/json
|
536
|
+
response:
|
537
|
+
status:
|
538
|
+
code: 200
|
539
|
+
message: OK
|
540
|
+
headers:
|
541
|
+
Access-Control-Allow-Headers:
|
542
|
+
- Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
|
543
|
+
Access-Control-Allow-Methods:
|
544
|
+
- POST, GET, PUT, DELETE, OPTIONS
|
545
|
+
Access-Control-Max-Age:
|
546
|
+
- '1728000'
|
547
|
+
Access-Control-Request-Method:
|
548
|
+
- GET
|
549
|
+
Cache-Control:
|
550
|
+
- max-age=0, private, must-revalidate
|
551
|
+
Content-Type:
|
552
|
+
- application/json
|
553
|
+
Date:
|
554
|
+
- Wed, 12 Aug 2015 17:46:35 GMT
|
555
|
+
Etag:
|
556
|
+
- '"6aabadd453befa6a76c2350cfbc70034"'
|
557
|
+
Server:
|
558
|
+
- nginx/1.6.2
|
559
|
+
Strict-Transport-Security:
|
560
|
+
- max-age=31536000
|
561
|
+
X-Content-Type-Options:
|
562
|
+
- nosniff
|
563
|
+
X-Frame-Options:
|
564
|
+
- SAMEORIGIN
|
565
|
+
X-Request-Id:
|
566
|
+
- 181c5568-3f33-4770-a070-dc399f880013
|
567
|
+
X-Runtime:
|
568
|
+
- '0.016198'
|
569
|
+
X-Xss-Protection:
|
570
|
+
- 1; mode=block
|
571
|
+
Content-Length:
|
572
|
+
- '4052'
|
573
|
+
Connection:
|
574
|
+
- keep-alive
|
575
|
+
body:
|
576
|
+
encoding: UTF-8
|
577
|
+
string: |-
|
578
|
+
{
|
579
|
+
"info": {
|
580
|
+
"total_results": 16,
|
581
|
+
"current_page": 1,
|
582
|
+
"total_pages": 16,
|
583
|
+
"results_per_page": 1
|
584
|
+
},
|
585
|
+
"categories": [
|
586
|
+
{
|
587
|
+
"category_name": "Automotive",
|
588
|
+
"category_key": 51,
|
589
|
+
"category_type": "category",
|
590
|
+
"category_parent_name": null,
|
591
|
+
"category_parent_key": null,
|
592
|
+
"links": {
|
593
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
594
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=51"
|
595
|
+
},
|
596
|
+
"subcategories": [
|
597
|
+
{
|
598
|
+
"category_name": "Auto Body & Paint",
|
599
|
+
"category_key": 1000,
|
600
|
+
"category_type": "subcategory",
|
601
|
+
"category_parent_key": 51,
|
602
|
+
"links": {
|
603
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1000",
|
604
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
605
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1000"
|
606
|
+
}
|
607
|
+
},
|
608
|
+
{
|
609
|
+
"category_name": "Auto Parts",
|
610
|
+
"category_key": 1001,
|
611
|
+
"category_type": "subcategory",
|
612
|
+
"category_parent_key": 51,
|
613
|
+
"links": {
|
614
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1001",
|
615
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
616
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1001"
|
617
|
+
}
|
618
|
+
},
|
619
|
+
{
|
620
|
+
"category_name": "Auto Service & Repair",
|
621
|
+
"category_key": 1002,
|
622
|
+
"category_type": "subcategory",
|
623
|
+
"category_parent_key": 51,
|
624
|
+
"links": {
|
625
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1002",
|
626
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
627
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1002"
|
628
|
+
}
|
629
|
+
},
|
630
|
+
{
|
631
|
+
"category_name": "Car Wash & Detail",
|
632
|
+
"category_key": 1003,
|
633
|
+
"category_type": "subcategory",
|
634
|
+
"category_parent_key": 51,
|
635
|
+
"links": {
|
636
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1003",
|
637
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
638
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1003"
|
639
|
+
}
|
640
|
+
},
|
641
|
+
{
|
642
|
+
"category_name": "Gas Station",
|
643
|
+
"category_key": 1004,
|
644
|
+
"category_type": "subcategory",
|
645
|
+
"category_parent_key": 51,
|
646
|
+
"links": {
|
647
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1004",
|
648
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
649
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1004"
|
650
|
+
}
|
651
|
+
},
|
652
|
+
{
|
653
|
+
"category_name": "Tires",
|
654
|
+
"category_key": 1005,
|
655
|
+
"category_type": "subcategory",
|
656
|
+
"category_parent_key": 51,
|
657
|
+
"links": {
|
658
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1005",
|
659
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
660
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1005"
|
661
|
+
}
|
662
|
+
},
|
663
|
+
{
|
664
|
+
"category_name": "Auto Sales & Warranties",
|
665
|
+
"category_key": 1006,
|
666
|
+
"category_type": "subcategory",
|
667
|
+
"category_parent_key": 51,
|
668
|
+
"links": {
|
669
|
+
"show_category": "https://offer-demo.adcrws.com/v1/categories/1006",
|
670
|
+
"show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
|
671
|
+
"find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1006"
|
672
|
+
}
|
673
|
+
}
|
674
|
+
]
|
675
|
+
}
|
676
|
+
],
|
677
|
+
"links": {
|
678
|
+
"next_page": "https://offer-demo.adcrws.com/v1/categories?member_key=API_RUBY_GEM_TEST&page=2&per_page=1"
|
679
|
+
}
|
680
|
+
}
|
681
|
+
http_version:
|
682
|
+
recorded_at: Wed, 12 Aug 2015 17:46:35 GMT
|
683
|
+
recorded_with: VCR 2.9.3
|