leancloud-ruby-client 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +9 -0
  3. data/Gemfile +16 -0
  4. data/Gemfile.lock +86 -0
  5. data/LICENSE.txt +20 -0
  6. data/README.md +1177 -0
  7. data/Rakefile +45 -0
  8. data/VERSION +1 -0
  9. data/example.rb +35 -0
  10. data/features.md +1111 -0
  11. data/fixtures/vcr_cassettes/test_acls_arent_objects.yml +274 -0
  12. data/fixtures/vcr_cassettes/test_array_add.yml +213 -0
  13. data/fixtures/vcr_cassettes/test_array_add_pointerizing.yml +380 -0
  14. data/fixtures/vcr_cassettes/test_array_add_unique.yml +319 -0
  15. data/fixtures/vcr_cassettes/test_batch_create_object.yml +107 -0
  16. data/fixtures/vcr_cassettes/test_batch_delete_object.yml +637 -0
  17. data/fixtures/vcr_cassettes/test_batch_run.yml +109 -0
  18. data/fixtures/vcr_cassettes/test_batch_update_nils_delete_keys.yml +435 -0
  19. data/fixtures/vcr_cassettes/test_batch_update_object.yml +637 -0
  20. data/fixtures/vcr_cassettes/test_contains_all.yml +1143 -0
  21. data/fixtures/vcr_cassettes/test_cql.yml +99 -0
  22. data/fixtures/vcr_cassettes/test_created_at.yml +109 -0
  23. data/fixtures/vcr_cassettes/test_decrement.yml +213 -0
  24. data/fixtures/vcr_cassettes/test_deep_parse.yml +321 -0
  25. data/fixtures/vcr_cassettes/test_destroy.yml +213 -0
  26. data/fixtures/vcr_cassettes/test_empty_response.yml +1026 -0
  27. data/fixtures/vcr_cassettes/test_eq_pointerize.yml +427 -0
  28. data/fixtures/vcr_cassettes/test_equality.yml +321 -0
  29. data/fixtures/vcr_cassettes/test_get.yml +215 -0
  30. data/fixtures/vcr_cassettes/test_get_installation.yml +58 -0
  31. data/fixtures/vcr_cassettes/test_get_missing.yml +160 -0
  32. data/fixtures/vcr_cassettes/test_image_file_associate_with_object.yml +2089 -0
  33. data/fixtures/vcr_cassettes/test_image_file_save.yml +1928 -0
  34. data/fixtures/vcr_cassettes/test_include.yml +321 -0
  35. data/fixtures/vcr_cassettes/test_new_model.yml +109 -0
  36. data/fixtures/vcr_cassettes/test_new_object.yml +109 -0
  37. data/fixtures/vcr_cassettes/test_nils_delete_keys.yml +319 -0
  38. data/fixtures/vcr_cassettes/test_object_id.yml +56 -0
  39. data/fixtures/vcr_cassettes/test_parse_delete.yml +421 -0
  40. data/fixtures/vcr_cassettes/test_pointer.yml +109 -0
  41. data/fixtures/vcr_cassettes/test_request_sms.yml +48 -0
  42. data/fixtures/vcr_cassettes/test_reset_password.yml +109 -0
  43. data/fixtures/vcr_cassettes/test_retries.yml +4173 -0
  44. data/fixtures/vcr_cassettes/test_retries_404.yml +1026 -0
  45. data/fixtures/vcr_cassettes/test_retries_404_correct.yml +1026 -0
  46. data/fixtures/vcr_cassettes/test_retries_json_error.yml +2265 -0
  47. data/fixtures/vcr_cassettes/test_retries_server_error.yml +2265 -0
  48. data/fixtures/vcr_cassettes/test_save_installation.yml +58 -0
  49. data/fixtures/vcr_cassettes/test_save_with_sub_objects.yml +484 -0
  50. data/fixtures/vcr_cassettes/test_saving_boolean_values.yml +215 -0
  51. data/fixtures/vcr_cassettes/test_saving_nested_objects.yml +62 -0
  52. data/fixtures/vcr_cassettes/test_server_update.yml +586 -0
  53. data/fixtures/vcr_cassettes/test_simple_save.yml +109 -0
  54. data/fixtures/vcr_cassettes/test_text_file_save.yml +109 -0
  55. data/fixtures/vcr_cassettes/test_update.yml +213 -0
  56. data/fixtures/vcr_cassettes/test_updated_at.yml +213 -0
  57. data/fixtures/vcr_cassettes/test_user_login.yml +276 -0
  58. data/fixtures/vcr_cassettes/test_user_save.yml +109 -0
  59. data/fixtures/vcr_cassettes/test_xget.yml +603 -0
  60. data/leancloud-ruby-client.gemspec +166 -0
  61. data/lib/faraday/better_retry.rb +94 -0
  62. data/lib/faraday/extended_parse_json.rb +39 -0
  63. data/lib/faraday/get_method_override.rb +32 -0
  64. data/lib/leancloud-ruby-client.rb +34 -0
  65. data/lib/leancloud/application.rb +7 -0
  66. data/lib/leancloud/batch.rb +53 -0
  67. data/lib/leancloud/client.rb +149 -0
  68. data/lib/leancloud/cloud.rb +28 -0
  69. data/lib/leancloud/datatypes.rb +355 -0
  70. data/lib/leancloud/error.rb +42 -0
  71. data/lib/leancloud/installation.rb +57 -0
  72. data/lib/leancloud/model.rb +14 -0
  73. data/lib/leancloud/object.rb +252 -0
  74. data/lib/leancloud/protocol.rb +193 -0
  75. data/lib/leancloud/push.rb +48 -0
  76. data/lib/leancloud/query.rb +194 -0
  77. data/lib/leancloud/user.rb +38 -0
  78. data/lib/leancloud/util.rb +93 -0
  79. data/test/cloud_functions/MyCloudCode/cloud/main.js +4 -0
  80. data/test/config/global.json +14 -0
  81. data/test/helper.rb +108 -0
  82. data/test/middleware/better_retry_test.rb +57 -0
  83. data/test/middleware/extend_parse_json_test.rb +55 -0
  84. data/test/parsers.jpg +0 -0
  85. data/test/test_batch.rb +132 -0
  86. data/test/test_client.rb +183 -0
  87. data/test/test_cloud.rb +31 -0
  88. data/test/test_datatypes.rb +105 -0
  89. data/test/test_file.rb +67 -0
  90. data/test/test_init.rb +23 -0
  91. data/test/test_init_from_cloud_code.rb +8 -0
  92. data/test/test_installation.rb +49 -0
  93. data/test/test_model.rb +22 -0
  94. data/test/test_object.rb +295 -0
  95. data/test/test_push.rb +45 -0
  96. data/test/test_query.rb +198 -0
  97. data/test/test_throttle.rb +5 -0
  98. data/test/test_user.rb +60 -0
  99. metadata +298 -0
