poptart 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/lib/poptart.rb +1 -4
  4. data/lib/poptart/link.rb +9 -0
  5. data/lib/poptart/model.rb +13 -29
  6. data/lib/poptart/question.rb +21 -17
  7. data/lib/poptart/root.rb +10 -1
  8. data/lib/poptart/survey.rb +34 -7
  9. data/lib/poptart/survey_question.rb +32 -12
  10. data/lib/poptart/user.rb +4 -21
  11. data/lib/version.rb +1 -1
  12. data/poptart.gemspec +0 -4
  13. data/spec/lib/poptart/model_spec.rb +95 -0
  14. data/spec/lib/poptart/question_spec.rb +47 -0
  15. data/spec/lib/poptart/root_spec.rb +50 -0
  16. data/spec/lib/poptart/survey_question_spec.rb +166 -0
  17. data/spec/lib/poptart/survey_spec.rb +105 -0
  18. data/spec/lib/poptart/user_spec.rb +45 -0
  19. data/spec/requests/questions_spec.rb +31 -0
  20. data/spec/requests/survey_questions_spec.rb +150 -0
  21. data/spec/requests/surveys_spec.rb +34 -5
  22. data/spec/requests/{user_management_spec.rb → users_spec.rb} +5 -5
  23. data/spec/spec_helper.rb +1 -4
  24. data/spec/vcr/answering/survey_questions_answers_a_multiple_choice_question.yml +1527 -1596
  25. data/spec/vcr/answering/survey_questions_answers_a_survey_question.yml +2942 -2035
  26. data/spec/vcr/answering/survey_questions_creates_and_returns_a_random_question_survey.yml +254 -70
  27. data/spec/vcr/answering/survey_questions_creates_and_returns_an_empty_survey.yml +110 -48
  28. data/spec/vcr/answering/survey_questions_finds_survey_question_for_id.yml +1618 -286
  29. data/spec/vcr/poptart/survey/adds_a_question_to_a_survey.yml +1939 -0
  30. data/spec/vcr/poptart/survey/creates_a_random_survey.yml +318 -0
  31. data/spec/vcr/poptart/survey/creates_an_empty_survey.yml +702 -0
  32. data/spec/vcr/poptart/survey/returns_a_survey_by_id.yml +618 -0
  33. data/spec/vcr/poptart/user/creates_a_user.yml +179 -0
  34. data/spec/vcr/{user/management_creates_a_user.yml → poptart/user/returns_a_user.yml} +72 -69
  35. data/spec/vcr/questions/creates_a_question.yml +186 -0
  36. data/spec/vcr/questions/finds_a_question_by_id.yml +326 -0
  37. data/spec/vcr/questions/finds_a_question_by_key.yml +144 -0
  38. data/spec/vcr/questions/returns_all_answered_survey_questions_for_a_question.yml +1021 -0
  39. data/spec/vcr/retrieving/answers_returns_all_answered_survey_questions_for_a_question.yml +533 -479
  40. data/spec/vcr/survey/questions_answers_a_multiple_choice_question.yml +1454 -0
  41. data/spec/vcr/survey/questions_answers_a_survey_question.yml +1772 -0
  42. data/spec/vcr/survey/questions_creates_and_returns_an_empty_survey.yml +372 -0
  43. data/spec/vcr/survey/questions_finds_survey_question_for_id.yml +3083 -0
  44. data/spec/vcr/survey/questions_returns_all_answered_survey_questions_for_a_question.yml +5756 -0
  45. data/spec/vcr/survey/questions_returns_all_answered_survey_questions_for_a_question_by_key.yml +973 -0
  46. data/spec/vcr/survey/questions_returns_all_answered_survey_questions_for_a_survey.yml +620 -0
  47. metadata +55 -72
  48. data/lib/poptart/boolean_question.rb +0 -14
  49. data/lib/poptart/multiple_response_question.rb +0 -9
  50. data/lib/poptart/range_question.rb +0 -9
  51. data/lib/poptart/time_question.rb +0 -9
  52. data/spec/requests/answering_survey_questions_spec.rb +0 -79
  53. data/spec/requests/answers_spec.rb +0 -45
  54. data/spec/requests/creating_questions_spec.rb +0 -30
