access 1.1.7 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +2 -0
  4. data/.travis.yml +12 -0
  5. data/Guardfile +7 -0
  6. data/README.md +159 -23
  7. data/Rakefile +13 -0
  8. data/access.gemspec +6 -1
  9. data/bin/console +14 -0
  10. data/bin/setup +7 -0
  11. data/lib/access.rb +21 -10
  12. data/lib/access/api.rb +188 -64
  13. data/lib/access/autocomplete.rb +11 -0
  14. data/lib/access/campaign.rb +24 -0
  15. data/lib/access/category.rb +16 -2
  16. data/lib/access/channel.rb +24 -0
  17. data/lib/access/city_savings.rb +16 -0
  18. data/lib/access/config.rb +8 -7
  19. data/lib/access/error.rb +8 -2
  20. data/lib/access/filter.rb +30 -2
  21. data/lib/access/info.rb +13 -0
  22. data/lib/access/link.rb +17 -0
  23. data/lib/access/location.rb +17 -2
  24. data/lib/access/member.rb +11 -0
  25. data/lib/access/oauth_application.rb +31 -0
  26. data/lib/access/offer.rb +24 -20
  27. data/lib/access/redeem.rb +11 -4
  28. data/lib/access/report.rb +10 -0
  29. data/lib/access/request.rb +25 -20
  30. data/lib/access/response.rb +127 -0
  31. data/lib/access/spot.rb +28 -0
  32. data/lib/access/store.rb +16 -2
  33. data/lib/access/token.rb +18 -0
  34. data/lib/access/verify.rb +11 -2
  35. data/lib/access/version.rb +1 -1
  36. data/test/access/autocomplete_test.rb +53 -0
  37. data/test/access/category_test.rb +64 -0
  38. data/test/access/city_savings_test.rb +5 -0
  39. data/test/access/filter_test.rb +40 -0
  40. data/test/access/location_test.rb +59 -0
  41. data/test/access/member_test.rb +5 -0
  42. data/test/access/oauth_application_test.rb +91 -0
  43. data/test/access/offer_test.rb +71 -0
  44. data/test/access/redeem_test.rb +38 -0
  45. data/test/access/report_test.rb +36 -0
  46. data/test/access/store_test.rb +65 -0
  47. data/test/access/token_test.rb +35 -0
  48. data/test/access/verify_test.rb +29 -0
  49. data/test/access/version_test.rb +9 -0
  50. data/test/fixtures/autocomplete_search.yml +207 -0
  51. data/test/fixtures/autocomplete_search_categories.yml +181 -0
  52. data/test/fixtures/autocomplete_search_locations.yml +173 -0
  53. data/test/fixtures/autocomplete_search_offers.yml +181 -0
  54. data/test/fixtures/autocomplete_search_stores.yml +185 -0
  55. data/test/fixtures/category_find.yml +303 -0
  56. data/test/fixtures/category_search.yml +683 -0
  57. data/test/fixtures/category_search_fail_member_key.yml +102 -0
  58. data/test/fixtures/filter_find.yml +70 -0
  59. data/test/fixtures/filter_search.yml +195 -0
  60. data/test/fixtures/location_find.yml +923 -0
  61. data/test/fixtures/location_search.yml +378 -0
  62. data/test/fixtures/location_search_fail_member_key.yml +367 -0
  63. data/test/fixtures/national_stores.yml +4135 -0
  64. data/test/fixtures/oauth_application_find.yml +163 -0
  65. data/test/fixtures/oauth_application_search.yml +134 -0
  66. data/test/fixtures/oauth_application_search_fail_member_key.yml +268 -0
  67. data/test/fixtures/oauth_application_token_find.yml +249 -0
  68. data/test/fixtures/oauth_application_token_search.yml +98 -0
  69. data/test/fixtures/offer_find.yml +683 -0
  70. data/test/fixtures/offer_search.yml +329 -0
  71. data/test/fixtures/offer_search_fail_member_key.yml +102 -0
  72. data/test/fixtures/redeem_offer_no_redeem_type.yml +423 -0
  73. data/test/fixtures/store_find.yml +333 -0
  74. data/test/fixtures/store_search.yml +227 -0
  75. data/test/fixtures/store_search_fail_member_key.yml +102 -0
  76. data/test/fixtures/subcategory_find.yml +283 -0
  77. data/test/fixtures/token_find.yml +245 -0
  78. data/test/fixtures/token_search.yml +301 -0
  79. data/test/fixtures/verify_filter.yml +290 -0
  80. data/test/fixtures/verify_token.yml +78 -0
  81. data/test/test_helper.rb +15 -0
  82. metadata +183 -11
  83. data/test/offers/offer_test.rb +0 -5