@@ -0,0 +1,427 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.parse.com/1/classes/Foo
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Parse for Ruby, 0.0
16
+ X-Parse-Master-Key:
17
+ - ''
18
+ X-Parse-Rest-Api-Key:
19
+ - <X-Parse-REST-API-Key>
20
+ X-Parse-Application-Id:
21
+ - <X-Parse-Application-Id>
22
+ X-Parse-Session-Token:
23
+ - ''
24
+ Expect:
25
+ - ''
26
+ response:
27
+ status:
28
+ code: 201
29
+ message: Created
30
+ headers:
31
+ Access-Control-Allow-Origin:
32
+ - '*'
33
+ Access-Control-Request-Method:
34
+ - '*'
35
+ Cache-Control:
36
+ - no-cache
37
+ Content-Type:
38
+ - application/json; charset=utf-8
39
+ Date:
40
+ - Mon, 22 Apr 2013 16:03:23 GMT
41
+ Location:
42
+ - https://api.parse.com/1/classes/Foo/HSnqug5bVz
43
+ Server:
44
+ - nginx/1.2.2
45
+ Set-Cookie:
46
+ - <COOKIE-KEY>
47
+ Status:
48
+ - 201 Created
49
+ X-Runtime:
50
+ - '0.172033'
51
+ X-Ua-Compatible:
52
+ - IE=Edge,chrome=1
53
+ Content-Length:
54
+ - '64'
55
+ Connection:
56
+ - keep-alive
57
+ body:
58
+ encoding: ASCII-8BIT
59
+ string: '{"createdAt":"2013-04-22T16:03:23.615Z","objectId":"HSnqug5bVz"}'
60
+ http_version:
61
+ recorded_at: Mon, 22 Apr 2013 16:03:23 GMT
62
+ - request:
63
+ method: post
64
+ uri: https://api.parse.com/1/classes/Bar
65
+ body:
66
+ encoding: UTF-8
67
+ string: '{"foo":{"__type":"Pointer","className":"Foo","objectId":"HSnqug5bVz"},"bar":"bar"}'
68
+ headers:
69
+ Content-Type:
70
+ - application/json
71
+ Accept:
72
+ - application/json
73
+ User-Agent:
74
+ - Parse for Ruby, 0.0
75
+ X-Parse-Master-Key:
76
+ - ''
77
+ X-Parse-Rest-Api-Key:
78
+ - <X-Parse-REST-API-Key>
79
+ X-Parse-Application-Id:
80
+ - <X-Parse-Application-Id>
81
+ X-Parse-Session-Token:
82
+ - ''
83
+ Expect:
84
+ - ''
85
+ response:
86
+ status:
87
+ code: 201
88
+ message: Created
89
+ headers:
90
+ Access-Control-Allow-Origin:
91
+ - '*'
92
+ Access-Control-Request-Method:
93
+ - '*'
94
+ Cache-Control:
95
+ - no-cache
96
+ Content-Type:
97
+ - application/json; charset=utf-8
98
+ Date:
99
+ - Mon, 22 Apr 2013 16:03:23 GMT
100
+ Location:
101
+ - https://api.parse.com/1/classes/Bar/Nuf7IHH45A
102
+ Server:
103
+ - nginx/1.2.2
104
+ Set-Cookie:
105
+ - <COOKIE-KEY>
106
+ Status:
107
+ - 201 Created
108
+ X-Runtime:
109
+ - '0.030460'
110
+ X-Ua-Compatible:
111
+ - IE=Edge,chrome=1
112
+ Content-Length:
113
+ - '64'
114
+ Connection:
115
+ - keep-alive
116
+ body:
117
+ encoding: ASCII-8BIT
118
+ string: '{"createdAt":"2013-04-22T16:03:23.818Z","objectId":"Nuf7IHH45A"}'
119
+ http_version:
120
+ recorded_at: Mon, 22 Apr 2013 16:03:23 GMT
121
+ - request:
122
+ method: get
123
+ uri: https://api.parse.com/1/classes/Bar?where=%7B%22foo%22:%7B%22__type%22:%22Pointer%22,%22className%22:%22Foo%22,%22objectId%22:%22HSnqug5bVz%22%7D%7D
124
+ body:
125
+ encoding: US-ASCII
126
+ string: ''
127
+ headers:
128
+ Content-Type:
129
+ - application/json
130
+ Accept:
131
+ - application/json
132
+ User-Agent:
133
+ - Parse for Ruby, 0.0
134
+ X-Parse-Master-Key:
135
+ - ''
136
+ X-Parse-Rest-Api-Key:
137
+ - <X-Parse-REST-API-Key>
138
+ X-Parse-Application-Id:
139
+ - <X-Parse-Application-Id>
140
+ X-Parse-Session-Token:
141
+ - ''
142
+ Expect:
143
+ - ''
144
+ response:
145
+ status:
146
+ code: 200
147
+ message: OK
148
+ headers:
149
+ Access-Control-Allow-Origin:
150
+ - '*'
151
+ Access-Control-Request-Method:
152
+ - '*'
153
+ Cache-Control:
154
+ - max-age=0, private, must-revalidate
155
+ Content-Type:
156
+ - application/json; charset=utf-8
157
+ Date:
158
+ - Mon, 22 Apr 2013 16:03:23 GMT
159
+ Etag:
160
+ - '"b63983d87af9baa682b282eafc0114d0"'
161
+ Server:
162
+ - nginx/1.2.2
163
+ Set-Cookie:
164
+ - <COOKIE-KEY>
165
+ Status:
166
+ - 200 OK
167
+ X-Runtime:
168
+ - '0.030518'
169
+ X-Ua-Compatible:
170
+ - IE=Edge,chrome=1
171
+ Content-Length:
172
+ - '198'
173
+ Connection:
174
+ - keep-alive
175
+ body:
176
+ encoding: ASCII-8BIT
177
+ string: '{"results":[{"foo":{"__type":"Pointer","className":"Foo","objectId":"HSnqug5bVz"},"bar":"bar","createdAt":"2013-04-22T16:03:23.818Z","updatedAt":"2013-04-22T16:03:23.818Z","objectId":"Nuf7IHH45A"}]}'
178
+ http_version:
179
+ recorded_at: Mon, 22 Apr 2013 16:03:23 GMT
180
+ - request:
181
+ method: get
182
+ uri: https://api.parse.com/1/classes/Bar?where=%7B%22foo%22:%7B%22__type%22:%22Pointer%22,%22className%22:%22Foo%22,%22objectId%22:%22HSnqug5bVz%22%7D%7D
183
+ body:
184
+ encoding: US-ASCII
185
+ string: ''
186
+ headers:
187
+ Content-Type:
188
+ - application/json
189
+ Accept:
190
+ - application/json
191
+ User-Agent:
192
+ - Parse for Ruby, 0.0
193
+ X-Parse-Master-Key:
194
+ - ''
195
+ X-Parse-Rest-Api-Key:
196
+ - <X-Parse-REST-API-Key>
197
+ X-Parse-Application-Id:
198
+ - <X-Parse-Application-Id>
199
+ X-Parse-Session-Token:
200
+ - ''
201
+ Expect:
202
+ - ''
203
+ response:
204
+ status:
205
+ code: 200
206
+ message: OK
207
+ headers:
208
+ Access-Control-Allow-Origin:
209
+ - '*'
210
+ Access-Control-Request-Method:
211
+ - '*'
212
+ Cache-Control:
213
+ - max-age=0, private, must-revalidate
214
+ Content-Type:
215
+ - application/json; charset=utf-8
216
+ Date:
217
+ - Mon, 22 Apr 2013 16:03:24 GMT
218
+ Etag:
219
+ - '"b63983d87af9baa682b282eafc0114d0"'
220
+ Server:
221
+ - nginx/1.2.2
222
+ Set-Cookie:
223
+ - <COOKIE-KEY>
224
+ Status:
225
+ - 200 OK
226
+ X-Runtime:
227
+ - '0.074120'
228
+ X-Ua-Compatible:
229
+ - IE=Edge,chrome=1
230
+ Content-Length:
231
+ - '198'
232
+ Connection:
233
+ - keep-alive
234
+ body:
235
+ encoding: ASCII-8BIT
236
+ string: '{"results":[{"foo":{"__type":"Pointer","className":"Foo","objectId":"HSnqug5bVz"},"bar":"bar","createdAt":"2013-04-22T16:03:23.818Z","updatedAt":"2013-04-22T16:03:23.818Z","objectId":"Nuf7IHH45A"}]}'
237
+ http_version:
238
+ recorded_at: Mon, 22 Apr 2013 16:03:24 GMT
239
+ - request:
240
+ method: post
241
+ uri: https://api.leancloud.cn/1.1/classes/Foo
242
+ body:
243
+ encoding: UTF-8
244
+ string: '{}'
245
+ headers:
246
+ User-Agent:
247
+ - Parse for Ruby, 0.0
248
+ Content-Type:
249
+ - application/json
250
+ X-Avoscloud-Application-Id:
251
+ - <X-AVOSCloud-Application-Id>
252
+ X-Avoscloud-Application-Key:
253
+ - <X-AVOSCloud-Application-Key>
254
+ Accept-Encoding:
255
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
256
+ Accept:
257
+ - '*/*'
258
+ response:
259
+ status:
260
+ code: 201
261
+ message: Created
262
+ headers:
263
+ Server:
264
+ - Tengine
265
+ Date:
266
+ - Fri, 10 Apr 2015 09:10:58 GMT
267
+ Content-Type:
268
+ - application/json;charset=utf-8
269
+ Content-Length:
270
+ - '78'
271
+ Connection:
272
+ - keep-alive
273
+ Location:
274
+ - /1.1/classes/Foo/552793a2e4b0da2c5defa251
275
+ Cache-Control:
276
+ - no-cache,no-store
277
+ Pragma:
278
+ - no-cache
279
+ Strict-Transport-Security:
280
+ - max-age=31536000
281
+ body:
282
+ encoding: UTF-8
283
+ string: '{"createdAt":"2015-04-10T09:10:58.980Z","objectId":"552793a2e4b0da2c5defa251"}'
284
+ http_version:
285
+ recorded_at: Fri, 10 Apr 2015 09:10:59 GMT
286
+ - request:
287
+ method: post
288
+ uri: https://api.leancloud.cn/1.1/classes/Bar
289
+ body:
290
+ encoding: UTF-8
291
+ string: '{"foo":{"__type":"Pointer","className":"Foo","objectId":"552793a2e4b0da2c5defa251"},"bar":"bar"}'
292
+ headers:
293
+ User-Agent:
294
+ - Parse for Ruby, 0.0
295
+ Content-Type:
296
+ - application/json
297
+ X-Avoscloud-Application-Id:
298
+ - <X-AVOSCloud-Application-Id>
299
+ X-Avoscloud-Application-Key:
300
+ - <X-AVOSCloud-Application-Key>
301
+ Accept-Encoding:
302
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
303
+ Accept:
304
+ - '*/*'
305
+ response:
306
+ status:
307
+ code: 201
308
+ message: Created
309
+ headers:
310
+ Server:
311
+ - Tengine
312
+ Date:
313
+ - Fri, 10 Apr 2015 09:10:59 GMT
314
+ Content-Type:
315
+ - application/json;charset=utf-8
316
+ Content-Length:
317
+ - '78'
318
+ Connection:
319
+ - keep-alive
320
+ Location:
321
+ - /1.1/classes/Bar/552793a3e4b0da2c5defa255
322
+ Cache-Control:
323
+ - no-cache,no-store
324
+ Pragma:
325
+ - no-cache
326
+ Strict-Transport-Security:
327
+ - max-age=31536000
328
+ body:
329
+ encoding: UTF-8
330
+ string: '{"createdAt":"2015-04-10T09:10:59.264Z","objectId":"552793a3e4b0da2c5defa255"}'
331
+ http_version:
332
+ recorded_at: Fri, 10 Apr 2015 09:10:59 GMT
333
+ - request:
334
+ method: get
335
+ uri: https://api.leancloud.cn/1.1/classes/Bar?where=%7B%22foo%22:%7B%22__type%22:%22Pointer%22,%22className%22:%22Foo%22,%22objectId%22:%22552793a2e4b0da2c5defa251%22%7D%7D
336
+ body:
337
+ encoding: US-ASCII
338
+ string: ''
339
+ headers:
340
+ User-Agent:
341
+ - Parse for Ruby, 0.0
342
+ Content-Type:
343
+ - application/json
344
+ X-Avoscloud-Application-Id:
345
+ - <X-AVOSCloud-Application-Id>
346
+ X-Avoscloud-Application-Key:
347
+ - <X-AVOSCloud-Application-Key>
348
+ Accept-Encoding:
349
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
350
+ Accept:
351
+ - '*/*'
352
+ response:
353
+ status:
354
+ code: 200
355
+ message: OK
356
+ headers:
357
+ Server:
358
+ - Tengine
359
+ Date:
360
+ - Fri, 10 Apr 2015 09:10:59 GMT
361
+ Content-Type:
362
+ - application/json;charset=utf-8
363
+ Content-Length:
364
+ - '226'
365
+ Connection:
366
+ - keep-alive
367
+ Last-Modified:
368
+ - Fri, 10 Apr 2015 09:10:59.269 GMT
369
+ Cache-Control:
370
+ - no-cache,no-store
371
+ Pragma:
372
+ - no-cache
373
+ Strict-Transport-Security:
374
+ - max-age=31536000
375
+ body:
376
+ encoding: UTF-8
377
+ string: '{"results":[{"bar":"bar","foo":{"__type":"Pointer","className":"Foo","objectId":"552793a2e4b0da2c5defa251"},"createdAt":"2015-04-10T09:10:59.264Z","updatedAt":"2015-04-10T09:10:59.264Z","objectId":"552793a3e4b0da2c5defa255"}]}'
378
+ http_version:
379
+ recorded_at: Fri, 10 Apr 2015 09:10:59 GMT
380
+ - request:
381
+ method: get
382
+ uri: https://api.leancloud.cn/1.1/classes/Bar?where=%7B%22foo%22:%7B%22__type%22:%22Pointer%22,%22className%22:%22Foo%22,%22objectId%22:%22552793a2e4b0da2c5defa251%22%7D%7D
383
+ body:
384
+ encoding: US-ASCII
385
+ string: ''
386
+ headers:
387
+ User-Agent:
388
+ - Parse for Ruby, 0.0
389
+ Content-Type:
390
+ - application/json
391
+ X-Avoscloud-Application-Id:
392
+ - <X-AVOSCloud-Application-Id>
393
+ X-Avoscloud-Application-Key:
394
+ - <X-AVOSCloud-Application-Key>
395
+ Accept-Encoding:
396
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
397
+ Accept:
398
+ - '*/*'
399
+ response:
400
+ status:
401
+ code: 200
402
+ message: OK
403
+ headers:
404
+ Server:
405
+ - Tengine
406
+ Date:
407
+ - Fri, 10 Apr 2015 09:10:59 GMT
408
+ Content-Type:
409
+ - application/json;charset=utf-8
410
+ Content-Length:
411
+ - '226'
412
+ Connection:
413
+ - keep-alive
414
+ Last-Modified:
415
+ - Fri, 10 Apr 2015 09:10:59.269 GMT
416
+ Cache-Control:
417
+ - no-cache,no-store
418
+ Pragma:
419
+ - no-cache
420
+ Strict-Transport-Security:
421
+ - max-age=31536000
422
+ body:
423
+ encoding: UTF-8
424
+ string: '{"results":[{"bar":"bar","foo":{"__type":"Pointer","className":"Foo","objectId":"552793a2e4b0da2c5defa251"},"createdAt":"2015-04-10T09:10:59.264Z","updatedAt":"2015-04-10T09:10:59.264Z","objectId":"552793a3e4b0da2c5defa255"}]}'
425
+ http_version:
426
+ recorded_at: Fri, 10 Apr 2015 09:10:59 GMT
427
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,321 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.parse.com/1/classes/Foo
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Parse for Ruby, 0.0
16
+ X-Parse-Master-Key:
17
+ - ''
18
+ X-Parse-Rest-Api-Key:
19
+ - <X-Parse-REST-API-Key>
20
+ X-Parse-Application-Id:
21
+ - <X-Parse-Application-Id>
22
+ X-Parse-Session-Token:
23
+ - ''
24
+ Expect:
25
+ - ''
26
+ response:
27
+ status:
28
+ code: 201
29
+ message: Created
30
+ headers:
31
+ Access-Control-Allow-Origin:
32
+ - '*'
33
+ Access-Control-Request-Method:
34
+ - '*'
35
+ Cache-Control:
36
+ - no-cache
37
+ Content-Type:
38
+ - application/json; charset=utf-8
39
+ Date:
40
+ - Mon, 22 Apr 2013 16:03:18 GMT
41
+ Location:
42
+ - https://api.parse.com/1/classes/Foo/kYSRJkUXxC
43
+ Server:
44
+ - nginx/1.2.2
45
+ Set-Cookie:
46
+ - <COOKIE-KEY>
47
+ Status:
48
+ - 201 Created
49
+ X-Runtime:
50
+ - '0.169917'
51
+ X-Ua-Compatible:
52
+ - IE=Edge,chrome=1
53
+ Content-Length:
54
+ - '64'
55
+ Connection:
56
+ - keep-alive
57
+ body:
58
+ encoding: ASCII-8BIT
59
+ string: '{"createdAt":"2013-04-22T16:03:18.215Z","objectId":"kYSRJkUXxC"}'
60
+ http_version:
61
+ recorded_at: Mon, 22 Apr 2013 16:03:18 GMT
62
+ - request:
63
+ method: post
64
+ uri: https://api.parse.com/1/classes/Foo
65
+ body:
66
+ encoding: UTF-8
67
+ string: '{}'
68
+ headers:
69
+ Content-Type:
70
+ - application/json
71
+ Accept:
72
+ - application/json
73
+ User-Agent:
74
+ - Parse for Ruby, 0.0
75
+ X-Parse-Master-Key:
76
+ - ''
77
+ X-Parse-Rest-Api-Key:
78
+ - <X-Parse-REST-API-Key>
79
+ X-Parse-Application-Id:
80
+ - <X-Parse-Application-Id>
81
+ X-Parse-Session-Token:
82
+ - ''
83
+ Expect:
84
+ - ''
85
+ response:
86
+ status:
87
+ code: 201
88
+ message: Created
89
+ headers:
90
+ Access-Control-Allow-Origin:
91
+ - '*'
92
+ Access-Control-Request-Method:
93
+ - '*'
94
+ Cache-Control:
95
+ - no-cache
96
+ Content-Type:
97
+ - application/json; charset=utf-8
98
+ Date:
99
+ - Mon, 22 Apr 2013 16:03:19 GMT
100
+ Location:
101
+ - https://api.parse.com/1/classes/Foo/aPu8CQwSib
102
+ Server:
103
+ - nginx/1.2.2
104
+ Set-Cookie:
105
+ - <COOKIE-KEY>
106
+ Status:
107
+ - 201 Created
108
+ X-Runtime:
109
+ - '0.704921'
110
+ X-Ua-Compatible:
111
+ - IE=Edge,chrome=1
112
+ Content-Length:
113
+ - '64'
114
+ Connection:
115
+ - keep-alive
116
+ body:
117
+ encoding: ASCII-8BIT
118
+ string: '{"createdAt":"2013-04-22T16:03:18.367Z","objectId":"aPu8CQwSib"}'
119
+ http_version:
120
+ recorded_at: Mon, 22 Apr 2013 16:03:19 GMT
121
+ - request:
122
+ method: get
123
+ uri: https://api.parse.com/1/classes/Foo/kYSRJkUXxC
124
+ body:
125
+ encoding: US-ASCII
126
+ string: ''
127
+ headers:
128
+ Content-Type:
129
+ - application/json
130
+ Accept:
131
+ - application/json
132
+ User-Agent:
133
+ - Parse for Ruby, 0.0
134
+ X-Parse-Master-Key:
135
+ - ''
136
+ X-Parse-Rest-Api-Key:
137
+ - <X-Parse-REST-API-Key>
138
+ X-Parse-Application-Id:
139
+ - <X-Parse-Application-Id>
140
+ X-Parse-Session-Token:
141
+ - ''
142
+ Expect:
143
+ - ''
144
+ response:
145
+ status:
146
+ code: 200
147
+ message: OK
148
+ headers:
149
+ Access-Control-Allow-Origin:
150
+ - '*'
151
+ Access-Control-Request-Method:
152
+ - '*'
153
+ Cache-Control:
154
+ - max-age=0, private, must-revalidate
155
+ Content-Type:
156
+ - application/json; charset=utf-8
157
+ Date:
158
+ - Mon, 22 Apr 2013 16:03:19 GMT
159
+ Etag:
160
+ - '"aaa365c13f25dbcbd787acc7edffbd31"'
161
+ Server:
162
+ - nginx/1.2.2
163
+ Set-Cookie:
164
+ - <COOKIE-KEY>
165
+ Status:
166
+ - 200 OK
167
+ X-Runtime:
168
+ - '0.047616'
169
+ X-Ua-Compatible:
170
+ - IE=Edge,chrome=1
171
+ Content-Length:
172
+ - '103'
173
+ Connection:
174
+ - keep-alive
175
+ body:
176
+ encoding: ASCII-8BIT
177
+ string: '{"createdAt":"2013-04-22T16:03:18.215Z","updatedAt":"2013-04-22T16:03:18.215Z","objectId":"kYSRJkUXxC"}'
178
+ http_version:
179
+ recorded_at: Mon, 22 Apr 2013 16:03:19 GMT
180
+ - request:
181
+ method: post
182
+ uri: https://api.leancloud.cn/1.1/classes/Foo
183
+ body:
184
+ encoding: UTF-8
185
+ string: '{}'
186
+ headers:
187
+ User-Agent:
188
+ - Parse for Ruby, 0.0
189
+ Content-Type:
190
+ - application/json
191
+ X-Avoscloud-Application-Id:
192
+ - <X-AVOSCloud-Application-Id>
193
+ X-Avoscloud-Application-Key:
194
+ - <X-AVOSCloud-Application-Key>
195
+ Accept-Encoding:
196
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
197
+ Accept:
198
+ - '*/*'
199
+ response:
200
+ status:
201
+ code: 201
202
+ message: Created
203
+ headers:
204
+ Server:
205
+ - Tengine
206
+ Date:
207
+ - Fri, 10 Apr 2015 09:10:50 GMT
208
+ Content-Type:
209
+ - application/json;charset=utf-8
210
+ Content-Length:
211
+ - '78'
212
+ Connection:
213
+ - keep-alive
214
+ Location:
215
+ - /1.1/classes/Foo/5527939ae4b0da2c5defa1e3
216
+ Cache-Control:
217
+ - no-cache,no-store
218
+ Pragma:
219
+ - no-cache
220
+ Strict-Transport-Security:
221
+ - max-age=31536000
222
+ body:
223
+ encoding: UTF-8
224
+ string: '{"createdAt":"2015-04-10T09:10:50.275Z","objectId":"5527939ae4b0da2c5defa1e3"}'
225
+ http_version:
226
+ recorded_at: Fri, 10 Apr 2015 09:10:50 GMT
227
+ - request:
228
+ method: post
229
+ uri: https://api.leancloud.cn/1.1/classes/Foo
230
+ body:
231
+ encoding: UTF-8
232
+ string: '{}'
233
+ headers:
234
+ User-Agent:
235
+ - Parse for Ruby, 0.0
236
+ Content-Type:
237
+ - application/json
238
+ X-Avoscloud-Application-Id:
239
+ - <X-AVOSCloud-Application-Id>
240
+ X-Avoscloud-Application-Key:
241
+ - <X-AVOSCloud-Application-Key>
242
+ Accept-Encoding:
243
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
244
+ Accept:
245
+ - '*/*'
246
+ response:
247
+ status:
248
+ code: 201
249
+ message: Created
250
+ headers:
251
+ Server:
252
+ - Tengine
253
+ Date:
254
+ - Fri, 10 Apr 2015 09:10:50 GMT
255
+ Content-Type:
256
+ - application/json;charset=utf-8
257
+ Content-Length:
258
+ - '78'
259
+ Connection:
260
+ - keep-alive
261
+ Location:
262
+ - /1.1/classes/Foo/5527939ae4b0da2c5defa1e9
263
+ Cache-Control:
264
+ - no-cache,no-store
265
+ Pragma:
266
+ - no-cache
267
+ Strict-Transport-Security:
268
+ - max-age=31536000
269
+ body:
270
+ encoding: UTF-8
271
+ string: '{"createdAt":"2015-04-10T09:10:50.554Z","objectId":"5527939ae4b0da2c5defa1e9"}'
272
+ http_version:
273
+ recorded_at: Fri, 10 Apr 2015 09:10:50 GMT
274
+ - request:
275
+ method: get
276
+ uri: https://api.leancloud.cn/1.1/classes/Foo/5527939ae4b0da2c5defa1e3
277
+ body:
278
+ encoding: US-ASCII
279
+ string: ''
280
+ headers:
281
+ User-Agent:
282
+ - Parse for Ruby, 0.0
283
+ Content-Type:
284
+ - application/json
285
+ X-Avoscloud-Application-Id:
286
+ - <X-AVOSCloud-Application-Id>
287
+ X-Avoscloud-Application-Key:
288
+ - <X-AVOSCloud-Application-Key>
289
+ Accept-Encoding:
290
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
291
+ Accept:
292
+ - '*/*'
293
+ response:
294
+ status:
295
+ code: 200
296
+ message: OK
297
+ headers:
298
+ Server:
299
+ - Tengine
300
+ Date:
301
+ - Fri, 10 Apr 2015 09:10:50 GMT
302
+ Content-Type:
303
+ - application/json;charset=utf-8
304
+ Content-Length:
305
+ - '117'
306
+ Connection:
307
+ - keep-alive
308
+ Last-Modified:
309
+ - Fri, 10 Apr 2015 09:10:50.275 GMT
310
+ Cache-Control:
311
+ - no-cache,no-store
312
+ Pragma:
313
+ - no-cache
314
+ Strict-Transport-Security:
315
+ - max-age=31536000
316
+ body:
317
+ encoding: UTF-8
318
+ string: '{"createdAt":"2015-04-10T09:10:50.275Z","updatedAt":"2015-04-10T09:10:50.275Z","objectId":"5527939ae4b0da2c5defa1e3"}'
319
+ http_version:
320
+ recorded_at: Fri, 10 Apr 2015 09:10:50 GMT
321
+ recorded_with: VCR 2.4.0