@@ -0,0 +1,372 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3000/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Content-Type:
13
+ - application/json
14
+ Api-Token:
15
+ - testing
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - "*/*"
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: 'OK '
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Ua-Compatible:
32
+ - chrome=1
33
+ Content-Type:
34
+ - application/json; charset=utf-8
35
+ Etag:
36
+ - '"3a543c1faf13608a2dcffc78fccf95fd"'
37
+ Cache-Control:
38
+ - max-age=0, private, must-revalidate
39
+ X-Request-Id:
40
+ - 6de903b5-4804-4e66-8270-36c870dfe67e
41
+ X-Runtime:
42
+ - '0.006256'
43
+ Server:
44
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
45
+ Date:
46
+ - Sun, 25 Jan 2015 14:00:57 GMT
47
+ Content-Length:
48
+ - '1469'
49
+ Connection:
50
+ - Keep-Alive
51
+ body:
52
+ encoding: UTF-8
53
+ string: |-
54
+ {
55
+ "_links": [
56
+ {
57
+ "href": "http://localhost:3000/",
58
+ "rel": "self",
59
+ "method": "GET"
60
+ },
61
+ {
62
+ "href": "http://localhost:3000/api/surveys{/id}{?query*}",
63
+ "rel": "surveys",
64
+ "method": "GET"
65
+ },
66
+ {
67
+ "href": "http://localhost:3000/api/surveys",
68
+ "rel": "surveys",
69
+ "method": "POST"
70
+ },
71
+ {
72
+ "href": "http://localhost:3000/api/user{/id}{?query*}",
73
+ "rel": "users",
74
+ "method": "GET"
75
+ },
76
+ {
77
+ "href": "http://localhost:3000/api/user",
78
+ "rel": "users",
79
+ "method": "POST"
80
+ },
81
+ {
82
+ "href": "http://localhost:3000/api/questions{/id}{?query*}",
83
+ "rel": "questions",
84
+ "method": "GET"
85
+ },
86
+ {
87
+ "href": "http://localhost:3000/api/questions",
88
+ "rel": "questions",
89
+ "method": "POST"
90
+ },
91
+ {
92
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}{?query*}",
93
+ "rel": "survey-questions",
94
+ "method": "GET"
95
+ },
96
+ {
97
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions",
98
+ "rel": "survey-questions",
99
+ "method": "POST"
100
+ },
101
+ {
102
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}",
103
+ "rel": "survey-questions",
104
+ "method": "PUT"
105
+ },
106
+ {
107
+ "href": "http://localhost:3000/api/questions/survey_questions{?query*}",
108
+ "rel": "survey-questions-by-query",
109
+ "method": "GET"
110
+ }
111
+ ]
112
+ }
113
+ http_version:
114
+ recorded_at: Sun, 25 Jan 2015 14:00:57 GMT
115
+ - request:
116
+ method: post
117
+ uri: http://localhost:3000/api/user
118
+ body:
119
+ encoding: UTF-8
120
+ string: "{}"
121
+ headers:
122
+ User-Agent:
123
+ - Faraday v0.9.0
124
+ Content-Type:
125
+ - application/json
126
+ Api-Token:
127
+ - testing
128
+ Accept-Encoding:
129
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
130
+ Accept:
131
+ - "*/*"
132
+ response:
133
+ status:
134
+ code: 201
135
+ message: 'Created '
136
+ headers:
137
+ X-Frame-Options:
138
+ - SAMEORIGIN
139
+ X-Xss-Protection:
140
+ - 1; mode=block
141
+ X-Content-Type-Options:
142
+ - nosniff
143
+ X-Ua-Compatible:
144
+ - chrome=1
145
+ Content-Type:
146
+ - application/json; charset=utf-8
147
+ Etag:
148
+ - '"bc5ffcc1f70726860423e89d9c953857"'
149
+ Cache-Control:
150
+ - max-age=0, private, must-revalidate
151
+ X-Request-Id:
152
+ - e9a62efd-7d2d-4c97-98e1-be6d6982efac
153
+ X-Runtime:
154
+ - '0.008336'
155
+ Server:
156
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
157
+ Date:
158
+ - Sun, 25 Jan 2015 14:00:57 GMT
159
+ Content-Length:
160
+ - '292'
161
+ Connection:
162
+ - Keep-Alive
163
+ body:
164
+ encoding: UTF-8
165
+ string: |-
166
+ {
167
+ "service_user_id": "fea4c5dc35488ac3e17ed02d96c04b83625d3399be26dcdcdf097e6316819880",
168
+ "_links": [
169
+ {
170
+ "href": "http://localhost:3000/api/user",
171
+ "rel": "self",
172
+ "method": "GET"
173
+ }
174
+ ],
175
+ "token": "9d7f600d585aac42486498cb55ca867c6feba26682a2052158c66a69405097f4"
176
+ }
177
+ http_version:
178
+ recorded_at: Sun, 25 Jan 2015 14:00:57 GMT
179
+ - request:
180
+ method: get
181
+ uri: http://localhost:3000/
182
+ body:
183
+ encoding: US-ASCII
184
+ string: ''
185
+ headers:
186
+ User-Agent:
187
+ - Faraday v0.9.0
188
+ Content-Type:
189
+ - application/json
190
+ Api-Token:
191
+ - testing
192
+ User-Token:
193
+ - 9d7f600d585aac42486498cb55ca867c6feba26682a2052158c66a69405097f4
194
+ Service-User-Id:
195
+ - fea4c5dc35488ac3e17ed02d96c04b83625d3399be26dcdcdf097e6316819880
196
+ Accept-Encoding:
197
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
198
+ Accept:
199
+ - "*/*"
200
+ response:
201
+ status:
202
+ code: 200
203
+ message: 'OK '
204
+ headers:
205
+ X-Frame-Options:
206
+ - SAMEORIGIN
207
+ X-Xss-Protection:
208
+ - 1; mode=block
209
+ X-Content-Type-Options:
210
+ - nosniff
211
+ X-Ua-Compatible:
212
+ - chrome=1
213
+ Content-Type:
214
+ - application/json; charset=utf-8
215
+ Etag:
216
+ - '"3a543c1faf13608a2dcffc78fccf95fd"'
217
+ Cache-Control:
218
+ - max-age=0, private, must-revalidate
219
+ X-Request-Id:
220
+ - 6ab5cb5c-f858-4745-aa6f-13ec296ca512
221
+ X-Runtime:
222
+ - '0.005438'
223
+ Server:
224
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
225
+ Date:
226
+ - Sun, 25 Jan 2015 14:00:57 GMT
227
+ Content-Length:
228
+ - '1469'
229
+ Connection:
230
+ - Keep-Alive
231
+ body:
232
+ encoding: UTF-8
233
+ string: |-
234
+ {
235
+ "_links": [
236
+ {
237
+ "href": "http://localhost:3000/",
238
+ "rel": "self",
239
+ "method": "GET"
240
+ },
241
+ {
242
+ "href": "http://localhost:3000/api/surveys{/id}{?query*}",
243
+ "rel": "surveys",
244
+ "method": "GET"
245
+ },
246
+ {
247
+ "href": "http://localhost:3000/api/surveys",
248
+ "rel": "surveys",
249
+ "method": "POST"
250
+ },
251
+ {
252
+ "href": "http://localhost:3000/api/user{/id}{?query*}",
253
+ "rel": "users",
254
+ "method": "GET"
255
+ },
256
+ {
257
+ "href": "http://localhost:3000/api/user",
258
+ "rel": "users",
259
+ "method": "POST"
260
+ },
261
+ {
262
+ "href": "http://localhost:3000/api/questions{/id}{?query*}",
263
+ "rel": "questions",
264
+ "method": "GET"
265
+ },
266
+ {
267
+ "href": "http://localhost:3000/api/questions",
268
+ "rel": "questions",
269
+ "method": "POST"
270
+ },
271
+ {
272
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}{?query*}",
273
+ "rel": "survey-questions",
274
+ "method": "GET"
275
+ },
276
+ {
277
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions",
278
+ "rel": "survey-questions",
279
+ "method": "POST"
280
+ },
281
+ {
282
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}",
283
+ "rel": "survey-questions",
284
+ "method": "PUT"
285
+ },
286
+ {
287
+ "href": "http://localhost:3000/api/questions/survey_questions{?query*}",
288
+ "rel": "survey-questions-by-query",
289
+ "method": "GET"
290
+ }
291
+ ]
292
+ }
293
+ http_version:
294
+ recorded_at: Sun, 25 Jan 2015 14:00:57 GMT
295
+ - request:
296
+ method: post
297
+ uri: http://localhost:3000/api/surveys
298
+ body:
299
+ encoding: UTF-8
300
+ string: "{}"
301
+ headers:
302
+ User-Agent:
303
+ - Faraday v0.9.0
304
+ Content-Type:
305
+ - application/json
306
+ Api-Token:
307
+ - testing
308
+ User-Token:
309
+ - 9d7f600d585aac42486498cb55ca867c6feba26682a2052158c66a69405097f4
310
+ Service-User-Id:
311
+ - fea4c5dc35488ac3e17ed02d96c04b83625d3399be26dcdcdf097e6316819880
312
+ Accept-Encoding:
313
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
314
+ Accept:
315
+ - "*/*"
316
+ response:
317
+ status:
318
+ code: 201
319
+ message: 'Created '
320
+ headers:
321
+ X-Frame-Options:
322
+ - SAMEORIGIN
323
+ X-Xss-Protection:
324
+ - 1; mode=block
325
+ X-Content-Type-Options:
326
+ - nosniff
327
+ X-Ua-Compatible:
328
+ - chrome=1
329
+ Content-Type:
330
+ - application/json; charset=utf-8
331
+ Etag:
332
+ - '"9fd8e62167de20e2060be6ffd00817d6"'
333
+ Cache-Control:
334
+ - max-age=0, private, must-revalidate
335
+ X-Request-Id:
336
+ - daf17288-f52e-4ba9-9a33-9f8e81b98e81
337
+ X-Runtime:
338
+ - '0.018324'
339
+ Server:
340
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
341
+ Date:
342
+ - Sun, 25 Jan 2015 14:00:57 GMT
343
+ Content-Length:
344
+ - '422'
345
+ Connection:
346
+ - Keep-Alive
347
+ body:
348
+ encoding: UTF-8
349
+ string: |-
350
+ {
351
+ "id": 87,
352
+ "service_user_id": "fea4c5dc35488ac3e17ed02d96c04b83625d3399be26dcdcdf097e6316819880",
353
+ "_links": [
354
+ {
355
+ "href": "http://localhost:3000/api/surveys/87",
356
+ "rel": "self",
357
+ "method": "GET"
358
+ },
359
+ {
360
+ "href": "http://localhost:3000/api/surveys/87/survey_questions",
361
+ "rel": "survey-questions",
362
+ "method": "POST"
363
+ }
364
+ ],
365
+ "completed": true,
366
+ "survey_questions": [
367
+
368
+ ]
369
+ }
370
+ http_version:
371
+ recorded_at: Sun, 25 Jan 2015 14:00:57 GMT
372
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,3083 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost:3000/api/surveys/65/survey_questions
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"survey_question":{"question_id":69,"responses":null}}'
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Content-Type:
13
+ - application/json
14
+ Api-Token:
15
+ - testing
16
+ User-Token:
17
+ - ef3dd911c4fa9b1810cb0eebdbda120bca81a251129b1f019e9ccd959fbc3317
18
+ Service-User-Id:
19
+ - 47060b8cddb466302d2d21c7b8567902e8c6e1ba4e6dc9726a5e92b7826bdc64
20
+ Accept-Encoding:
21
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
22
+ Accept:
23
+ - "*/*"
24
+ response:
25
+ status:
26
+ code: 201
27
+ message: 'Created '
28
+ headers:
29
+ X-Frame-Options:
30
+ - SAMEORIGIN
31
+ X-Xss-Protection:
32
+ - 1; mode=block
33
+ X-Content-Type-Options:
34
+ - nosniff
35
+ X-Ua-Compatible:
36
+ - chrome=1
37
+ Content-Type:
38
+ - application/json; charset=utf-8
39
+ Etag:
40
+ - '"31a58b149841e0ffd5025ff0c2187c33"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ X-Request-Id:
44
+ - 62965dac-7826-49cf-8cdd-0ad6185ee5fa
45
+ X-Runtime:
46
+ - '0.012915'
47
+ Server:
48
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
49
+ Date:
50
+ - Sun, 18 Jan 2015 15:31:27 GMT
51
+ Content-Length:
52
+ - '532'
53
+ Connection:
54
+ - Keep-Alive
55
+ body:
56
+ encoding: UTF-8
57
+ string: |-
58
+ {
59
+ "id": 25,
60
+ "text": "Where are you?",
61
+ "question_type": "multiple",
62
+ "responses": [
63
+ "At Home",
64
+ "At Work",
65
+ "In a car",
66
+ "Other"
67
+ ],
68
+ "answer": null,
69
+ "_links": {
70
+ "self": {
71
+ "href": "http://localhost:3000/api/surveys/65/survey_questions/25"
72
+ },
73
+ "put": {
74
+ "href": "http://localhost:3000/api/surveys/65/survey_questions/25"
75
+ },
76
+ "survey": {
77
+ "href": "http://localhost:3000/api/surveys/65"
78
+ }
79
+ },
80
+ "created_at": "2015-01-18T15:31:27.916Z",
81
+ "key": null,
82
+ "question_id": 69
83
+ }
84
+ http_version:
85
+ recorded_at: Sun, 18 Jan 2015 15:31:27 GMT
86
+ - request:
87
+ method: post
88
+ uri: http://localhost:3000/api/surveys/65/survey_questions
89
+ body:
90
+ encoding: UTF-8
91
+ string: '{"survey_question":{"question_id":69,"responses":null}}'
92
+ headers:
93
+ User-Agent:
94
+ - Faraday v0.9.0
95
+ Content-Type:
96
+ - application/json
97
+ Api-Token:
98
+ - testing
99
+ User-Token:
100
+ - ef3dd911c4fa9b1810cb0eebdbda120bca81a251129b1f019e9ccd959fbc3317
101
+ Service-User-Id:
102
+ - 47060b8cddb466302d2d21c7b8567902e8c6e1ba4e6dc9726a5e92b7826bdc64
103
+ Accept-Encoding:
104
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
105
+ Accept:
106
+ - "*/*"
107
+ response:
108
+ status:
109
+ code: 201
110
+ message: 'Created '
111
+ headers:
112
+ X-Frame-Options:
113
+ - SAMEORIGIN
114
+ X-Xss-Protection:
115
+ - 1; mode=block
116
+ X-Content-Type-Options:
117
+ - nosniff
118
+ X-Ua-Compatible:
119
+ - chrome=1
120
+ Content-Type:
121
+ - application/json; charset=utf-8
122
+ Etag:
123
+ - '"66a09ab5f923be415defc0105ea0de35"'
124
+ Cache-Control:
125
+ - max-age=0, private, must-revalidate
126
+ X-Request-Id:
127
+ - f462b53a-0e3e-4050-9e4a-9009da94e13a
128
+ X-Runtime:
129
+ - '0.012611'
130
+ Server:
131
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
132
+ Date:
133
+ - Sun, 18 Jan 2015 15:31:27 GMT
134
+ Content-Length:
135
+ - '532'
136
+ Connection:
137
+ - Keep-Alive
138
+ body:
139
+ encoding: UTF-8
140
+ string: |-
141
+ {
142
+ "id": 26,
143
+ "text": "Where are you?",
144
+ "question_type": "multiple",
145
+ "responses": [
146
+ "At Home",
147
+ "At Work",
148
+ "In a car",
149
+ "Other"
150
+ ],
151
+ "answer": null,
152
+ "_links": {
153
+ "self": {
154
+ "href": "http://localhost:3000/api/surveys/65/survey_questions/26"
155
+ },
156
+ "put": {
157
+ "href": "http://localhost:3000/api/surveys/65/survey_questions/26"
158
+ },
159
+ "survey": {
160
+ "href": "http://localhost:3000/api/surveys/65"
161
+ }
162
+ },
163
+ "created_at": "2015-01-18T15:31:27.935Z",
164
+ "key": null,
165
+ "question_id": 69
166
+ }
167
+ http_version:
168
+ recorded_at: Sun, 18 Jan 2015 15:31:27 GMT
169
+ - request:
170
+ method: get
171
+ uri: http://localhost:3000/
172
+ body:
173
+ encoding: US-ASCII
174
+ string: ''
175
+ headers:
176
+ User-Agent:
177
+ - Faraday v0.9.0
178
+ Content-Type:
179
+ - application/json
180
+ Api-Token:
181
+ - testing
182
+ Accept-Encoding:
183
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
184
+ Accept:
185
+ - "*/*"
186
+ response:
187
+ status:
188
+ code: 200
189
+ message: 'OK '
190
+ headers:
191
+ X-Frame-Options:
192
+ - SAMEORIGIN
193
+ X-Xss-Protection:
194
+ - 1; mode=block
195
+ X-Content-Type-Options:
196
+ - nosniff
197
+ X-Ua-Compatible:
198
+ - chrome=1
199
+ Content-Type:
200
+ - application/json; charset=utf-8
201
+ Etag:
202
+ - '"3a543c1faf13608a2dcffc78fccf95fd"'
203
+ Cache-Control:
204
+ - max-age=0, private, must-revalidate
205
+ X-Request-Id:
206
+ - cce5ddd7-c0e1-476d-8edf-2efcf777f9db
207
+ X-Runtime:
208
+ - '0.008569'
209
+ Server:
210
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
211
+ Date:
212
+ - Sun, 25 Jan 2015 14:03:55 GMT
213
+ Content-Length:
214
+ - '1469'
215
+ Connection:
216
+ - Keep-Alive
217
+ body:
218
+ encoding: UTF-8
219
+ string: |-
220
+ {
221
+ "_links": [
222
+ {
223
+ "href": "http://localhost:3000/",
224
+ "rel": "self",
225
+ "method": "GET"
226
+ },
227
+ {
228
+ "href": "http://localhost:3000/api/surveys{/id}{?query*}",
229
+ "rel": "surveys",
230
+ "method": "GET"
231
+ },
232
+ {
233
+ "href": "http://localhost:3000/api/surveys",
234
+ "rel": "surveys",
235
+ "method": "POST"
236
+ },
237
+ {
238
+ "href": "http://localhost:3000/api/user{/id}{?query*}",
239
+ "rel": "users",
240
+ "method": "GET"
241
+ },
242
+ {
243
+ "href": "http://localhost:3000/api/user",
244
+ "rel": "users",
245
+ "method": "POST"
246
+ },
247
+ {
248
+ "href": "http://localhost:3000/api/questions{/id}{?query*}",
249
+ "rel": "questions",
250
+ "method": "GET"
251
+ },
252
+ {
253
+ "href": "http://localhost:3000/api/questions",
254
+ "rel": "questions",
255
+ "method": "POST"
256
+ },
257
+ {
258
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}{?query*}",
259
+ "rel": "survey-questions",
260
+ "method": "GET"
261
+ },
262
+ {
263
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions",
264
+ "rel": "survey-questions",
265
+ "method": "POST"
266
+ },
267
+ {
268
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}",
269
+ "rel": "survey-questions",
270
+ "method": "PUT"
271
+ },
272
+ {
273
+ "href": "http://localhost:3000/api/questions/survey_questions{?query*}",
274
+ "rel": "survey-questions-by-query",
275
+ "method": "GET"
276
+ }
277
+ ]
278
+ }
279
+ http_version:
280
+ recorded_at: Sun, 25 Jan 2015 14:03:55 GMT
281
+ - request:
282
+ method: get
283
+ uri: http://localhost:3000/
284
+ body:
285
+ encoding: US-ASCII
286
+ string: ''
287
+ headers:
288
+ User-Agent:
289
+ - Faraday v0.9.0
290
+ Content-Type:
291
+ - application/json
292
+ Api-Token:
293
+ - testing
294
+ User-Token:
295
+ - 1a4870e2b39a4a3ab520b8613150bfa6fa228b4d9f0d6bbd28be890e57a40aac
296
+ Service-User-Id:
297
+ - 01087e7ec38cae33cb0da17dd12fa81cf8f9976fecc76e21db6d2f8170e87f43
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
+ X-Frame-Options:
308
+ - SAMEORIGIN
309
+ X-Xss-Protection:
310
+ - 1; mode=block
311
+ X-Content-Type-Options:
312
+ - nosniff
313
+ X-Ua-Compatible:
314
+ - chrome=1
315
+ Content-Type:
316
+ - application/json; charset=utf-8
317
+ Etag:
318
+ - '"3a543c1faf13608a2dcffc78fccf95fd"'
319
+ Cache-Control:
320
+ - max-age=0, private, must-revalidate
321
+ X-Request-Id:
322
+ - a2f0c20a-79fd-4a6c-b160-b220557360c0
323
+ X-Runtime:
324
+ - '0.005126'
325
+ Server:
326
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
327
+ Date:
328
+ - Sun, 25 Jan 2015 14:03:55 GMT
329
+ Content-Length:
330
+ - '1469'
331
+ Connection:
332
+ - Keep-Alive
333
+ body:
334
+ encoding: UTF-8
335
+ string: |-
336
+ {
337
+ "_links": [
338
+ {
339
+ "href": "http://localhost:3000/",
340
+ "rel": "self",
341
+ "method": "GET"
342
+ },
343
+ {
344
+ "href": "http://localhost:3000/api/surveys{/id}{?query*}",
345
+ "rel": "surveys",
346
+ "method": "GET"
347
+ },
348
+ {
349
+ "href": "http://localhost:3000/api/surveys",
350
+ "rel": "surveys",
351
+ "method": "POST"
352
+ },
353
+ {
354
+ "href": "http://localhost:3000/api/user{/id}{?query*}",
355
+ "rel": "users",
356
+ "method": "GET"
357
+ },
358
+ {
359
+ "href": "http://localhost:3000/api/user",
360
+ "rel": "users",
361
+ "method": "POST"
362
+ },
363
+ {
364
+ "href": "http://localhost:3000/api/questions{/id}{?query*}",
365
+ "rel": "questions",
366
+ "method": "GET"
367
+ },
368
+ {
369
+ "href": "http://localhost:3000/api/questions",
370
+ "rel": "questions",
371
+ "method": "POST"
372
+ },
373
+ {
374
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}{?query*}",
375
+ "rel": "survey-questions",
376
+ "method": "GET"
377
+ },
378
+ {
379
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions",
380
+ "rel": "survey-questions",
381
+ "method": "POST"
382
+ },
383
+ {
384
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}",
385
+ "rel": "survey-questions",
386
+ "method": "PUT"
387
+ },
388
+ {
389
+ "href": "http://localhost:3000/api/questions/survey_questions{?query*}",
390
+ "rel": "survey-questions-by-query",
391
+ "method": "GET"
392
+ }
393
+ ]
394
+ }
395
+ http_version:
396
+ recorded_at: Sun, 25 Jan 2015 14:03:55 GMT
397
+ - request:
398
+ method: get
399
+ uri: http://localhost:3000/
400
+ body:
401
+ encoding: US-ASCII
402
+ string: ''
403
+ headers:
404
+ User-Agent:
405
+ - Faraday v0.9.0
406
+ Content-Type:
407
+ - application/json
408
+ Api-Token:
409
+ - testing
410
+ User-Token:
411
+ - 1a4870e2b39a4a3ab520b8613150bfa6fa228b4d9f0d6bbd28be890e57a40aac
412
+ Service-User-Id:
413
+ - 01087e7ec38cae33cb0da17dd12fa81cf8f9976fecc76e21db6d2f8170e87f43
414
+ Accept-Encoding:
415
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
416
+ Accept:
417
+ - "*/*"
418
+ response:
419
+ status:
420
+ code: 200
421
+ message: 'OK '
422
+ headers:
423
+ X-Frame-Options:
424
+ - SAMEORIGIN
425
+ X-Xss-Protection:
426
+ - 1; mode=block
427
+ X-Content-Type-Options:
428
+ - nosniff
429
+ X-Ua-Compatible:
430
+ - chrome=1
431
+ Content-Type:
432
+ - application/json; charset=utf-8
433
+ Etag:
434
+ - '"3a543c1faf13608a2dcffc78fccf95fd"'
435
+ Cache-Control:
436
+ - max-age=0, private, must-revalidate
437
+ X-Request-Id:
438
+ - 7d16a54e-354a-45d7-a1ef-95d68c6adac4
439
+ X-Runtime:
440
+ - '0.006679'
441
+ Server:
442
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
443
+ Date:
444
+ - Sun, 25 Jan 2015 14:03:55 GMT
445
+ Content-Length:
446
+ - '1469'
447
+ Connection:
448
+ - Keep-Alive
449
+ body:
450
+ encoding: UTF-8
451
+ string: |-
452
+ {
453
+ "_links": [
454
+ {
455
+ "href": "http://localhost:3000/",
456
+ "rel": "self",
457
+ "method": "GET"
458
+ },
459
+ {
460
+ "href": "http://localhost:3000/api/surveys{/id}{?query*}",
461
+ "rel": "surveys",
462
+ "method": "GET"
463
+ },
464
+ {
465
+ "href": "http://localhost:3000/api/surveys",
466
+ "rel": "surveys",
467
+ "method": "POST"
468
+ },
469
+ {
470
+ "href": "http://localhost:3000/api/user{/id}{?query*}",
471
+ "rel": "users",
472
+ "method": "GET"
473
+ },
474
+ {
475
+ "href": "http://localhost:3000/api/user",
476
+ "rel": "users",
477
+ "method": "POST"
478
+ },
479
+ {
480
+ "href": "http://localhost:3000/api/questions{/id}{?query*}",
481
+ "rel": "questions",
482
+ "method": "GET"
483
+ },
484
+ {
485
+ "href": "http://localhost:3000/api/questions",
486
+ "rel": "questions",
487
+ "method": "POST"
488
+ },
489
+ {
490
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}{?query*}",
491
+ "rel": "survey-questions",
492
+ "method": "GET"
493
+ },
494
+ {
495
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions",
496
+ "rel": "survey-questions",
497
+ "method": "POST"
498
+ },
499
+ {
500
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}",
501
+ "rel": "survey-questions",
502
+ "method": "PUT"
503
+ },
504
+ {
505
+ "href": "http://localhost:3000/api/questions/survey_questions{?query*}",
506
+ "rel": "survey-questions-by-query",
507
+ "method": "GET"
508
+ }
509
+ ]
510
+ }
511
+ http_version:
512
+ recorded_at: Sun, 25 Jan 2015 14:03:55 GMT
513
+ - request:
514
+ method: post
515
+ uri: http://localhost:3000/api/surveys/96/survey_questions
516
+ body:
517
+ encoding: UTF-8
518
+ string: '{"survey_question":{"question_id":92,"responses":null}}'
519
+ headers:
520
+ User-Agent:
521
+ - Faraday v0.9.0
522
+ Content-Type:
523
+ - application/json
524
+ Api-Token:
525
+ - testing
526
+ User-Token:
527
+ - 1a4870e2b39a4a3ab520b8613150bfa6fa228b4d9f0d6bbd28be890e57a40aac
528
+ Service-User-Id:
529
+ - 01087e7ec38cae33cb0da17dd12fa81cf8f9976fecc76e21db6d2f8170e87f43
530
+ Accept-Encoding:
531
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
532
+ Accept:
533
+ - "*/*"
534
+ response:
535
+ status:
536
+ code: 201
537
+ message: 'Created '
538
+ headers:
539
+ X-Frame-Options:
540
+ - SAMEORIGIN
541
+ X-Xss-Protection:
542
+ - 1; mode=block
543
+ X-Content-Type-Options:
544
+ - nosniff
545
+ X-Ua-Compatible:
546
+ - chrome=1
547
+ Content-Type:
548
+ - application/json; charset=utf-8
549
+ Etag:
550
+ - '"a5566970100b57552da358e471945c08"'
551
+ Cache-Control:
552
+ - max-age=0, private, must-revalidate
553
+ X-Request-Id:
554
+ - 40ddc33a-604c-4bcb-9481-6afc581b4c1b
555
+ X-Runtime:
556
+ - '0.012330'
557
+ Server:
558
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
559
+ Date:
560
+ - Sun, 25 Jan 2015 14:03:56 GMT
561
+ Content-Length:
562
+ - '641'
563
+ Connection:
564
+ - Keep-Alive
565
+ body:
566
+ encoding: UTF-8
567
+ string: |-
568
+ {
569
+ "id": 48,
570
+ "text": "Where are you?",
571
+ "question_type": "multiple",
572
+ "responses": [
573
+ "At Home",
574
+ "At Work",
575
+ "In a car",
576
+ "Other"
577
+ ],
578
+ "answer": null,
579
+ "_links": [
580
+ {
581
+ "rel": "self",
582
+ "href": "http://localhost:3000/api/surveys/96/survey_questions/48",
583
+ "method": "GET"
584
+ },
585
+ {
586
+ "rel": "self",
587
+ "href": "http://localhost:3000/api/surveys/96/survey_questions/48",
588
+ "method": "PUT"
589
+ },
590
+ {
591
+ "rel": "survey",
592
+ "href": "http://localhost:3000/api/surveys/96",
593
+ "method": "GET"
594
+ }
595
+ ],
596
+ "created_at": "2015-01-25T14:03:56.004Z",
597
+ "key": null,
598
+ "question_id": 92
599
+ }
600
+ http_version:
601
+ recorded_at: Sun, 25 Jan 2015 14:03:56 GMT
602
+ - request:
603
+ method: post
604
+ uri: http://localhost:3000/api/surveys/96/survey_questions
605
+ body:
606
+ encoding: UTF-8
607
+ string: '{"survey_question":{"question_id":92,"responses":null}}'
608
+ headers:
609
+ User-Agent:
610
+ - Faraday v0.9.0
611
+ Content-Type:
612
+ - application/json
613
+ Api-Token:
614
+ - testing
615
+ User-Token:
616
+ - 1a4870e2b39a4a3ab520b8613150bfa6fa228b4d9f0d6bbd28be890e57a40aac
617
+ Service-User-Id:
618
+ - 01087e7ec38cae33cb0da17dd12fa81cf8f9976fecc76e21db6d2f8170e87f43
619
+ Accept-Encoding:
620
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
621
+ Accept:
622
+ - "*/*"
623
+ response:
624
+ status:
625
+ code: 201
626
+ message: 'Created '
627
+ headers:
628
+ X-Frame-Options:
629
+ - SAMEORIGIN
630
+ X-Xss-Protection:
631
+ - 1; mode=block
632
+ X-Content-Type-Options:
633
+ - nosniff
634
+ X-Ua-Compatible:
635
+ - chrome=1
636
+ Content-Type:
637
+ - application/json; charset=utf-8
638
+ Etag:
639
+ - '"5dd359a0dbb361195ba2293eaf93a936"'
640
+ Cache-Control:
641
+ - max-age=0, private, must-revalidate
642
+ X-Request-Id:
643
+ - 85316e90-f18e-4737-ba51-f11e75105def
644
+ X-Runtime:
645
+ - '0.012421'
646
+ Server:
647
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
648
+ Date:
649
+ - Sun, 25 Jan 2015 14:03:56 GMT
650
+ Content-Length:
651
+ - '641'
652
+ Connection:
653
+ - Keep-Alive
654
+ body:
655
+ encoding: UTF-8
656
+ string: |-
657
+ {
658
+ "id": 49,
659
+ "text": "Where are you?",
660
+ "question_type": "multiple",
661
+ "responses": [
662
+ "At Home",
663
+ "At Work",
664
+ "In a car",
665
+ "Other"
666
+ ],
667
+ "answer": null,
668
+ "_links": [
669
+ {
670
+ "rel": "self",
671
+ "href": "http://localhost:3000/api/surveys/96/survey_questions/49",
672
+ "method": "GET"
673
+ },
674
+ {
675
+ "rel": "self",
676
+ "href": "http://localhost:3000/api/surveys/96/survey_questions/49",
677
+ "method": "PUT"
678
+ },
679
+ {
680
+ "rel": "survey",
681
+ "href": "http://localhost:3000/api/surveys/96",
682
+ "method": "GET"
683
+ }
684
+ ],
685
+ "created_at": "2015-01-25T14:03:56.023Z",
686
+ "key": null,
687
+ "question_id": 92
688
+ }
689
+ http_version:
690
+ recorded_at: Sun, 25 Jan 2015 14:03:56 GMT
691
+ - request:
692
+ method: post
693
+ uri: http://localhost:3000/api/surveys/99/survey_questions
694
+ body:
695
+ encoding: UTF-8
696
+ string: '{"survey_question":{"question_id":95,"responses":null}}'
697
+ headers:
698
+ User-Agent:
699
+ - Faraday v0.9.0
700
+ Content-Type:
701
+ - application/json
702
+ Api-Token:
703
+ - testing
704
+ User-Token:
705
+ - 43ccb7a785debcea52cc3840a2649f67b90bc42b788b11f7de529506fd704f4f
706
+ Service-User-Id:
707
+ - d93a796899cb899675bbb7e8253ef15aadcf15ca9377067c03cde66d0cec6108
708
+ Accept-Encoding:
709
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
710
+ Accept:
711
+ - "*/*"
712
+ response:
713
+ status:
714
+ code: 201
715
+ message: 'Created '
716
+ headers:
717
+ X-Frame-Options:
718
+ - SAMEORIGIN
719
+ X-Xss-Protection:
720
+ - 1; mode=block
721
+ X-Content-Type-Options:
722
+ - nosniff
723
+ X-Ua-Compatible:
724
+ - chrome=1
725
+ Content-Type:
726
+ - application/json; charset=utf-8
727
+ Etag:
728
+ - '"eee9ef47be1bb1110ea9095a1bf2996d"'
729
+ Cache-Control:
730
+ - max-age=0, private, must-revalidate
731
+ X-Request-Id:
732
+ - 68135efe-1769-4417-a841-2c9bfb466861
733
+ X-Runtime:
734
+ - '0.020561'
735
+ Server:
736
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
737
+ Date:
738
+ - Sun, 25 Jan 2015 14:04:00 GMT
739
+ Content-Length:
740
+ - '641'
741
+ Connection:
742
+ - Keep-Alive
743
+ body:
744
+ encoding: UTF-8
745
+ string: |-
746
+ {
747
+ "id": 52,
748
+ "text": "Where are you?",
749
+ "question_type": "multiple",
750
+ "responses": [
751
+ "At Home",
752
+ "At Work",
753
+ "In a car",
754
+ "Other"
755
+ ],
756
+ "answer": null,
757
+ "_links": [
758
+ {
759
+ "rel": "self",
760
+ "href": "http://localhost:3000/api/surveys/99/survey_questions/52",
761
+ "method": "GET"
762
+ },
763
+ {
764
+ "rel": "self",
765
+ "href": "http://localhost:3000/api/surveys/99/survey_questions/52",
766
+ "method": "PUT"
767
+ },
768
+ {
769
+ "rel": "survey",
770
+ "href": "http://localhost:3000/api/surveys/99",
771
+ "method": "GET"
772
+ }
773
+ ],
774
+ "created_at": "2015-01-25T14:04:00.913Z",
775
+ "key": null,
776
+ "question_id": 95
777
+ }
778
+ http_version:
779
+ recorded_at: Sun, 25 Jan 2015 14:04:00 GMT
780
+ - request:
781
+ method: post
782
+ uri: http://localhost:3000/api/surveys/99/survey_questions
783
+ body:
784
+ encoding: UTF-8
785
+ string: '{"survey_question":{"question_id":95,"responses":null}}'
786
+ headers:
787
+ User-Agent:
788
+ - Faraday v0.9.0
789
+ Content-Type:
790
+ - application/json
791
+ Api-Token:
792
+ - testing
793
+ User-Token:
794
+ - 43ccb7a785debcea52cc3840a2649f67b90bc42b788b11f7de529506fd704f4f
795
+ Service-User-Id:
796
+ - d93a796899cb899675bbb7e8253ef15aadcf15ca9377067c03cde66d0cec6108
797
+ Accept-Encoding:
798
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
799
+ Accept:
800
+ - "*/*"
801
+ response:
802
+ status:
803
+ code: 201
804
+ message: 'Created '
805
+ headers:
806
+ X-Frame-Options:
807
+ - SAMEORIGIN
808
+ X-Xss-Protection:
809
+ - 1; mode=block
810
+ X-Content-Type-Options:
811
+ - nosniff
812
+ X-Ua-Compatible:
813
+ - chrome=1
814
+ Content-Type:
815
+ - application/json; charset=utf-8
816
+ Etag:
817
+ - '"7a327918c44321ffe21b822b8b17202f"'
818
+ Cache-Control:
819
+ - max-age=0, private, must-revalidate
820
+ X-Request-Id:
821
+ - 25df6aad-d659-4e15-a585-dcc1b2ee8c18
822
+ X-Runtime:
823
+ - '0.012073'
824
+ Server:
825
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
826
+ Date:
827
+ - Sun, 25 Jan 2015 14:04:00 GMT
828
+ Content-Length:
829
+ - '641'
830
+ Connection:
831
+ - Keep-Alive
832
+ body:
833
+ encoding: UTF-8
834
+ string: |-
835
+ {
836
+ "id": 53,
837
+ "text": "Where are you?",
838
+ "question_type": "multiple",
839
+ "responses": [
840
+ "At Home",
841
+ "At Work",
842
+ "In a car",
843
+ "Other"
844
+ ],
845
+ "answer": null,
846
+ "_links": [
847
+ {
848
+ "rel": "self",
849
+ "href": "http://localhost:3000/api/surveys/99/survey_questions/53",
850
+ "method": "GET"
851
+ },
852
+ {
853
+ "rel": "self",
854
+ "href": "http://localhost:3000/api/surveys/99/survey_questions/53",
855
+ "method": "PUT"
856
+ },
857
+ {
858
+ "rel": "survey",
859
+ "href": "http://localhost:3000/api/surveys/99",
860
+ "method": "GET"
861
+ }
862
+ ],
863
+ "created_at": "2015-01-25T14:04:00.940Z",
864
+ "key": null,
865
+ "question_id": 95
866
+ }
867
+ http_version:
868
+ recorded_at: Sun, 25 Jan 2015 14:04:00 GMT
869
+ - request:
870
+ method: post
871
+ uri: http://localhost:3000/api/user
872
+ body:
873
+ encoding: UTF-8
874
+ string: "{}"
875
+ headers:
876
+ User-Agent:
877
+ - Faraday v0.9.0
878
+ Content-Type:
879
+ - application/json
880
+ Api-Token:
881
+ - testing
882
+ User-Token:
883
+ - 418d60ff35340cfae0ad820b9eafb9978fb0874e1568d6780ee1336413462779
884
+ Service-User-Id:
885
+ - 6943fa049ba6492bfe8421e556fed40c1a486285f94703f8fa924306b1c61afc
886
+ Accept-Encoding:
887
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
888
+ Accept:
889
+ - "*/*"
890
+ response:
891
+ status:
892
+ code: 201
893
+ message: 'Created '
894
+ headers:
895
+ X-Frame-Options:
896
+ - SAMEORIGIN
897
+ X-Xss-Protection:
898
+ - 1; mode=block
899
+ X-Content-Type-Options:
900
+ - nosniff
901
+ X-Ua-Compatible:
902
+ - chrome=1
903
+ Content-Type:
904
+ - application/json; charset=utf-8
905
+ Etag:
906
+ - '"f9b80921d6c3040472bd0eeb44a4668e"'
907
+ Cache-Control:
908
+ - max-age=0, private, must-revalidate
909
+ X-Request-Id:
910
+ - cd10c2b0-c823-4659-a38c-493b75fb793b
911
+ X-Runtime:
912
+ - '0.008068'
913
+ Server:
914
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
915
+ Date:
916
+ - Sun, 25 Jan 2015 14:07:15 GMT
917
+ Content-Length:
918
+ - '292'
919
+ Connection:
920
+ - Keep-Alive
921
+ body:
922
+ encoding: UTF-8
923
+ string: |-
924
+ {
925
+ "service_user_id": "6943fa049ba6492bfe8421e556fed40c1a486285f94703f8fa924306b1c61afc",
926
+ "_links": [
927
+ {
928
+ "href": "http://localhost:3000/api/user",
929
+ "rel": "self",
930
+ "method": "GET"
931
+ }
932
+ ],
933
+ "token": "418d60ff35340cfae0ad820b9eafb9978fb0874e1568d6780ee1336413462779"
934
+ }
935
+ http_version:
936
+ recorded_at: Sun, 25 Jan 2015 14:07:15 GMT
937
+ - request:
938
+ method: get
939
+ uri: http://localhost:3000/api/questions
940
+ body:
941
+ encoding: US-ASCII
942
+ string: ''
943
+ headers:
944
+ User-Agent:
945
+ - Faraday v0.9.0
946
+ Content-Type:
947
+ - application/json
948
+ Api-Token:
949
+ - testing
950
+ User-Token:
951
+ - 418d60ff35340cfae0ad820b9eafb9978fb0874e1568d6780ee1336413462779
952
+ Service-User-Id:
953
+ - 6943fa049ba6492bfe8421e556fed40c1a486285f94703f8fa924306b1c61afc
954
+ Accept-Encoding:
955
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
956
+ Accept:
957
+ - "*/*"
958
+ response:
959
+ status:
960
+ code: 200
961
+ message: 'OK '
962
+ headers:
963
+ X-Frame-Options:
964
+ - SAMEORIGIN
965
+ X-Xss-Protection:
966
+ - 1; mode=block
967
+ X-Content-Type-Options:
968
+ - nosniff
969
+ X-Ua-Compatible:
970
+ - chrome=1
971
+ Content-Type:
972
+ - application/json; charset=utf-8
973
+ Etag:
974
+ - '"36aff317a383b5eacd4cf15a496ca105"'
975
+ Cache-Control:
976
+ - max-age=0, private, must-revalidate
977
+ X-Request-Id:
978
+ - a521bbe9-6365-4eb5-8305-a0ae7319fa8e
979
+ X-Runtime:
980
+ - '0.033953'
981
+ Server:
982
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
983
+ Date:
984
+ - Sun, 25 Jan 2015 14:07:15 GMT
985
+ Content-Length:
986
+ - '33444'
987
+ Connection:
988
+ - Keep-Alive
989
+ body:
990
+ encoding: UTF-8
991
+ string: |-
992
+ [
993
+ {
994
+ "id": 1,
995
+ "question_type": "multiple",
996
+ "text": "How hungry or full are you right now?",
997
+ "responses": [
998
+ "Very hungry",
999
+ "Somewhat hungry",
1000
+ "Neither full nor hungry",
1001
+ "Somewhat full",
1002
+ "Very full"
1003
+ ],
1004
+ "key": "how_hungry_are_you",
1005
+ "_links": [
1006
+ {
1007
+ "rel": "self",
1008
+ "href": "http://localhost:3000/api/questions/1",
1009
+ "method": "GET"
1010
+ }
1011
+ ]
1012
+ },
1013
+ {
1014
+ "id": 2,
1015
+ "question_type": "time",
1016
+ "text": "What time did you wake up this morning?",
1017
+ "responses": null,
1018
+ "key": "what_time_did_you_wake_up",
1019
+ "_links": [
1020
+ {
1021
+ "rel": "self",
1022
+ "href": "http://localhost:3000/api/questions/2",
1023
+ "method": "GET"
1024
+ }
1025
+ ]
1026
+ },
1027
+ {
1028
+ "id": 3,
1029
+ "question_type": "time",
1030
+ "text": "What time did you got to sleep last night?",
1031
+ "responses": null,
1032
+ "key": "what_time_did_you_sleep",
1033
+ "_links": [
1034
+ {
1035
+ "rel": "self",
1036
+ "href": "http://localhost:3000/api/questions/3",
1037
+ "method": "GET"
1038
+ }
1039
+ ]
1040
+ },
1041
+ {
1042
+ "id": 4,
1043
+ "question_type": "multiple",
1044
+ "text": "Are you judging or evaluating yourself right now (i.e. at the moment just before you were notified)?",
1045
+ "responses": [
1046
+ "f",
1047
+ "Yes - Negatively",
1048
+ "Yes - Neutrally",
1049
+ "Yes - Positively"
1050
+ ],
1051
+ "key": "are_you_judging_yourself",
1052
+ "_links": [
1053
+ {
1054
+ "rel": "self",
1055
+ "href": "http://localhost:3000/api/questions/4",
1056
+ "method": "GET"
1057
+ }
1058
+ ]
1059
+ },
1060
+ {
1061
+ "id": 5,
1062
+ "question_type": "range",
1063
+ "text": "How well did you sleep last night?",
1064
+ "responses": [
1065
+ "0",
1066
+ "10"
1067
+ ],
1068
+ "key": "how_well_did_you_sleep",
1069
+ "_links": [
1070
+ {
1071
+ "rel": "self",
1072
+ "href": "http://localhost:3000/api/questions/5",
1073
+ "method": "GET"
1074
+ }
1075
+ ]
1076
+ },
1077
+ {
1078
+ "id": 6,
1079
+ "question_type": "range",
1080
+ "text": "To what extent are you engrossed in what you are doing?",
1081
+ "responses": [
1082
+ "0",
1083
+ "10"
1084
+ ],
1085
+ "key": "what_extent_are_you_engrossed",
1086
+ "_links": [
1087
+ {
1088
+ "rel": "self",
1089
+ "href": "http://localhost:3000/api/questions/6",
1090
+ "method": "GET"
1091
+ }
1092
+ ]
1093
+ },
1094
+ {
1095
+ "id": 7,
1096
+ "question_type": "multiple",
1097
+ "text": "Are you judging or evaluating what you are doing right now (i.e. at the moment just before you were notified?)",
1098
+ "responses": [
1099
+ "f",
1100
+ "Yes - Negatively",
1101
+ "Yes - Neutrally",
1102
+ "Yes - Positively"
1103
+ ],
1104
+ "key": "are_you_judging_or_evaluating_what_you_are_doing",
1105
+ "_links": [
1106
+ {
1107
+ "rel": "self",
1108
+ "href": "http://localhost:3000/api/questions/7",
1109
+ "method": "GET"
1110
+ }
1111
+ ]
1112
+ },
1113
+ {
1114
+ "id": 8,
1115
+ "question_type": "boolean",
1116
+ "text": "In the past 24 hours, have you engaged in sexual activity with another person?",
1117
+ "responses": [
1118
+ "t",
1119
+ "f"
1120
+ ],
1121
+ "key": "had_sex",
1122
+ "_links": [
1123
+ {
1124
+ "rel": "self",
1125
+ "href": "http://localhost:3000/api/questions/8",
1126
+ "method": "GET"
1127
+ }
1128
+ ]
1129
+ },
1130
+ {
1131
+ "id": 9,
1132
+ "question_type": "multiple",
1133
+ "text": "Imagine you were given $10 to divide between yourself and a stranger to whom you would remain anonymous. How much would you give to the stranger?",
1134
+ "responses": [
1135
+ "0",
1136
+ "1",
1137
+ "2",
1138
+ "3",
1139
+ "4",
1140
+ "5",
1141
+ "6",
1142
+ "7",
1143
+ "8",
1144
+ "9",
1145
+ "10"
1146
+ ],
1147
+ "key": "how_much_would_you_give_to_stranger",
1148
+ "_links": [
1149
+ {
1150
+ "rel": "self",
1151
+ "href": "http://localhost:3000/api/questions/9",
1152
+ "method": "GET"
1153
+ }
1154
+ ]
1155
+ },
1156
+ {
1157
+ "id": 10,
1158
+ "question_type": "boolean",
1159
+ "text": "Have you surprised someone with a gift (including small gifts) in the last week?",
1160
+ "responses": [
1161
+ "t",
1162
+ "f"
1163
+ ],
1164
+ "key": "have_you_surprised_someone",
1165
+ "_links": [
1166
+ {
1167
+ "rel": "self",
1168
+ "href": "http://localhost:3000/api/questions/10",
1169
+ "method": "GET"
1170
+ }
1171
+ ]
1172
+ },
1173
+ {
1174
+ "id": 11,
1175
+ "question_type": "multiple",
1176
+ "text": "In general, how is your health?",
1177
+ "responses": [
1178
+ "Excellent",
1179
+ "Very Good",
1180
+ "Good",
1181
+ "Fair",
1182
+ "Poor"
1183
+ ],
1184
+ "key": "how_is_your_health",
1185
+ "_links": [
1186
+ {
1187
+ "rel": "self",
1188
+ "href": "http://localhost:3000/api/questions/11",
1189
+ "method": "GET"
1190
+ }
1191
+ ]
1192
+ },
1193
+ {
1194
+ "id": 12,
1195
+ "question_type": "range",
1196
+ "text": "Where would you place yourself on this ladder?\nThink of a ladder representing where people stand in your country.\nAt the top of the ladder are the people who are the best off - those who have the most money, the most education and the most respected jobs. At the bottom are the people who are the worst off - who have the least money, least education, and the least respected jobs or no job. The higher up you are on the ladder, the closer you are to the people at the very top; the lower you are the closer you are to people at the very bottom.",
1197
+ "responses": [
1198
+ "0",
1199
+ "10"
1200
+ ],
1201
+ "key": "ladder",
1202
+ "_links": [
1203
+ {
1204
+ "rel": "self",
1205
+ "href": "http://localhost:3000/api/questions/12",
1206
+ "method": "GET"
1207
+ }
1208
+ ]
1209
+ },
1210
+ {
1211
+ "id": 13,
1212
+ "question_type": "range",
1213
+ "text": "To what extent is what you're doing interesting?",
1214
+ "responses": [
1215
+ "0",
1216
+ "10"
1217
+ ],
1218
+ "key": "what_extent_interesting",
1219
+ "_links": [
1220
+ {
1221
+ "rel": "self",
1222
+ "href": "http://localhost:3000/api/questions/13",
1223
+ "method": "GET"
1224
+ }
1225
+ ]
1226
+ },
1227
+ {
1228
+ "id": 14,
1229
+ "question_type": "multiple",
1230
+ "text": "On average, how many hours do you work each week?",
1231
+ "responses": [
1232
+ "Less than 5",
1233
+ "5-10",
1234
+ "10-20",
1235
+ "20-30",
1236
+ "30-40",
1237
+ "40-50",
1238
+ "50-60",
1239
+ "60-70",
1240
+ "More than 70"
1241
+ ],
1242
+ "key": "how_many_hours_do_you_work",
1243
+ "_links": [
1244
+ {
1245
+ "rel": "self",
1246
+ "href": "http://localhost:3000/api/questions/14",
1247
+ "method": "GET"
1248
+ }
1249
+ ]
1250
+ },
1251
+ {
1252
+ "id": 15,
1253
+ "question_type": "range",
1254
+ "text": "How do you feel right now?",
1255
+ "responses": [
1256
+ "0",
1257
+ "10"
1258
+ ],
1259
+ "key": "how_do_you_feel_right_now",
1260
+ "_links": [
1261
+ {
1262
+ "rel": "self",
1263
+ "href": "http://localhost:3000/api/questions/15",
1264
+ "method": "GET"
1265
+ }
1266
+ ]
1267
+ },
1268
+ {
1269
+ "id": 16,
1270
+ "question_type": "range",
1271
+ "text": "To what extent do you expect good things to happen in the future?",
1272
+ "responses": [
1273
+ "0",
1274
+ "10"
1275
+ ],
1276
+ "key": "good_things_future",
1277
+ "_links": [
1278
+ {
1279
+ "rel": "self",
1280
+ "href": "http://localhost:3000/api/questions/16",
1281
+ "method": "GET"
1282
+ }
1283
+ ]
1284
+ },
1285
+ {
1286
+ "id": 17,
1287
+ "question_type": "boolean",
1288
+ "text": "Have you taken any over-the-counter pain medication in the past 24 hours?",
1289
+ "responses": [
1290
+ "t",
1291
+ "f"
1292
+ ],
1293
+ "key": "pain_medication",
1294
+ "_links": [
1295
+ {
1296
+ "rel": "self",
1297
+ "href": "http://localhost:3000/api/questions/17",
1298
+ "method": "GET"
1299
+ }
1300
+ ]
1301
+ },
1302
+ {
1303
+ "id": 18,
1304
+ "question_type": "range",
1305
+ "text": "To what extent have you procrastinated so far today?",
1306
+ "responses": [
1307
+ "0",
1308
+ "10"
1309
+ ],
1310
+ "key": "procrastinated",
1311
+ "_links": [
1312
+ {
1313
+ "rel": "self",
1314
+ "href": "http://localhost:3000/api/questions/18",
1315
+ "method": "GET"
1316
+ }
1317
+ ]
1318
+ },
1319
+ {
1320
+ "id": 19,
1321
+ "question_type": "range",
1322
+ "text": "To what extent are you being productive?",
1323
+ "responses": [
1324
+ "0",
1325
+ "10"
1326
+ ],
1327
+ "key": "productive",
1328
+ "_links": [
1329
+ {
1330
+ "rel": "self",
1331
+ "href": "http://localhost:3000/api/questions/19",
1332
+ "method": "GET"
1333
+ }
1334
+ ]
1335
+ },
1336
+ {
1337
+ "id": 20,
1338
+ "question_type": "multiple",
1339
+ "text": "Who are you talking or interacting with?",
1340
+ "responses": [
1341
+ "Spouse/partner/significant other",
1342
+ "Children",
1343
+ "Parents",
1344
+ "Other relatives",
1345
+ "Friends",
1346
+ "Acquaintances",
1347
+ "Strangers",
1348
+ "Co-workers",
1349
+ "Customers/students",
1350
+ "Boss",
1351
+ "No one"
1352
+ ],
1353
+ "key": "who_are_you_talking_with",
1354
+ "_links": [
1355
+ {
1356
+ "rel": "self",
1357
+ "href": "http://localhost:3000/api/questions/20",
1358
+ "method": "GET"
1359
+ }
1360
+ ]
1361
+ },
1362
+ {
1363
+ "id": 27,
1364
+ "question_type": "multiple",
1365
+ "text": "How many people are you talking or interacting with?",
1366
+ "responses": [
1367
+ "0",
1368
+ "1",
1369
+ "2",
1370
+ "3",
1371
+ "4",
1372
+ "5",
1373
+ "6",
1374
+ "7",
1375
+ "8",
1376
+ "9",
1377
+ "10",
1378
+ "More than 10"
1379
+ ],
1380
+ "key": "how_many_people_are_you_talking_with",
1381
+ "_links": [
1382
+ {
1383
+ "rel": "self",
1384
+ "href": "http://localhost:3000/api/questions/27",
1385
+ "method": "GET"
1386
+ }
1387
+ ]
1388
+ },
1389
+ {
1390
+ "id": 21,
1391
+ "question_type": "range",
1392
+ "text": "To what extent do you feel accepted by the person/people you are interacting with?",
1393
+ "responses": [
1394
+ "0",
1395
+ "10"
1396
+ ],
1397
+ "key": null,
1398
+ "_links": [
1399
+ {
1400
+ "rel": "self",
1401
+ "href": "http://localhost:3000/api/questions/21",
1402
+ "method": "GET"
1403
+ }
1404
+ ]
1405
+ },
1406
+ {
1407
+ "id": 22,
1408
+ "question_type": "boolean",
1409
+ "text": "Are you alone?",
1410
+ "responses": [
1411
+ "t",
1412
+ "f"
1413
+ ],
1414
+ "key": "are_you_alone",
1415
+ "_links": [
1416
+ {
1417
+ "rel": "self",
1418
+ "href": "http://localhost:3000/api/questions/22",
1419
+ "method": "GET"
1420
+ }
1421
+ ]
1422
+ },
1423
+ {
1424
+ "id": 23,
1425
+ "question_type": "boolean",
1426
+ "text": "Do you want to do what you're doing?",
1427
+ "responses": [
1428
+ "t",
1429
+ "f"
1430
+ ],
1431
+ "key": "do_you_want_to_do_what_youre_doing",
1432
+ "_links": [
1433
+ {
1434
+ "rel": "self",
1435
+ "href": "http://localhost:3000/api/questions/23",
1436
+ "method": "GET"
1437
+ }
1438
+ ]
1439
+ },
1440
+ {
1441
+ "id": 24,
1442
+ "question_type": "boolean",
1443
+ "text": "Are you talking or interacting with anyone?",
1444
+ "responses": [
1445
+ "t",
1446
+ "f"
1447
+ ],
1448
+ "key": "are_you_talking_to_anyone",
1449
+ "_links": [
1450
+ {
1451
+ "rel": "self",
1452
+ "href": "http://localhost:3000/api/questions/24",
1453
+ "method": "GET"
1454
+ }
1455
+ ]
1456
+ },
1457
+ {
1458
+ "id": 25,
1459
+ "question_type": "multiple",
1460
+ "text": "Where are you?",
1461
+ "responses": [
1462
+ "At Home",
1463
+ "At Work",
1464
+ "In a car",
1465
+ "Other"
1466
+ ],
1467
+ "key": "where_are_you",
1468
+ "_links": [
1469
+ {
1470
+ "rel": "self",
1471
+ "href": "http://localhost:3000/api/questions/25",
1472
+ "method": "GET"
1473
+ }
1474
+ ]
1475
+ },
1476
+ {
1477
+ "id": 26,
1478
+ "question_type": "multiple",
1479
+ "text": "What are you doing?",
1480
+ "responses": [
1481
+ "Eating",
1482
+ "Bathroom",
1483
+ "Working"
1484
+ ],
1485
+ "key": "what_are_you_doing",
1486
+ "_links": [
1487
+ {
1488
+ "rel": "self",
1489
+ "href": "http://localhost:3000/api/questions/26",
1490
+ "method": "GET"
1491
+ }
1492
+ ]
1493
+ },
1494
+ {
1495
+ "id": 28,
1496
+ "question_type": "boolean",
1497
+ "text": "Do you have to do what you're doing?",
1498
+ "responses": [
1499
+ "t",
1500
+ "f"
1501
+ ],
1502
+ "key": "do_you_have_to_do_what_youre_doing",
1503
+ "_links": [
1504
+ {
1505
+ "rel": "self",
1506
+ "href": "http://localhost:3000/api/questions/28",
1507
+ "method": "GET"
1508
+ }
1509
+ ]
1510
+ },
1511
+ {
1512
+ "id": 29,
1513
+ "question_type": "range",
1514
+ "text": "To what extent are you focused on what you are doing?",
1515
+ "responses": [
1516
+ "0",
1517
+ "10"
1518
+ ],
1519
+ "key": "how_focused",
1520
+ "_links": [
1521
+ {
1522
+ "rel": "self",
1523
+ "href": "http://localhost:3000/api/questions/29",
1524
+ "method": "GET"
1525
+ }
1526
+ ]
1527
+ },
1528
+ {
1529
+ "id": 30,
1530
+ "question_type": "multiple",
1531
+ "text": "When did you last check Facebook?",
1532
+ "responses": [
1533
+ "Right now",
1534
+ "In the last 5 minutes",
1535
+ "In the last 15 minutes",
1536
+ "In the last 30 minutes",
1537
+ "In the last hour",
1538
+ "1-2 hours ago",
1539
+ "3-5 hours ago",
1540
+ "6-12 hours ago",
1541
+ "24 hours ago",
1542
+ "Don't use facebook"
1543
+ ],
1544
+ "key": "when_did_last_check_facebook",
1545
+ "_links": [
1546
+ {
1547
+ "rel": "self",
1548
+ "href": "http://localhost:3000/api/questions/30",
1549
+ "method": "GET"
1550
+ }
1551
+ ]
1552
+ },
1553
+ {
1554
+ "id": 31,
1555
+ "question_type": "multiple",
1556
+ "text": "Beyond any work you've already done today, how many additional hours do you expect to work today?",
1557
+ "responses": [
1558
+ "0 (none)",
1559
+ "Less than 1 hour",
1560
+ "1-2 hours",
1561
+ "2-3 hours",
1562
+ "3-4 hours",
1563
+ "4-5 hours",
1564
+ "5-6 hours"
1565
+ ],
1566
+ "key": "how_many_additional_work_hours",
1567
+ "_links": [
1568
+ {
1569
+ "rel": "self",
1570
+ "href": "http://localhost:3000/api/questions/31",
1571
+ "method": "GET"
1572
+ }
1573
+ ]
1574
+ },
1575
+ {
1576
+ "id": 32,
1577
+ "question_type": "boolean",
1578
+ "text": "If you could, and it had no negative consequences, would you jump forward in time 24 hours?",
1579
+ "responses": [
1580
+ "t",
1581
+ "f"
1582
+ ],
1583
+ "key": "jump_forward_24_hours",
1584
+ "_links": [
1585
+ {
1586
+ "rel": "self",
1587
+ "href": "http://localhost:3000/api/questions/32",
1588
+ "method": "GET"
1589
+ }
1590
+ ]
1591
+ },
1592
+ {
1593
+ "id": 33,
1594
+ "question_type": "boolean",
1595
+ "text": "Do you like poptarts?",
1596
+ "responses": [
1597
+ "t",
1598
+ "f"
1599
+ ],
1600
+ "key": "poptarts",
1601
+ "_links": [
1602
+ {
1603
+ "rel": "self",
1604
+ "href": "http://localhost:3000/api/questions/33",
1605
+ "method": "GET"
1606
+ }
1607
+ ]
1608
+ },
1609
+ {
1610
+ "id": 34,
1611
+ "question_type": "multiple",
1612
+ "text": "Do you like poptarts?",
1613
+ "responses": [
1614
+ "Yes",
1615
+ "No"
1616
+ ],
1617
+ "key": null,
1618
+ "_links": [
1619
+ {
1620
+ "rel": "self",
1621
+ "href": "http://localhost:3000/api/questions/34",
1622
+ "method": "GET"
1623
+ }
1624
+ ]
1625
+ },
1626
+ {
1627
+ "id": 35,
1628
+ "question_type": "range",
1629
+ "text": "Do you like poptarts?",
1630
+ "responses": [
1631
+ "0",
1632
+ "10"
1633
+ ],
1634
+ "key": null,
1635
+ "_links": [
1636
+ {
1637
+ "rel": "self",
1638
+ "href": "http://localhost:3000/api/questions/35",
1639
+ "method": "GET"
1640
+ }
1641
+ ]
1642
+ },
1643
+ {
1644
+ "id": 36,
1645
+ "question_type": "boolean",
1646
+ "text": "Do you like poptarts?",
1647
+ "responses": [
1648
+ "t",
1649
+ "f"
1650
+ ],
1651
+ "key": "poptarts",
1652
+ "_links": [
1653
+ {
1654
+ "rel": "self",
1655
+ "href": "http://localhost:3000/api/questions/36",
1656
+ "method": "GET"
1657
+ }
1658
+ ]
1659
+ },
1660
+ {
1661
+ "id": 37,
1662
+ "question_type": "boolean",
1663
+ "text": "Do you like poptarts?",
1664
+ "responses": [
1665
+ "t",
1666
+ "f"
1667
+ ],
1668
+ "key": "poptarts",
1669
+ "_links": [
1670
+ {
1671
+ "rel": "self",
1672
+ "href": "http://localhost:3000/api/questions/37",
1673
+ "method": "GET"
1674
+ }
1675
+ ]
1676
+ },
1677
+ {
1678
+ "id": 38,
1679
+ "question_type": "boolean",
1680
+ "text": "Do you like poptarts?",
1681
+ "responses": [
1682
+ "t",
1683
+ "f"
1684
+ ],
1685
+ "key": null,
1686
+ "_links": [
1687
+ {
1688
+ "rel": "self",
1689
+ "href": "http://localhost:3000/api/questions/38",
1690
+ "method": "GET"
1691
+ }
1692
+ ]
1693
+ },
1694
+ {
1695
+ "id": 39,
1696
+ "question_type": "boolean",
1697
+ "text": "Do you like poptarts?",
1698
+ "responses": [
1699
+ "t",
1700
+ "f"
1701
+ ],
1702
+ "key": null,
1703
+ "_links": [
1704
+ {
1705
+ "rel": "self",
1706
+ "href": "http://localhost:3000/api/questions/39",
1707
+ "method": "GET"
1708
+ }
1709
+ ]
1710
+ },
1711
+ {
1712
+ "id": 40,
1713
+ "question_type": "boolean",
1714
+ "text": "Do you like poptarts?",
1715
+ "responses": [
1716
+ "t",
1717
+ "f"
1718
+ ],
1719
+ "key": null,
1720
+ "_links": [
1721
+ {
1722
+ "rel": "self",
1723
+ "href": "http://localhost:3000/api/questions/40",
1724
+ "method": "GET"
1725
+ }
1726
+ ]
1727
+ },
1728
+ {
1729
+ "id": 41,
1730
+ "question_type": "boolean",
1731
+ "text": "Do you like poptarts?",
1732
+ "responses": [
1733
+ "t",
1734
+ "f"
1735
+ ],
1736
+ "key": null,
1737
+ "_links": [
1738
+ {
1739
+ "rel": "self",
1740
+ "href": "http://localhost:3000/api/questions/41",
1741
+ "method": "GET"
1742
+ }
1743
+ ]
1744
+ },
1745
+ {
1746
+ "id": 42,
1747
+ "question_type": "boolean",
1748
+ "text": "Do you like poptarts?",
1749
+ "responses": [
1750
+ "t",
1751
+ "f"
1752
+ ],
1753
+ "key": null,
1754
+ "_links": [
1755
+ {
1756
+ "rel": "self",
1757
+ "href": "http://localhost:3000/api/questions/42",
1758
+ "method": "GET"
1759
+ }
1760
+ ]
1761
+ },
1762
+ {
1763
+ "id": 43,
1764
+ "question_type": "boolean",
1765
+ "text": "Do you like poptarts?",
1766
+ "responses": [
1767
+ "t",
1768
+ "f"
1769
+ ],
1770
+ "key": null,
1771
+ "_links": [
1772
+ {
1773
+ "rel": "self",
1774
+ "href": "http://localhost:3000/api/questions/43",
1775
+ "method": "GET"
1776
+ }
1777
+ ]
1778
+ },
1779
+ {
1780
+ "id": 44,
1781
+ "question_type": "boolean",
1782
+ "text": "Do you like poptarts?",
1783
+ "responses": [
1784
+ "t",
1785
+ "f"
1786
+ ],
1787
+ "key": null,
1788
+ "_links": [
1789
+ {
1790
+ "rel": "self",
1791
+ "href": "http://localhost:3000/api/questions/44",
1792
+ "method": "GET"
1793
+ }
1794
+ ]
1795
+ },
1796
+ {
1797
+ "id": 45,
1798
+ "question_type": "boolean",
1799
+ "text": "Do you like poptarts?",
1800
+ "responses": [
1801
+ "t",
1802
+ "f"
1803
+ ],
1804
+ "key": null,
1805
+ "_links": [
1806
+ {
1807
+ "rel": "self",
1808
+ "href": "http://localhost:3000/api/questions/45",
1809
+ "method": "GET"
1810
+ }
1811
+ ]
1812
+ },
1813
+ {
1814
+ "id": 46,
1815
+ "question_type": "boolean",
1816
+ "text": "Do you like poptarts?",
1817
+ "responses": [
1818
+ "t",
1819
+ "f"
1820
+ ],
1821
+ "key": null,
1822
+ "_links": [
1823
+ {
1824
+ "rel": "self",
1825
+ "href": "http://localhost:3000/api/questions/46",
1826
+ "method": "GET"
1827
+ }
1828
+ ]
1829
+ },
1830
+ {
1831
+ "id": 47,
1832
+ "question_type": "multiple",
1833
+ "text": "Where are you?",
1834
+ "responses": [
1835
+ "At Home",
1836
+ "At Work",
1837
+ "In a car",
1838
+ "Other"
1839
+ ],
1840
+ "key": null,
1841
+ "_links": [
1842
+ {
1843
+ "rel": "self",
1844
+ "href": "http://localhost:3000/api/questions/47",
1845
+ "method": "GET"
1846
+ }
1847
+ ]
1848
+ },
1849
+ {
1850
+ "id": 48,
1851
+ "question_type": "boolean",
1852
+ "text": "Do you like poptarts?",
1853
+ "responses": [
1854
+ "t",
1855
+ "f"
1856
+ ],
1857
+ "key": null,
1858
+ "_links": [
1859
+ {
1860
+ "rel": "self",
1861
+ "href": "http://localhost:3000/api/questions/48",
1862
+ "method": "GET"
1863
+ }
1864
+ ]
1865
+ },
1866
+ {
1867
+ "id": 49,
1868
+ "question_type": "multiple",
1869
+ "text": "Where are you?",
1870
+ "responses": [
1871
+ "At Home",
1872
+ "At Work",
1873
+ "In a car",
1874
+ "Other"
1875
+ ],
1876
+ "key": null,
1877
+ "_links": [
1878
+ {
1879
+ "rel": "self",
1880
+ "href": "http://localhost:3000/api/questions/49",
1881
+ "method": "GET"
1882
+ }
1883
+ ]
1884
+ },
1885
+ {
1886
+ "id": 50,
1887
+ "question_type": "boolean",
1888
+ "text": "Do you like poptarts?",
1889
+ "responses": [
1890
+ "t",
1891
+ "f"
1892
+ ],
1893
+ "key": null,
1894
+ "_links": [
1895
+ {
1896
+ "rel": "self",
1897
+ "href": "http://localhost:3000/api/questions/50",
1898
+ "method": "GET"
1899
+ }
1900
+ ]
1901
+ },
1902
+ {
1903
+ "id": 51,
1904
+ "question_type": "multiple",
1905
+ "text": "Where are you?",
1906
+ "responses": [
1907
+ "At Home",
1908
+ "At Work",
1909
+ "In a car",
1910
+ "Other"
1911
+ ],
1912
+ "key": null,
1913
+ "_links": [
1914
+ {
1915
+ "rel": "self",
1916
+ "href": "http://localhost:3000/api/questions/51",
1917
+ "method": "GET"
1918
+ }
1919
+ ]
1920
+ },
1921
+ {
1922
+ "id": 52,
1923
+ "question_type": "boolean",
1924
+ "text": "Do you like poptarts?",
1925
+ "responses": [
1926
+ "t",
1927
+ "f"
1928
+ ],
1929
+ "key": null,
1930
+ "_links": [
1931
+ {
1932
+ "rel": "self",
1933
+ "href": "http://localhost:3000/api/questions/52",
1934
+ "method": "GET"
1935
+ }
1936
+ ]
1937
+ },
1938
+ {
1939
+ "id": 53,
1940
+ "question_type": "multiple",
1941
+ "text": "Where are you?",
1942
+ "responses": [
1943
+ "At Home",
1944
+ "At Work",
1945
+ "In a car",
1946
+ "Other"
1947
+ ],
1948
+ "key": null,
1949
+ "_links": [
1950
+ {
1951
+ "rel": "self",
1952
+ "href": "http://localhost:3000/api/questions/53",
1953
+ "method": "GET"
1954
+ }
1955
+ ]
1956
+ },
1957
+ {
1958
+ "id": 54,
1959
+ "question_type": "boolean",
1960
+ "text": "Do you like poptarts?",
1961
+ "responses": [
1962
+ "t",
1963
+ "f"
1964
+ ],
1965
+ "key": null,
1966
+ "_links": [
1967
+ {
1968
+ "rel": "self",
1969
+ "href": "http://localhost:3000/api/questions/54",
1970
+ "method": "GET"
1971
+ }
1972
+ ]
1973
+ },
1974
+ {
1975
+ "id": 55,
1976
+ "question_type": "multiple",
1977
+ "text": "Where are you?",
1978
+ "responses": [
1979
+ "At Home",
1980
+ "At Work",
1981
+ "In a car",
1982
+ "Other"
1983
+ ],
1984
+ "key": null,
1985
+ "_links": [
1986
+ {
1987
+ "rel": "self",
1988
+ "href": "http://localhost:3000/api/questions/55",
1989
+ "method": "GET"
1990
+ }
1991
+ ]
1992
+ },
1993
+ {
1994
+ "id": 56,
1995
+ "question_type": "boolean",
1996
+ "text": "Do you like poptarts?",
1997
+ "responses": [
1998
+ "t",
1999
+ "f"
2000
+ ],
2001
+ "key": null,
2002
+ "_links": [
2003
+ {
2004
+ "rel": "self",
2005
+ "href": "http://localhost:3000/api/questions/56",
2006
+ "method": "GET"
2007
+ }
2008
+ ]
2009
+ },
2010
+ {
2011
+ "id": 57,
2012
+ "question_type": "multiple",
2013
+ "text": "Where are you?",
2014
+ "responses": [
2015
+ "At Home",
2016
+ "At Work",
2017
+ "In a car",
2018
+ "Other"
2019
+ ],
2020
+ "key": null,
2021
+ "_links": [
2022
+ {
2023
+ "rel": "self",
2024
+ "href": "http://localhost:3000/api/questions/57",
2025
+ "method": "GET"
2026
+ }
2027
+ ]
2028
+ },
2029
+ {
2030
+ "id": 58,
2031
+ "question_type": "boolean",
2032
+ "text": "Do you like poptarts?",
2033
+ "responses": [
2034
+ "t",
2035
+ "f"
2036
+ ],
2037
+ "key": null,
2038
+ "_links": [
2039
+ {
2040
+ "rel": "self",
2041
+ "href": "http://localhost:3000/api/questions/58",
2042
+ "method": "GET"
2043
+ }
2044
+ ]
2045
+ },
2046
+ {
2047
+ "id": 59,
2048
+ "question_type": "multiple",
2049
+ "text": "Where are you?",
2050
+ "responses": [
2051
+ "At Home",
2052
+ "At Work",
2053
+ "In a car",
2054
+ "Other"
2055
+ ],
2056
+ "key": null,
2057
+ "_links": [
2058
+ {
2059
+ "rel": "self",
2060
+ "href": "http://localhost:3000/api/questions/59",
2061
+ "method": "GET"
2062
+ }
2063
+ ]
2064
+ },
2065
+ {
2066
+ "id": 60,
2067
+ "question_type": "boolean",
2068
+ "text": "Do you like poptarts?",
2069
+ "responses": [
2070
+ "t",
2071
+ "f"
2072
+ ],
2073
+ "key": null,
2074
+ "_links": [
2075
+ {
2076
+ "rel": "self",
2077
+ "href": "http://localhost:3000/api/questions/60",
2078
+ "method": "GET"
2079
+ }
2080
+ ]
2081
+ },
2082
+ {
2083
+ "id": 61,
2084
+ "question_type": "multiple",
2085
+ "text": "Where are you?",
2086
+ "responses": [
2087
+ "At Home",
2088
+ "At Work",
2089
+ "In a car",
2090
+ "Other"
2091
+ ],
2092
+ "key": null,
2093
+ "_links": [
2094
+ {
2095
+ "rel": "self",
2096
+ "href": "http://localhost:3000/api/questions/61",
2097
+ "method": "GET"
2098
+ }
2099
+ ]
2100
+ },
2101
+ {
2102
+ "id": 62,
2103
+ "question_type": "multiple",
2104
+ "text": "Where are you?",
2105
+ "responses": [
2106
+ "At Home",
2107
+ "At Work",
2108
+ "In a car",
2109
+ "Other"
2110
+ ],
2111
+ "key": null,
2112
+ "_links": [
2113
+ {
2114
+ "rel": "self",
2115
+ "href": "http://localhost:3000/api/questions/62",
2116
+ "method": "GET"
2117
+ }
2118
+ ]
2119
+ },
2120
+ {
2121
+ "id": 63,
2122
+ "question_type": "boolean",
2123
+ "text": "Do you like poptarts?",
2124
+ "responses": [
2125
+ "t",
2126
+ "f"
2127
+ ],
2128
+ "key": null,
2129
+ "_links": [
2130
+ {
2131
+ "rel": "self",
2132
+ "href": "http://localhost:3000/api/questions/63",
2133
+ "method": "GET"
2134
+ }
2135
+ ]
2136
+ },
2137
+ {
2138
+ "id": 64,
2139
+ "question_type": "boolean",
2140
+ "text": "Do you like poptarts?",
2141
+ "responses": [
2142
+ "t",
2143
+ "f"
2144
+ ],
2145
+ "key": null,
2146
+ "_links": [
2147
+ {
2148
+ "rel": "self",
2149
+ "href": "http://localhost:3000/api/questions/64",
2150
+ "method": "GET"
2151
+ }
2152
+ ]
2153
+ },
2154
+ {
2155
+ "id": 65,
2156
+ "question_type": "boolean",
2157
+ "text": "Do you like poptarts?",
2158
+ "responses": [
2159
+ "t",
2160
+ "f"
2161
+ ],
2162
+ "key": null,
2163
+ "_links": [
2164
+ {
2165
+ "rel": "self",
2166
+ "href": "http://localhost:3000/api/questions/65",
2167
+ "method": "GET"
2168
+ }
2169
+ ]
2170
+ },
2171
+ {
2172
+ "id": 66,
2173
+ "question_type": "boolean",
2174
+ "text": "Do you like poptarts?",
2175
+ "responses": [
2176
+ "t",
2177
+ "f"
2178
+ ],
2179
+ "key": null,
2180
+ "_links": [
2181
+ {
2182
+ "rel": "self",
2183
+ "href": "http://localhost:3000/api/questions/66",
2184
+ "method": "GET"
2185
+ }
2186
+ ]
2187
+ },
2188
+ {
2189
+ "id": 67,
2190
+ "question_type": "boolean",
2191
+ "text": "Do you like poptarts?",
2192
+ "responses": [
2193
+ "t",
2194
+ "f"
2195
+ ],
2196
+ "key": null,
2197
+ "_links": [
2198
+ {
2199
+ "rel": "self",
2200
+ "href": "http://localhost:3000/api/questions/67",
2201
+ "method": "GET"
2202
+ }
2203
+ ]
2204
+ },
2205
+ {
2206
+ "id": 68,
2207
+ "question_type": "multiple",
2208
+ "text": "Where are you?",
2209
+ "responses": [
2210
+ "At Home",
2211
+ "At Work",
2212
+ "In a car",
2213
+ "Other"
2214
+ ],
2215
+ "key": null,
2216
+ "_links": [
2217
+ {
2218
+ "rel": "self",
2219
+ "href": "http://localhost:3000/api/questions/68",
2220
+ "method": "GET"
2221
+ }
2222
+ ]
2223
+ },
2224
+ {
2225
+ "id": 69,
2226
+ "question_type": "multiple",
2227
+ "text": "Where are you?",
2228
+ "responses": [
2229
+ "At Home",
2230
+ "At Work",
2231
+ "In a car",
2232
+ "Other"
2233
+ ],
2234
+ "key": null,
2235
+ "_links": [
2236
+ {
2237
+ "rel": "self",
2238
+ "href": "http://localhost:3000/api/questions/69",
2239
+ "method": "GET"
2240
+ }
2241
+ ]
2242
+ },
2243
+ {
2244
+ "id": 70,
2245
+ "question_type": "boolean",
2246
+ "text": "Do you like poptarts?",
2247
+ "responses": [
2248
+ "t",
2249
+ "f"
2250
+ ],
2251
+ "key": null,
2252
+ "_links": [
2253
+ {
2254
+ "rel": "self",
2255
+ "href": "http://localhost:3000/api/questions/70",
2256
+ "method": "GET"
2257
+ }
2258
+ ]
2259
+ },
2260
+ {
2261
+ "id": 71,
2262
+ "question_type": "boolean",
2263
+ "text": "Do you like poptarts?",
2264
+ "responses": [
2265
+ "t",
2266
+ "f"
2267
+ ],
2268
+ "key": null,
2269
+ "_links": [
2270
+ {
2271
+ "rel": "self",
2272
+ "href": "http://localhost:3000/api/questions/71",
2273
+ "method": "GET"
2274
+ }
2275
+ ]
2276
+ },
2277
+ {
2278
+ "id": 72,
2279
+ "question_type": "boolean",
2280
+ "text": "Do you like poptarts?",
2281
+ "responses": [
2282
+ "t",
2283
+ "f"
2284
+ ],
2285
+ "key": null,
2286
+ "_links": [
2287
+ {
2288
+ "rel": "self",
2289
+ "href": "http://localhost:3000/api/questions/72",
2290
+ "method": "GET"
2291
+ }
2292
+ ]
2293
+ },
2294
+ {
2295
+ "id": 73,
2296
+ "question_type": "boolean",
2297
+ "text": "Do you like poptarts?",
2298
+ "responses": [
2299
+ "t",
2300
+ "f"
2301
+ ],
2302
+ "key": null,
2303
+ "_links": [
2304
+ {
2305
+ "rel": "self",
2306
+ "href": "http://localhost:3000/api/questions/73",
2307
+ "method": "GET"
2308
+ }
2309
+ ]
2310
+ },
2311
+ {
2312
+ "id": 74,
2313
+ "question_type": "boolean",
2314
+ "text": "Do you like poptarts?",
2315
+ "responses": [
2316
+ "t",
2317
+ "f"
2318
+ ],
2319
+ "key": null,
2320
+ "_links": [
2321
+ {
2322
+ "rel": "self",
2323
+ "href": "http://localhost:3000/api/questions/74",
2324
+ "method": "GET"
2325
+ }
2326
+ ]
2327
+ },
2328
+ {
2329
+ "id": 75,
2330
+ "question_type": "boolean",
2331
+ "text": "Do you like poptarts?",
2332
+ "responses": [
2333
+ "t",
2334
+ "f"
2335
+ ],
2336
+ "key": "poptarts",
2337
+ "_links": [
2338
+ {
2339
+ "rel": "self",
2340
+ "href": "http://localhost:3000/api/questions/75",
2341
+ "method": "GET"
2342
+ }
2343
+ ]
2344
+ },
2345
+ {
2346
+ "id": 76,
2347
+ "question_type": "boolean",
2348
+ "text": "Do you like poptarts?",
2349
+ "responses": [
2350
+ "t",
2351
+ "f"
2352
+ ],
2353
+ "key": null,
2354
+ "_links": [
2355
+ {
2356
+ "rel": "self",
2357
+ "href": "http://localhost:3000/api/questions/76",
2358
+ "method": "GET"
2359
+ }
2360
+ ]
2361
+ },
2362
+ {
2363
+ "id": 77,
2364
+ "question_type": "boolean",
2365
+ "text": "Do you like poptarts?",
2366
+ "responses": [
2367
+ "t",
2368
+ "f"
2369
+ ],
2370
+ "key": "poptarts",
2371
+ "_links": [
2372
+ {
2373
+ "rel": "self",
2374
+ "href": "http://localhost:3000/api/questions/77",
2375
+ "method": "GET"
2376
+ }
2377
+ ]
2378
+ },
2379
+ {
2380
+ "id": 78,
2381
+ "question_type": "boolean",
2382
+ "text": "Do you like poptarts?",
2383
+ "responses": [
2384
+ "t",
2385
+ "f"
2386
+ ],
2387
+ "key": null,
2388
+ "_links": [
2389
+ {
2390
+ "rel": "self",
2391
+ "href": "http://localhost:3000/api/questions/78",
2392
+ "method": "GET"
2393
+ }
2394
+ ]
2395
+ },
2396
+ {
2397
+ "id": 79,
2398
+ "question_type": "boolean",
2399
+ "text": "Do you like poptarts?",
2400
+ "responses": [
2401
+ "t",
2402
+ "f"
2403
+ ],
2404
+ "key": "poptarts",
2405
+ "_links": [
2406
+ {
2407
+ "rel": "self",
2408
+ "href": "http://localhost:3000/api/questions/79",
2409
+ "method": "GET"
2410
+ }
2411
+ ]
2412
+ },
2413
+ {
2414
+ "id": 80,
2415
+ "question_type": "boolean",
2416
+ "text": "Do you like poptarts?",
2417
+ "responses": [
2418
+ "t",
2419
+ "f"
2420
+ ],
2421
+ "key": null,
2422
+ "_links": [
2423
+ {
2424
+ "rel": "self",
2425
+ "href": "http://localhost:3000/api/questions/80",
2426
+ "method": "GET"
2427
+ }
2428
+ ]
2429
+ },
2430
+ {
2431
+ "id": 81,
2432
+ "question_type": "boolean",
2433
+ "text": "Do you like poptarts?",
2434
+ "responses": [
2435
+ "t",
2436
+ "f"
2437
+ ],
2438
+ "key": null,
2439
+ "_links": [
2440
+ {
2441
+ "rel": "self",
2442
+ "href": "http://localhost:3000/api/questions/81",
2443
+ "method": "GET"
2444
+ }
2445
+ ]
2446
+ },
2447
+ {
2448
+ "id": 82,
2449
+ "question_type": "boolean",
2450
+ "text": "Do you like poptarts?",
2451
+ "responses": [
2452
+ "t",
2453
+ "f"
2454
+ ],
2455
+ "key": null,
2456
+ "_links": [
2457
+ {
2458
+ "rel": "self",
2459
+ "href": "http://localhost:3000/api/questions/82",
2460
+ "method": "GET"
2461
+ }
2462
+ ]
2463
+ },
2464
+ {
2465
+ "id": 83,
2466
+ "question_type": "boolean",
2467
+ "text": "Do you like poptarts?",
2468
+ "responses": [
2469
+ "t",
2470
+ "f"
2471
+ ],
2472
+ "key": null,
2473
+ "_links": [
2474
+ {
2475
+ "rel": "self",
2476
+ "href": "http://localhost:3000/api/questions/83",
2477
+ "method": "GET"
2478
+ }
2479
+ ]
2480
+ },
2481
+ {
2482
+ "id": 84,
2483
+ "question_type": "boolean",
2484
+ "text": "Do you like poptarts?",
2485
+ "responses": [
2486
+ "t",
2487
+ "f"
2488
+ ],
2489
+ "key": null,
2490
+ "_links": [
2491
+ {
2492
+ "rel": "self",
2493
+ "href": "http://localhost:3000/api/questions/84",
2494
+ "method": "GET"
2495
+ }
2496
+ ]
2497
+ },
2498
+ {
2499
+ "id": 85,
2500
+ "question_type": "boolean",
2501
+ "text": "Do you like poptarts?",
2502
+ "responses": [
2503
+ "t",
2504
+ "f"
2505
+ ],
2506
+ "key": null,
2507
+ "_links": [
2508
+ {
2509
+ "rel": "self",
2510
+ "href": "http://localhost:3000/api/questions/85",
2511
+ "method": "GET"
2512
+ }
2513
+ ]
2514
+ },
2515
+ {
2516
+ "id": 86,
2517
+ "question_type": "boolean",
2518
+ "text": "Do you like poptarts?",
2519
+ "responses": [
2520
+ "t",
2521
+ "f"
2522
+ ],
2523
+ "key": null,
2524
+ "_links": [
2525
+ {
2526
+ "rel": "self",
2527
+ "href": "http://localhost:3000/api/questions/86",
2528
+ "method": "GET"
2529
+ }
2530
+ ]
2531
+ },
2532
+ {
2533
+ "id": 87,
2534
+ "question_type": "multiple",
2535
+ "text": "Where are you?",
2536
+ "responses": [
2537
+ "At Home",
2538
+ "At Work",
2539
+ "In a car",
2540
+ "Other"
2541
+ ],
2542
+ "key": null,
2543
+ "_links": [
2544
+ {
2545
+ "rel": "self",
2546
+ "href": "http://localhost:3000/api/questions/87",
2547
+ "method": "GET"
2548
+ }
2549
+ ]
2550
+ },
2551
+ {
2552
+ "id": 88,
2553
+ "question_type": "boolean",
2554
+ "text": "Do you like poptarts?",
2555
+ "responses": [
2556
+ "t",
2557
+ "f"
2558
+ ],
2559
+ "key": null,
2560
+ "_links": [
2561
+ {
2562
+ "rel": "self",
2563
+ "href": "http://localhost:3000/api/questions/88",
2564
+ "method": "GET"
2565
+ }
2566
+ ]
2567
+ },
2568
+ {
2569
+ "id": 89,
2570
+ "question_type": "boolean",
2571
+ "text": "Do you like poptarts?",
2572
+ "responses": [
2573
+ "t",
2574
+ "f"
2575
+ ],
2576
+ "key": null,
2577
+ "_links": [
2578
+ {
2579
+ "rel": "self",
2580
+ "href": "http://localhost:3000/api/questions/89",
2581
+ "method": "GET"
2582
+ }
2583
+ ]
2584
+ },
2585
+ {
2586
+ "id": 90,
2587
+ "question_type": "multiple",
2588
+ "text": "Where are you?",
2589
+ "responses": [
2590
+ "At Home",
2591
+ "At Work",
2592
+ "In a car",
2593
+ "Other"
2594
+ ],
2595
+ "key": null,
2596
+ "_links": [
2597
+ {
2598
+ "rel": "self",
2599
+ "href": "http://localhost:3000/api/questions/90",
2600
+ "method": "GET"
2601
+ }
2602
+ ]
2603
+ },
2604
+ {
2605
+ "id": 91,
2606
+ "question_type": "boolean",
2607
+ "text": "Do you like poptarts?",
2608
+ "responses": [
2609
+ "t",
2610
+ "f"
2611
+ ],
2612
+ "key": null,
2613
+ "_links": [
2614
+ {
2615
+ "rel": "self",
2616
+ "href": "http://localhost:3000/api/questions/91",
2617
+ "method": "GET"
2618
+ }
2619
+ ]
2620
+ },
2621
+ {
2622
+ "id": 92,
2623
+ "question_type": "multiple",
2624
+ "text": "Where are you?",
2625
+ "responses": [
2626
+ "At Home",
2627
+ "At Work",
2628
+ "In a car",
2629
+ "Other"
2630
+ ],
2631
+ "key": null,
2632
+ "_links": [
2633
+ {
2634
+ "rel": "self",
2635
+ "href": "http://localhost:3000/api/questions/92",
2636
+ "method": "GET"
2637
+ }
2638
+ ]
2639
+ },
2640
+ {
2641
+ "id": 93,
2642
+ "question_type": "boolean",
2643
+ "text": "Do you like poptarts?",
2644
+ "responses": [
2645
+ "t",
2646
+ "f"
2647
+ ],
2648
+ "key": null,
2649
+ "_links": [
2650
+ {
2651
+ "rel": "self",
2652
+ "href": "http://localhost:3000/api/questions/93",
2653
+ "method": "GET"
2654
+ }
2655
+ ]
2656
+ },
2657
+ {
2658
+ "id": 94,
2659
+ "question_type": "multiple",
2660
+ "text": "Where are you?",
2661
+ "responses": [
2662
+ "At Home",
2663
+ "At Work",
2664
+ "In a car",
2665
+ "Other"
2666
+ ],
2667
+ "key": null,
2668
+ "_links": [
2669
+ {
2670
+ "rel": "self",
2671
+ "href": "http://localhost:3000/api/questions/94",
2672
+ "method": "GET"
2673
+ }
2674
+ ]
2675
+ },
2676
+ {
2677
+ "id": 95,
2678
+ "question_type": "multiple",
2679
+ "text": "Where are you?",
2680
+ "responses": [
2681
+ "At Home",
2682
+ "At Work",
2683
+ "In a car",
2684
+ "Other"
2685
+ ],
2686
+ "key": null,
2687
+ "_links": [
2688
+ {
2689
+ "rel": "self",
2690
+ "href": "http://localhost:3000/api/questions/95",
2691
+ "method": "GET"
2692
+ }
2693
+ ]
2694
+ },
2695
+ {
2696
+ "id": 96,
2697
+ "question_type": "boolean",
2698
+ "text": "Do you like poptarts?",
2699
+ "responses": [
2700
+ "t",
2701
+ "f"
2702
+ ],
2703
+ "key": null,
2704
+ "_links": [
2705
+ {
2706
+ "rel": "self",
2707
+ "href": "http://localhost:3000/api/questions/96",
2708
+ "method": "GET"
2709
+ }
2710
+ ]
2711
+ },
2712
+ {
2713
+ "id": 97,
2714
+ "question_type": "boolean",
2715
+ "text": "Do you like poptarts?",
2716
+ "responses": [
2717
+ "t",
2718
+ "f"
2719
+ ],
2720
+ "key": null,
2721
+ "_links": [
2722
+ {
2723
+ "rel": "self",
2724
+ "href": "http://localhost:3000/api/questions/97",
2725
+ "method": "GET"
2726
+ }
2727
+ ]
2728
+ },
2729
+ {
2730
+ "id": 98,
2731
+ "question_type": "multiple",
2732
+ "text": "Where are you?",
2733
+ "responses": [
2734
+ "At Home",
2735
+ "At Work",
2736
+ "In a car",
2737
+ "Other"
2738
+ ],
2739
+ "key": null,
2740
+ "_links": [
2741
+ {
2742
+ "rel": "self",
2743
+ "href": "http://localhost:3000/api/questions/98",
2744
+ "method": "GET"
2745
+ }
2746
+ ]
2747
+ }
2748
+ ]
2749
+ http_version:
2750
+ recorded_at: Sun, 25 Jan 2015 14:07:15 GMT
2751
+ - request:
2752
+ method: post
2753
+ uri: http://localhost:3000/api/surveys
2754
+ body:
2755
+ encoding: UTF-8
2756
+ string: "{}"
2757
+ headers:
2758
+ User-Agent:
2759
+ - Faraday v0.9.0
2760
+ Content-Type:
2761
+ - application/json
2762
+ Api-Token:
2763
+ - testing
2764
+ User-Token:
2765
+ - 418d60ff35340cfae0ad820b9eafb9978fb0874e1568d6780ee1336413462779
2766
+ Service-User-Id:
2767
+ - 6943fa049ba6492bfe8421e556fed40c1a486285f94703f8fa924306b1c61afc
2768
+ Accept-Encoding:
2769
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
2770
+ Accept:
2771
+ - "*/*"
2772
+ response:
2773
+ status:
2774
+ code: 201
2775
+ message: 'Created '
2776
+ headers:
2777
+ X-Frame-Options:
2778
+ - SAMEORIGIN
2779
+ X-Xss-Protection:
2780
+ - 1; mode=block
2781
+ X-Content-Type-Options:
2782
+ - nosniff
2783
+ X-Ua-Compatible:
2784
+ - chrome=1
2785
+ Content-Type:
2786
+ - application/json; charset=utf-8
2787
+ Etag:
2788
+ - '"2f5e35834abd05d2afe5e3c4e3b0cd2e"'
2789
+ Cache-Control:
2790
+ - max-age=0, private, must-revalidate
2791
+ X-Request-Id:
2792
+ - c8e555b2-4dbe-4867-9c18-0ccc60058f6f
2793
+ X-Runtime:
2794
+ - '0.013131'
2795
+ Server:
2796
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
2797
+ Date:
2798
+ - Sun, 25 Jan 2015 14:07:15 GMT
2799
+ Content-Length:
2800
+ - '425'
2801
+ Connection:
2802
+ - Keep-Alive
2803
+ body:
2804
+ encoding: UTF-8
2805
+ string: |-
2806
+ {
2807
+ "id": 104,
2808
+ "service_user_id": "6943fa049ba6492bfe8421e556fed40c1a486285f94703f8fa924306b1c61afc",
2809
+ "_links": [
2810
+ {
2811
+ "href": "http://localhost:3000/api/surveys/104",
2812
+ "rel": "self",
2813
+ "method": "GET"
2814
+ },
2815
+ {
2816
+ "href": "http://localhost:3000/api/surveys/104/survey_questions",
2817
+ "rel": "survey-questions",
2818
+ "method": "POST"
2819
+ }
2820
+ ],
2821
+ "completed": true,
2822
+ "survey_questions": [
2823
+
2824
+ ]
2825
+ }
2826
+ http_version:
2827
+ recorded_at: Sun, 25 Jan 2015 14:07:15 GMT
2828
+ - request:
2829
+ method: post
2830
+ uri: http://localhost:3000/api/questions
2831
+ body:
2832
+ encoding: UTF-8
2833
+ string: '{"question":{"question_type":"multiple","responses":["At Home","At
2834
+ Work","In a car","Other"],"text":"Where are you?","key":null}}'
2835
+ headers:
2836
+ User-Agent:
2837
+ - Faraday v0.9.0
2838
+ Content-Type:
2839
+ - application/json
2840
+ Api-Token:
2841
+ - testing
2842
+ User-Token:
2843
+ - 418d60ff35340cfae0ad820b9eafb9978fb0874e1568d6780ee1336413462779
2844
+ Service-User-Id:
2845
+ - 6943fa049ba6492bfe8421e556fed40c1a486285f94703f8fa924306b1c61afc
2846
+ Accept-Encoding:
2847
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
2848
+ Accept:
2849
+ - "*/*"
2850
+ response:
2851
+ status:
2852
+ code: 201
2853
+ message: 'Created '
2854
+ headers:
2855
+ X-Frame-Options:
2856
+ - SAMEORIGIN
2857
+ X-Xss-Protection:
2858
+ - 1; mode=block
2859
+ X-Content-Type-Options:
2860
+ - nosniff
2861
+ X-Ua-Compatible:
2862
+ - chrome=1
2863
+ Content-Type:
2864
+ - application/json; charset=utf-8
2865
+ Etag:
2866
+ - '"d1eedb69bb39a03252c8267cb6dee70b"'
2867
+ Cache-Control:
2868
+ - max-age=0, private, must-revalidate
2869
+ X-Request-Id:
2870
+ - fe5bece8-d59a-45e5-a670-f338e05dcd0e
2871
+ X-Runtime:
2872
+ - '0.008158'
2873
+ Server:
2874
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
2875
+ Date:
2876
+ - Sun, 25 Jan 2015 14:07:15 GMT
2877
+ Content-Length:
2878
+ - '298'
2879
+ Connection:
2880
+ - Keep-Alive
2881
+ body:
2882
+ encoding: UTF-8
2883
+ string: |-
2884
+ {
2885
+ "id": 99,
2886
+ "question_type": "multiple",
2887
+ "text": "Where are you?",
2888
+ "responses": [
2889
+ "At Home",
2890
+ "At Work",
2891
+ "In a car",
2892
+ "Other"
2893
+ ],
2894
+ "key": null,
2895
+ "_links": [
2896
+ {
2897
+ "rel": "self",
2898
+ "href": "http://localhost:3000/api/questions/99",
2899
+ "method": "GET"
2900
+ }
2901
+ ]
2902
+ }
2903
+ http_version:
2904
+ recorded_at: Sun, 25 Jan 2015 14:07:15 GMT
2905
+ - request:
2906
+ method: post
2907
+ uri: http://localhost:3000/api/surveys/104/survey_questions
2908
+ body:
2909
+ encoding: UTF-8
2910
+ string: '{"survey_question":{"question_id":99,"responses":null}}'
2911
+ headers:
2912
+ User-Agent:
2913
+ - Faraday v0.9.0
2914
+ Content-Type:
2915
+ - application/json
2916
+ Api-Token:
2917
+ - testing
2918
+ User-Token:
2919
+ - 418d60ff35340cfae0ad820b9eafb9978fb0874e1568d6780ee1336413462779
2920
+ Service-User-Id:
2921
+ - 6943fa049ba6492bfe8421e556fed40c1a486285f94703f8fa924306b1c61afc
2922
+ Accept-Encoding:
2923
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
2924
+ Accept:
2925
+ - "*/*"
2926
+ response:
2927
+ status:
2928
+ code: 201
2929
+ message: 'Created '
2930
+ headers:
2931
+ X-Frame-Options:
2932
+ - SAMEORIGIN
2933
+ X-Xss-Protection:
2934
+ - 1; mode=block
2935
+ X-Content-Type-Options:
2936
+ - nosniff
2937
+ X-Ua-Compatible:
2938
+ - chrome=1
2939
+ Content-Type:
2940
+ - application/json; charset=utf-8
2941
+ Etag:
2942
+ - '"5fd47516824051d9b55d419550c92a91"'
2943
+ Cache-Control:
2944
+ - max-age=0, private, must-revalidate
2945
+ X-Request-Id:
2946
+ - 752d666f-9f4f-44d1-883e-1c7b998206a4
2947
+ X-Runtime:
2948
+ - '0.030552'
2949
+ Server:
2950
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
2951
+ Date:
2952
+ - Sun, 25 Jan 2015 14:07:15 GMT
2953
+ Content-Length:
2954
+ - '644'
2955
+ Connection:
2956
+ - Keep-Alive
2957
+ body:
2958
+ encoding: UTF-8
2959
+ string: |-
2960
+ {
2961
+ "id": 58,
2962
+ "text": "Where are you?",
2963
+ "question_type": "multiple",
2964
+ "responses": [
2965
+ "At Home",
2966
+ "At Work",
2967
+ "In a car",
2968
+ "Other"
2969
+ ],
2970
+ "answer": null,
2971
+ "_links": [
2972
+ {
2973
+ "rel": "self",
2974
+ "href": "http://localhost:3000/api/surveys/104/survey_questions/58",
2975
+ "method": "GET"
2976
+ },
2977
+ {
2978
+ "rel": "self",
2979
+ "href": "http://localhost:3000/api/surveys/104/survey_questions/58",
2980
+ "method": "PUT"
2981
+ },
2982
+ {
2983
+ "rel": "survey",
2984
+ "href": "http://localhost:3000/api/surveys/104",
2985
+ "method": "GET"
2986
+ }
2987
+ ],
2988
+ "created_at": "2015-01-25T14:07:15.530Z",
2989
+ "key": null,
2990
+ "question_id": 99
2991
+ }
2992
+ http_version:
2993
+ recorded_at: Sun, 25 Jan 2015 14:07:15 GMT
2994
+ - request:
2995
+ method: post
2996
+ uri: http://localhost:3000/api/surveys/104/survey_questions
2997
+ body:
2998
+ encoding: UTF-8
2999
+ string: '{"survey_question":{"question_id":99,"responses":null}}'
3000
+ headers:
3001
+ User-Agent:
3002
+ - Faraday v0.9.0
3003
+ Content-Type:
3004
+ - application/json
3005
+ Api-Token:
3006
+ - testing
3007
+ User-Token:
3008
+ - 418d60ff35340cfae0ad820b9eafb9978fb0874e1568d6780ee1336413462779
3009
+ Service-User-Id:
3010
+ - 6943fa049ba6492bfe8421e556fed40c1a486285f94703f8fa924306b1c61afc
3011
+ Accept-Encoding:
3012
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
3013
+ Accept:
3014
+ - "*/*"
3015
+ response:
3016
+ status:
3017
+ code: 201
3018
+ message: 'Created '
3019
+ headers:
3020
+ X-Frame-Options:
3021
+ - SAMEORIGIN
3022
+ X-Xss-Protection:
3023
+ - 1; mode=block
3024
+ X-Content-Type-Options:
3025
+ - nosniff
3026
+ X-Ua-Compatible:
3027
+ - chrome=1
3028
+ Content-Type:
3029
+ - application/json; charset=utf-8
3030
+ Etag:
3031
+ - '"2464eae2e15eff7630f2b430389b1e6d"'
3032
+ Cache-Control:
3033
+ - max-age=0, private, must-revalidate
3034
+ X-Request-Id:
3035
+ - 34949881-31e5-45e3-8ba0-9786a85b0464
3036
+ X-Runtime:
3037
+ - '0.012643'
3038
+ Server:
3039
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
3040
+ Date:
3041
+ - Sun, 25 Jan 2015 14:07:15 GMT
3042
+ Content-Length:
3043
+ - '644'
3044
+ Connection:
3045
+ - Keep-Alive
3046
+ body:
3047
+ encoding: UTF-8
3048
+ string: |-
3049
+ {
3050
+ "id": 59,
3051
+ "text": "Where are you?",
3052
+ "question_type": "multiple",
3053
+ "responses": [
3054
+ "At Home",
3055
+ "At Work",
3056
+ "In a car",
3057
+ "Other"
3058
+ ],
3059
+ "answer": null,
3060
+ "_links": [
3061
+ {
3062
+ "rel": "self",
3063
+ "href": "http://localhost:3000/api/surveys/104/survey_questions/59",
3064
+ "method": "GET"
3065
+ },
3066
+ {
3067
+ "rel": "self",
3068
+ "href": "http://localhost:3000/api/surveys/104/survey_questions/59",
3069
+ "method": "PUT"
3070
+ },
3071
+ {
3072
+ "rel": "survey",
3073
+ "href": "http://localhost:3000/api/surveys/104",
3074
+ "method": "GET"
3075
+ }
3076
+ ],
3077
+ "created_at": "2015-01-25T14:07:15.572Z",
3078
+ "key": null,
3079
+ "question_id": 99
3080
+ }
3081
+ http_version:
3082
+ recorded_at: Sun, 25 Jan 2015 14:07:15 GMT
3083
+ recorded_with: VCR 2.9.3