@@ -0,0 +1,378 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://token-demo.adcrws.com/v1/oauth_applications?member_key=guest&per_page=1
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
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: 200
19
+ message: OK
20
+ headers:
21
+ Access-Control-Allow-Headers:
22
+ - Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
23
+ Access-Control-Allow-Methods:
24
+ - POST, GET, PUT, DELETE, OPTIONS
25
+ Access-Control-Max-Age:
26
+ - '1728000'
27
+ Access-Control-Request-Method:
28
+ - GET
29
+ Cache-Control:
30
+ - max-age=0, private, must-revalidate
31
+ Content-Type:
32
+ - application/json
33
+ Date:
34
+ - Sat, 01 Aug 2015 03:53:59 GMT
35
+ Etag:
36
+ - '"f6696b8f4112edcc7bacb4359fb29c66"'
37
+ Server:
38
+ - nginx/1.6.2
39
+ Strict-Transport-Security:
40
+ - max-age=31536000
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Frame-Options:
44
+ - SAMEORIGIN
45
+ X-Request-Id:
46
+ - 150a6278-d1bf-4034-a086-25d9db00b456
47
+ X-Runtime:
48
+ - '0.043797'
49
+ X-Xss-Protection:
50
+ - 1; mode=block
51
+ Content-Length:
52
+ - '778'
53
+ Connection:
54
+ - keep-alive
55
+ body:
56
+ encoding: UTF-8
57
+ string: |-
58
+ {
59
+ "info": {
60
+ "total_results": 701,
61
+ "results_per_page": 1,
62
+ "current_page": 1,
63
+ "total_pages": 701
64
+ },
65
+ "oauth_applications": [
66
+ {
67
+ "id": 22,
68
+ "name": "American Grandparents Association",
69
+ "owner_id": 235308134,
70
+ "owner_type": "Program",
71
+ "domain_urls": null,
72
+ "scopes": [
73
+ "api",
74
+ "docs"
75
+ ],
76
+ "active_tokens": [
77
+ "e4db3fb9a054e78807c431e837c49a59553c73204de91d404fe43d12c247f805"
78
+ ],
79
+ "filter": {
80
+ "filter_id": 18,
81
+ "filter_name": "Grandparents"
82
+ },
83
+ "links": {
84
+ "show_application": "https://token-demo.adcrws.com/v1/oauth_applications/22"
85
+ }
86
+ }
87
+ ],
88
+ "links": {
89
+ "next_page": "https://report-demo.adcrws.com/v1/oauth_applications?page=2"
90
+ }
91
+ }
92
+ http_version:
93
+ recorded_at: Sat, 01 Aug 2015 03:53:59 GMT
94
+ - request:
95
+ method: get
96
+ uri: https://offer-demo.adcrws.com/v1/locations
97
+ body:
98
+ encoding: UTF-8
99
+ string: member_key=guest&per_page=1
100
+ headers:
101
+ Access-Token:
102
+ - token_without_limit
103
+ Content-Type:
104
+ - application/json
105
+ Accept:
106
+ - application/json
107
+ response:
108
+ status:
109
+ code: 400
110
+ message: Bad Request
111
+ headers:
112
+ Content-Type:
113
+ - application/json
114
+ Date:
115
+ - Thu, 06 Aug 2015 17:30:00 GMT
116
+ Server:
117
+ - nginx/1.6.2
118
+ Strict-Transport-Security:
119
+ - max-age=31536000
120
+ X-Request-Id:
121
+ - 2f7b5e02-a328-4a66-98f7-caa7d01cf93a
122
+ X-Runtime:
123
+ - '0.000309'
124
+ Content-Length:
125
+ - '133'
126
+ Connection:
127
+ - keep-alive
128
+ body:
129
+ encoding: UTF-8
130
+ string: '{"status":400,"message":"There was a problem in the JSON you submitted:
131
+ 795: unexpected token at ''member_key=guest\u0026per_page=1''"}'
132
+ http_version:
133
+ recorded_at: Thu, 06 Aug 2015 17:30:00 GMT
134
+ - request:
135
+ method: get
136
+ uri: https://offer-demo.adcrws.com/v1/locations?member_key=guest&per_page=1
137
+ body:
138
+ encoding: US-ASCII
139
+ string: ''
140
+ headers:
141
+ Access-Token:
142
+ - token_without_limit
143
+ Content-Type:
144
+ - application/json
145
+ Accept:
146
+ - application/json
147
+ response:
148
+ status:
149
+ code: 200
150
+ message: OK
151
+ headers:
152
+ Access-Control-Allow-Headers:
153
+ - Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
154
+ Access-Control-Allow-Methods:
155
+ - POST, GET, PUT, DELETE, OPTIONS
156
+ Access-Control-Max-Age:
157
+ - '1728000'
158
+ Access-Control-Request-Method:
159
+ - GET
160
+ Cache-Control:
161
+ - max-age=0, private, must-revalidate
162
+ Content-Type:
163
+ - application/json
164
+ Date:
165
+ - Thu, 06 Aug 2015 17:51:01 GMT
166
+ Etag:
167
+ - '"77168502114dd12f33b7091d3e75fcf5"'
168
+ Server:
169
+ - nginx/1.6.2
170
+ Strict-Transport-Security:
171
+ - max-age=31536000
172
+ X-Content-Type-Options:
173
+ - nosniff
174
+ X-Frame-Options:
175
+ - SAMEORIGIN
176
+ X-Request-Id:
177
+ - 96e5baa2-6541-4de5-9291-14103d6f25bd
178
+ X-Runtime:
179
+ - '0.029239'
180
+ X-Xss-Protection:
181
+ - 1; mode=block
182
+ Content-Length:
183
+ - '1854'
184
+ Connection:
185
+ - keep-alive
186
+ body:
187
+ encoding: UTF-8
188
+ string: |-
189
+ {
190
+ "info": {
191
+ "total_results": 204900,
192
+ "current_page": 1,
193
+ "total_pages": 204900,
194
+ "results_per_page": 1
195
+ },
196
+ "locations": [
197
+ {
198
+ "search_relevance": 1.0,
199
+ "physical_location": {
200
+ "location_name": "Food Fast",
201
+ "web_address": "http://cefcostores.com",
202
+ "description": null,
203
+ "location_key": 5230448,
204
+ "phone_number": "903-586-5303",
205
+ "postal_code": "75766",
206
+ "country": "US",
207
+ "street_address": "319 E Larissa St",
208
+ "extended_street_address": "",
209
+ "city_locality": "Jacksonville",
210
+ "state_region": "TX",
211
+ "geolocation_array": [
212
+ -95.27013,
213
+ 31.96207
214
+ ],
215
+ "geolocation": {
216
+ "lat": 31.96207,
217
+ "lon": -95.27013
218
+ }
219
+ },
220
+ "location_store": {
221
+ "name": "Food Fast",
222
+ "description": "",
223
+ "store_key": 152815598
224
+ },
225
+ "location_categories": [
226
+ {
227
+ "category_name": "Convenience Stores",
228
+ "category_key": 1012,
229
+ "category_parent_key": 39,
230
+ "category_parent_name": "Dining & Food",
231
+ "category_type": "subcategory"
232
+ }
233
+ ],
234
+ "national": false,
235
+ "logo_url": "https://static-demo.accessdevelopment.com/brand/3193995e29c9aae6bd4d8eb272b8b25db6c08267/original.png",
236
+ "location_photos": [
237
+
238
+ ],
239
+ "active_offer_count": 1,
240
+ "offer_groups": [
241
+ 4099134
242
+ ],
243
+ "links": {
244
+ "show_location": "https://offer-demo.adcrws.com/v1/locations/5230448",
245
+ "show_store": "https://offer-demo.adcrws.com/v1/stores/152815598",
246
+ "find_offers_at_this_location": "https://offer-demo.adcrws.com/v1/offers?location_key=5230448"
247
+ }
248
+ }
249
+ ],
250
+ "links": {
251
+ "next_page": "https://offer-demo.adcrws.com/v1/locations?member_key=guest&page=2&per_page=1"
252
+ }
253
+ }
254
+ http_version:
255
+ recorded_at: Thu, 06 Aug 2015 17:51:01 GMT
256
+ - request:
257
+ method: get
258
+ uri: https://offer-demo.adcrws.com/v1/locations?member_key=API_RUBY_GEM_TEST&per_page=1
259
+ body:
260
+ encoding: US-ASCII
261
+ string: ''
262
+ headers:
263
+ Access-Token:
264
+ - token_without_limit
265
+ Content-Type:
266
+ - application/json
267
+ Accept:
268
+ - application/json
269
+ response:
270
+ status:
271
+ code: 200
272
+ message: OK
273
+ headers:
274
+ Access-Control-Allow-Headers:
275
+ - Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
276
+ Access-Control-Allow-Methods:
277
+ - POST, GET, PUT, DELETE, OPTIONS
278
+ Access-Control-Max-Age:
279
+ - '1728000'
280
+ Access-Control-Request-Method:
281
+ - GET
282
+ Cache-Control:
283
+ - max-age=0, private, must-revalidate
284
+ Content-Type:
285
+ - application/json
286
+ Date:
287
+ - Wed, 12 Aug 2015 17:46:43 GMT
288
+ Etag:
289
+ - '"0ee165cb67dfd9d89b2c2b8934dfd449"'
290
+ Server:
291
+ - nginx/1.6.2
292
+ Strict-Transport-Security:
293
+ - max-age=31536000
294
+ X-Content-Type-Options:
295
+ - nosniff
296
+ X-Frame-Options:
297
+ - SAMEORIGIN
298
+ X-Request-Id:
299
+ - 1838a35a-8353-4faa-b52a-b0f4490af124
300
+ X-Runtime:
301
+ - '0.029199'
302
+ X-Xss-Protection:
303
+ - 1; mode=block
304
+ Content-Length:
305
+ - '1866'
306
+ Connection:
307
+ - keep-alive
308
+ body:
309
+ encoding: UTF-8
310
+ string: |-
311
+ {
312
+ "info": {
313
+ "total_results": 204899,
314
+ "current_page": 1,
315
+ "total_pages": 204899,
316
+ "results_per_page": 1
317
+ },
318
+ "locations": [
319
+ {
320
+ "search_relevance": 1.0,
321
+ "physical_location": {
322
+ "location_name": "Food Fast",
323
+ "web_address": "http://cefcostores.com",
324
+ "description": null,
325
+ "location_key": 5230448,
326
+ "phone_number": "903-586-5303",
327
+ "postal_code": "75766",
328
+ "country": "US",
329
+ "street_address": "319 E Larissa St",
330
+ "extended_street_address": "",
331
+ "city_locality": "Jacksonville",
332
+ "state_region": "TX",
333
+ "geolocation_array": [
334
+ -95.27013,
335
+ 31.96207
336
+ ],
337
+ "geolocation": {
338
+ "lat": 31.96207,
339
+ "lon": -95.27013
340
+ }
341
+ },
342
+ "location_store": {
343
+ "name": "Food Fast",
344
+ "description": "",
345
+ "store_key": 152815598
346
+ },
347
+ "location_categories": [
348
+ {
349
+ "category_name": "Convenience Stores",
350
+ "category_key": 1012,
351
+ "category_parent_key": 39,
352
+ "category_parent_name": "Dining & Food",
353
+ "category_type": "subcategory"
354
+ }
355
+ ],
356
+ "national": false,
357
+ "logo_url": "https://static-demo.accessdevelopment.com/brand/3193995e29c9aae6bd4d8eb272b8b25db6c08267/original.png",
358
+ "location_photos": [
359
+
360
+ ],
361
+ "active_offer_count": 1,
362
+ "offer_groups": [
363
+ 4099134
364
+ ],
365
+ "links": {
366
+ "show_location": "https://offer-demo.adcrws.com/v1/locations/5230448",
367
+ "show_store": "https://offer-demo.adcrws.com/v1/stores/152815598",
368
+ "find_offers_at_this_location": "https://offer-demo.adcrws.com/v1/offers?location_key=5230448"
369
+ }
370
+ }
371
+ ],
372
+ "links": {
373
+ "next_page": "https://offer-demo.adcrws.com/v1/locations?member_key=API_RUBY_GEM_TEST&page=2&per_page=1"
374
+ }
375
+ }
376
+ http_version:
377
+ recorded_at: Wed, 12 Aug 2015 17:46:43 GMT
378
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,367 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://token-demo.adcrws.com/v1/oauth_applications?query=pizza
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
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: 200
19
+ message: OK
20
+ headers:
21
+ Access-Control-Allow-Headers:
22
+ - Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
23
+ Access-Control-Allow-Methods:
24
+ - POST, GET, PUT, DELETE, OPTIONS
25
+ Access-Control-Max-Age:
26
+ - '1728000'
27
+ Access-Control-Request-Method:
28
+ - GET
29
+ Cache-Control:
30
+ - max-age=0, private, must-revalidate
31
+ Content-Type:
32
+ - application/json
33
+ Date:
34
+ - Sat, 01 Aug 2015 03:53:57 GMT
35
+ Etag:
36
+ - '"f1d419c272d9447f94e71973ad66ddfd"'
37
+ Server:
38
+ - nginx/1.6.2
39
+ Strict-Transport-Security:
40
+ - max-age=31536000
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Frame-Options:
44
+ - SAMEORIGIN
45
+ X-Request-Id:
46
+ - 9da518fa-992d-4eb6-8c15-cb8883892779
47
+ X-Runtime:
48
+ - '0.084186'
49
+ X-Xss-Protection:
50
+ - 1; mode=block
51
+ Content-Length:
52
+ - '5397'
53
+ Connection:
54
+ - keep-alive
55
+ body:
56
+ encoding: UTF-8
57
+ string: |-
58
+ {
59
+ "info": {
60
+ "total_results": 701,
61
+ "results_per_page": 10,
62
+ "current_page": 1,
63
+ "total_pages": 71
64
+ },
65
+ "oauth_applications": [
66
+ {
67
+ "id": 22,
68
+ "name": "American Grandparents Association",
69
+ "owner_id": 235308134,
70
+ "owner_type": "Program",
71
+ "domain_urls": null,
72
+ "scopes": [
73
+ "api",
74
+ "docs"
75
+ ],
76
+ "active_tokens": [
77
+ "e4db3fb9a054e78807c431e837c49a59553c73204de91d404fe43d12c247f805"
78
+ ],
79
+ "filter": {
80
+ "filter_id": 18,
81
+ "filter_name": "Grandparents"
82
+ },
83
+ "links": {
84
+ "show_application": "https://token-demo.adcrws.com/v1/oauth_applications/22"
85
+ }
86
+ },
87
+ {
88
+ "id": 31,
89
+ "name": "IGIFT Back",
90
+ "owner_id": 234482199,
91
+ "owner_type": "Program",
92
+ "domain_urls": "localhost, plus.igiftback.org, plus.igiftback.net",
93
+ "scopes": [
94
+ "api"
95
+ ],
96
+ "active_tokens": [
97
+ "50e34a00a8a0a7468c2d408b3564c78416c7397fda95fcd391d2e0f139152f2c"
98
+ ],
99
+ "filter": {
100
+ "filter_id": 39,
101
+ "filter_name": "iGiftBack - Auto, Dining, Entertainment, Golf, Home/Garden, Movies, Services, Shopping, Instore Print ONLY"
102
+ },
103
+ "links": {
104
+ "show_application": "https://token-demo.adcrws.com/v1/oauth_applications/31"
105
+ }
106
+ },
107
+ {
108
+ "id": 649,
109
+ "name": "amt-test",
110
+ "owner_id": 230907234,
111
+ "owner_type": "Program",
112
+ "domain_urls": null,
113
+ "scopes": [
114
+ "amt"
115
+ ],
116
+ "active_tokens": [
117
+ "7a044e366ee35284cc57dd02f5468f2f96f411e0df09ea37dad36a3581e64510"
118
+ ],
119
+ "filter": {
120
+ "filter_id": 16,
121
+ "filter_name": "No Content Filter"
122
+ },
123
+ "links": {
124
+ "show_application": "https://token-demo.adcrws.com/v1/oauth_applications/649"
125
+ }
126
+ },
127
+ {
128
+ "id": 32,
129
+ "name": "Rewards for Recycling",
130
+ "owner_id": 1090,
131
+ "owner_type": "Program",
132
+ "domain_urls": "www.rizzorewards.com,www.emterrarewards.com,r4rnet.com",
133
+ "scopes": [
134
+
135
+ ],
136
+ "active_tokens": [
137
+ "fab2e7ffa62f0059929fa8296ae0f82d96f33ec0aa51905d31fcb805e5d6fc5c",
138
+ "b33f6659908758aee9132f7fac7f39ec93a4b6ee92f8201e06d5e39691ae20e2"
139
+ ],
140
+ "filter": {
141
+ "filter_id": 33,
142
+ "filter_name": "Auto, Car Rental, Cruise, Dining, Entertainment, Golf, Health/Beauty, Home/Garden, Hotel, Movies, Services, Shopping, Travel"
143
+ },
144
+ "links": {
145
+ "show_application": "https://token-demo.adcrws.com/v1/oauth_applications/32"
146
+ }
147
+ },
148
+ {
149
+ "id": 653,
150
+ "name": "DreamWorld",
151
+ "owner_id": 339,
152
+ "owner_type": "Program",
153
+ "domain_urls": null,
154
+ "scopes": [
155
+
156
+ ],
157
+ "active_tokens": [
158
+ "2c863bc19218e8ad834b53b2c322c861ba0923173c082f8a83143a1cb33cc71c"
159
+ ],
160
+ "filter": {
161
+ "filter_id": 38,
162
+ "filter_name": "All Categories except EDUCATION ONLY"
163
+ },
164
+ "links": {
165
+ "show_application": "https://token-demo.adcrws.com/v1/oauth_applications/653"
166
+ }
167
+ },
168
+ {
169
+ "id": 15,
170
+ "name": "RetailMeNot",
171
+ "owner_id": 191718123,
172
+ "owner_type": "Program",
173
+ "domain_urls": null,
174
+ "scopes": [
175
+
176
+ ],
177
+ "active_tokens": [
178
+ "d9bf1c1741f07b96389fae9377f54de3b237e0b64a1e3dc07f2615bd7fa5874d"
179
+ ],
180
+ "filter": {
181
+ "filter_id": 14,
182
+ "filter_name": "Retail Me Not"
183
+ },
184
+ "links": {
185
+ "show_application": "https://token-demo.adcrws.com/v1/oauth_applications/15"
186
+ }
187
+ },
188
+ {
189
+ "id": 14,
190
+ "name": "Viggle",
191
+ "owner_id": 2192,
192
+ "owner_type": "Program",
193
+ "domain_urls": null,
194
+ "scopes": [
195
+ "api"
196
+ ],
197
+ "active_tokens": [
198
+ "3ad8453fbb347995e648d8925c6582073d043b2dff2332082be90e5b9c23b440"
199
+ ],
200
+ "filter": {
201
+ "filter_id": 13,
202
+ "filter_name": "VIGGLE"
203
+ },
204
+ "links": {
205
+ "show_application": "https://token-demo.adcrws.com/v1/oauth_applications/14"
206
+ }
207
+ },
208
+ {
209
+ "id": 18,
210
+ "name": "SaveOn Resorts",
211
+ "owner_id": 215,
212
+ "owner_type": "Program",
213
+ "domain_urls": null,
214
+ "scopes": [
215
+
216
+ ],
217
+ "active_tokens": [
218
+ "cec4ead0e094d3b27e2d82e8684503a6c2ccb2a01e27c3e8df107fc76cc4c372"
219
+ ],
220
+ "filter": null,
221
+ "links": {
222
+ "show_application": "https://token-demo.adcrws.com/v1/oauth_applications/18"
223
+ }
224
+ },
225
+ {
226
+ "id": 654,
227
+ "name": "API CREATE TEST",
228
+ "owner_id": 161,
229
+ "owner_type": "Program",
230
+ "domain_urls": null,
231
+ "scopes": [
232
+ "admin",
233
+ "api",
234
+ "public"
235
+ ],
236
+ "active_tokens": [
237
+ "42502aed0cb85ed4df362ccb60ec431c70201bd51aa68afaf5570b5fcff3cc42"
238
+ ],
239
+ "filter": null,
240
+ "links": {
241
+ "show_application": "https://token-demo.adcrws.com/v1/oauth_applications/654"
242
+ }
243
+ },
244
+ {
245
+ "id": 655,
246
+ "name": "TEST TEST",
247
+ "owner_id": 1234,
248
+ "owner_type": "Program",
249
+ "domain_urls": null,
250
+ "scopes": [
251
+ "api"
252
+ ],
253
+ "active_tokens": [
254
+ "7d584cd25a6ff1477d135d61e8132ef576b4da90cabed63b8bf1e3e98078db49"
255
+ ],
256
+ "filter": null,
257
+ "links": {
258
+ "show_application": "https://token-demo.adcrws.com/v1/oauth_applications/655"
259
+ }
260
+ }
261
+ ],
262
+ "links": {
263
+ "next_page": "https://report-demo.adcrws.com/v1/oauth_applications?page=2"
264
+ }
265
+ }
266
+ http_version:
267
+ recorded_at: Sat, 01 Aug 2015 03:53:58 GMT
268
+ - request:
269
+ method: get
270
+ uri: https://offer-demo.adcrws.com/v1/locations
271
+ body:
272
+ encoding: UTF-8
273
+ string: query=pizza
274
+ headers:
275
+ Access-Token:
276
+ - token_without_limit
277
+ Content-Type:
278
+ - application/json
279
+ Accept:
280
+ - application/json
281
+ response:
282
+ status:
283
+ code: 400
284
+ message: Bad Request
285
+ headers:
286
+ Content-Type:
287
+ - application/json
288
+ Date:
289
+ - Thu, 06 Aug 2015 17:30:00 GMT
290
+ Server:
291
+ - nginx/1.6.2
292
+ Strict-Transport-Security:
293
+ - max-age=31536000
294
+ X-Request-Id:
295
+ - def56b52-a451-4b76-ab85-313ae8e5e77d
296
+ X-Runtime:
297
+ - '0.000289'
298
+ Content-Length:
299
+ - '112'
300
+ Connection:
301
+ - keep-alive
302
+ body:
303
+ encoding: UTF-8
304
+ string: '{"status":400,"message":"There was a problem in the JSON you submitted:
305
+ 795: unexpected token at ''query=pizza''"}'
306
+ http_version:
307
+ recorded_at: Thu, 06 Aug 2015 17:30:00 GMT
308
+ - request:
309
+ method: get
310
+ uri: https://offer-demo.adcrws.com/v1/locations?query=pizza
311
+ body:
312
+ encoding: US-ASCII
313
+ string: ''
314
+ headers:
315
+ Access-Token:
316
+ - token_without_limit
317
+ Content-Type:
318
+ - application/json
319
+ Accept:
320
+ - application/json
321
+ response:
322
+ status:
323
+ code: 401
324
+ message: Unauthorized
325
+ headers:
326
+ Access-Control-Allow-Headers:
327
+ - Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
328
+ Access-Control-Allow-Methods:
329
+ - POST, GET, PUT, DELETE, OPTIONS
330
+ Access-Control-Max-Age:
331
+ - '1728000'
332
+ Access-Control-Request-Method:
333
+ - GET
334
+ Cache-Control:
335
+ - no-cache
336
+ Content-Type:
337
+ - application/json
338
+ Date:
339
+ - Wed, 12 Aug 2015 17:46:43 GMT
340
+ Server:
341
+ - nginx/1.6.2
342
+ Strict-Transport-Security:
343
+ - max-age=31536000
344
+ X-Content-Type-Options:
345
+ - nosniff
346
+ X-Frame-Options:
347
+ - SAMEORIGIN
348
+ X-Request-Id:
349
+ - d9b887e8-6813-44b4-bed9-313d1f057b21
350
+ X-Runtime:
351
+ - '0.007667'
352
+ X-Xss-Protection:
353
+ - 1; mode=block
354
+ Content-Length:
355
+ - '77'
356
+ Connection:
357
+ - keep-alive
358
+ body:
359
+ encoding: UTF-8
360
+ string: |-
361
+ {
362
+ "message": "Must include a member_key to see details.",
363
+ "status": 401
364
+ }
365
+ http_version:
366
+ recorded_at: Wed, 12 Aug 2015 17:46:43 GMT
367
+ recorded_with: VCR 2.9.3