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,637 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.parse.com/1/classes/BatchTestObject
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"foo":"1"}'
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:13 GMT
41
+ Location:
42
+ - https://api.parse.com/1/classes/BatchTestObject/ZD8AqXIoV3
43
+ Server:
44
+ - nginx/1.2.2
45
+ Set-Cookie:
46
+ - <COOKIE-KEY>
47
+ Status:
48
+ - 201 Created
49
+ X-Runtime:
50
+ - '0.061459'
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:13.583Z","objectId":"ZD8AqXIoV3"}'
60
+ http_version:
61
+ recorded_at: Mon, 22 Apr 2013 16:03:13 GMT
62
+ - request:
63
+ method: post
64
+ uri: https://api.parse.com/1/classes/BatchTestObject
65
+ body:
66
+ encoding: UTF-8
67
+ string: '{"foo":"2"}'
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:13 GMT
100
+ Location:
101
+ - https://api.parse.com/1/classes/BatchTestObject/UiphsqDkxe
102
+ Server:
103
+ - nginx/1.2.2
104
+ Set-Cookie:
105
+ - <COOKIE-KEY>
106
+ Status:
107
+ - 201 Created
108
+ X-Runtime:
109
+ - '0.029661'
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:13.664Z","objectId":"UiphsqDkxe"}'
119
+ http_version:
120
+ recorded_at: Mon, 22 Apr 2013 16:03:13 GMT
121
+ - request:
122
+ method: post
123
+ uri: https://api.parse.com/1/classes/BatchTestObject
124
+ body:
125
+ encoding: UTF-8
126
+ string: '{"foo":"3"}'
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: 201
147
+ message: Created
148
+ headers:
149
+ Access-Control-Allow-Origin:
150
+ - '*'
151
+ Access-Control-Request-Method:
152
+ - '*'
153
+ Cache-Control:
154
+ - no-cache
155
+ Content-Type:
156
+ - application/json; charset=utf-8
157
+ Date:
158
+ - Mon, 22 Apr 2013 16:03:13 GMT
159
+ Location:
160
+ - https://api.parse.com/1/classes/BatchTestObject/1s3ISlPT0N
161
+ Server:
162
+ - nginx/1.2.2
163
+ Set-Cookie:
164
+ - <COOKIE-KEY>
165
+ Status:
166
+ - 201 Created
167
+ X-Runtime:
168
+ - '0.045724'
169
+ X-Ua-Compatible:
170
+ - IE=Edge,chrome=1
171
+ Content-Length:
172
+ - '64'
173
+ Connection:
174
+ - keep-alive
175
+ body:
176
+ encoding: ASCII-8BIT
177
+ string: '{"createdAt":"2013-04-22T16:03:13.722Z","objectId":"1s3ISlPT0N"}'
178
+ http_version:
179
+ recorded_at: Mon, 22 Apr 2013 16:03:13 GMT
180
+ - request:
181
+ method: post
182
+ uri: https://api.parse.com/1/classes/BatchTestObject
183
+ body:
184
+ encoding: UTF-8
185
+ string: '{"foo":"4"}'
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: 201
206
+ message: Created
207
+ headers:
208
+ Access-Control-Allow-Origin:
209
+ - '*'
210
+ Access-Control-Request-Method:
211
+ - '*'
212
+ Cache-Control:
213
+ - no-cache
214
+ Content-Type:
215
+ - application/json; charset=utf-8
216
+ Date:
217
+ - Mon, 22 Apr 2013 16:03:13 GMT
218
+ Location:
219
+ - https://api.parse.com/1/classes/BatchTestObject/QpZn6ARkSA
220
+ Server:
221
+ - nginx/1.2.2
222
+ Set-Cookie:
223
+ - <COOKIE-KEY>
224
+ Status:
225
+ - 201 Created
226
+ X-Runtime:
227
+ - '0.028172'
228
+ X-Ua-Compatible:
229
+ - IE=Edge,chrome=1
230
+ Content-Length:
231
+ - '64'
232
+ Connection:
233
+ - keep-alive
234
+ body:
235
+ encoding: ASCII-8BIT
236
+ string: '{"createdAt":"2013-04-22T16:03:13.770Z","objectId":"QpZn6ARkSA"}'
237
+ http_version:
238
+ recorded_at: Mon, 22 Apr 2013 16:03:13 GMT
239
+ - request:
240
+ method: post
241
+ uri: https://api.parse.com/1/classes/BatchTestObject
242
+ body:
243
+ encoding: UTF-8
244
+ string: '{"foo":"5"}'
245
+ headers:
246
+ Content-Type:
247
+ - application/json
248
+ Accept:
249
+ - application/json
250
+ User-Agent:
251
+ - Parse for Ruby, 0.0
252
+ X-Parse-Master-Key:
253
+ - ''
254
+ X-Parse-Rest-Api-Key:
255
+ - <X-Parse-REST-API-Key>
256
+ X-Parse-Application-Id:
257
+ - <X-Parse-Application-Id>
258
+ X-Parse-Session-Token:
259
+ - ''
260
+ Expect:
261
+ - ''
262
+ response:
263
+ status:
264
+ code: 201
265
+ message: Created
266
+ headers:
267
+ Access-Control-Allow-Origin:
268
+ - '*'
269
+ Access-Control-Request-Method:
270
+ - '*'
271
+ Cache-Control:
272
+ - no-cache
273
+ Content-Type:
274
+ - application/json; charset=utf-8
275
+ Date:
276
+ - Mon, 22 Apr 2013 16:03:13 GMT
277
+ Location:
278
+ - https://api.parse.com/1/classes/BatchTestObject/AXfva0JhBg
279
+ Server:
280
+ - nginx/1.2.2
281
+ Set-Cookie:
282
+ - <COOKIE-KEY>
283
+ Status:
284
+ - 201 Created
285
+ X-Runtime:
286
+ - '0.037544'
287
+ X-Ua-Compatible:
288
+ - IE=Edge,chrome=1
289
+ Content-Length:
290
+ - '64'
291
+ Connection:
292
+ - keep-alive
293
+ body:
294
+ encoding: ASCII-8BIT
295
+ string: '{"createdAt":"2013-04-22T16:03:13.828Z","objectId":"AXfva0JhBg"}'
296
+ http_version:
297
+ recorded_at: Mon, 22 Apr 2013 16:03:13 GMT
298
+ - request:
299
+ method: post
300
+ uri: https://api.parse.com/1/batch
301
+ body:
302
+ encoding: UTF-8
303
+ string: '{"requests":[{"method":"PUT","path":"/1/classes/BatchTestObject/ZD8AqXIoV3","body":{"foo":"updated"}},{"method":"PUT","path":"/1/classes/BatchTestObject/UiphsqDkxe","body":{"foo":"updated"}},{"method":"PUT","path":"/1/classes/BatchTestObject/1s3ISlPT0N","body":{"foo":"updated"}},{"method":"PUT","path":"/1/classes/BatchTestObject/QpZn6ARkSA","body":{"foo":"updated"}},{"method":"PUT","path":"/1/classes/BatchTestObject/AXfva0JhBg","body":{"foo":"updated"}}]}'
304
+ headers:
305
+ Content-Type:
306
+ - application/json
307
+ Accept:
308
+ - application/json
309
+ User-Agent:
310
+ - Parse for Ruby, 0.0
311
+ X-Parse-Master-Key:
312
+ - ''
313
+ X-Parse-Rest-Api-Key:
314
+ - <X-Parse-REST-API-Key>
315
+ X-Parse-Application-Id:
316
+ - <X-Parse-Application-Id>
317
+ X-Parse-Session-Token:
318
+ - ''
319
+ Expect:
320
+ - ''
321
+ response:
322
+ status:
323
+ code: 200
324
+ message: OK
325
+ headers:
326
+ Access-Control-Allow-Origin:
327
+ - '*'
328
+ Access-Control-Request-Method:
329
+ - '*'
330
+ Cache-Control:
331
+ - max-age=0, private, must-revalidate
332
+ Content-Type:
333
+ - application/json; charset=utf-8
334
+ Date:
335
+ - Mon, 22 Apr 2013 16:03:13 GMT
336
+ Etag:
337
+ - '"8f986add7fb4d8fe7235b9c12d15c3e4"'
338
+ Server:
339
+ - nginx/1.2.2
340
+ Set-Cookie:
341
+ - <COOKIE-KEY>
342
+ Status:
343
+ - 200 OK
344
+ X-Runtime:
345
+ - '0.131594'
346
+ X-Ua-Compatible:
347
+ - IE=Edge,chrome=1
348
+ Content-Length:
349
+ - '266'
350
+ Connection:
351
+ - keep-alive
352
+ body:
353
+ encoding: ASCII-8BIT
354
+ string: '[{"success":{"updatedAt":"2013-04-22T16:03:13.884Z"}},{"success":{"updatedAt":"2013-04-22T16:03:13.895Z"}},{"success":{"updatedAt":"2013-04-22T16:03:13.907Z"}},{"success":{"updatedAt":"2013-04-22T16:03:13.947Z"}},{"success":{"updatedAt":"2013-04-22T16:03:13.975Z"}}]'
355
+ http_version:
356
+ recorded_at: Mon, 22 Apr 2013 16:03:13 GMT
357
+ - request:
358
+ method: post
359
+ uri: https://api.leancloud.cn/1.1/classes/BatchTestObject
360
+ body:
361
+ encoding: UTF-8
362
+ string: '{"foo":"1"}'
363
+ headers:
364
+ User-Agent:
365
+ - Parse for Ruby, 0.0
366
+ Content-Type:
367
+ - application/json
368
+ X-Avoscloud-Application-Id:
369
+ - <X-AVOSCloud-Application-Id>
370
+ X-Avoscloud-Application-Key:
371
+ - <X-AVOSCloud-Application-Key>
372
+ Accept-Encoding:
373
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
374
+ Accept:
375
+ - '*/*'
376
+ response:
377
+ status:
378
+ code: 201
379
+ message: Created
380
+ headers:
381
+ Server:
382
+ - Tengine
383
+ Date:
384
+ - Fri, 10 Apr 2015 09:10:30 GMT
385
+ Content-Type:
386
+ - application/json;charset=utf-8
387
+ Content-Length:
388
+ - '78'
389
+ Connection:
390
+ - keep-alive
391
+ Location:
392
+ - /1.1/classes/BatchTestObject/55279386e4b0da2c5defa0f5
393
+ Cache-Control:
394
+ - no-cache,no-store
395
+ Pragma:
396
+ - no-cache
397
+ Strict-Transport-Security:
398
+ - max-age=31536000
399
+ body:
400
+ encoding: UTF-8
401
+ string: '{"createdAt":"2015-04-10T09:10:30.672Z","objectId":"55279386e4b0da2c5defa0f5"}'
402
+ http_version:
403
+ recorded_at: Fri, 10 Apr 2015 09:10:30 GMT
404
+ - request:
405
+ method: post
406
+ uri: https://api.leancloud.cn/1.1/classes/BatchTestObject
407
+ body:
408
+ encoding: UTF-8
409
+ string: '{"foo":"2"}'
410
+ headers:
411
+ User-Agent:
412
+ - Parse for Ruby, 0.0
413
+ Content-Type:
414
+ - application/json
415
+ X-Avoscloud-Application-Id:
416
+ - <X-AVOSCloud-Application-Id>
417
+ X-Avoscloud-Application-Key:
418
+ - <X-AVOSCloud-Application-Key>
419
+ Accept-Encoding:
420
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
421
+ Accept:
422
+ - '*/*'
423
+ response:
424
+ status:
425
+ code: 201
426
+ message: Created
427
+ headers:
428
+ Server:
429
+ - Tengine
430
+ Date:
431
+ - Fri, 10 Apr 2015 09:10:30 GMT
432
+ Content-Type:
433
+ - application/json;charset=utf-8
434
+ Content-Length:
435
+ - '78'
436
+ Connection:
437
+ - keep-alive
438
+ Location:
439
+ - /1.1/classes/BatchTestObject/55279386e4b0da2c5defa0fa
440
+ Cache-Control:
441
+ - no-cache,no-store
442
+ Pragma:
443
+ - no-cache
444
+ Strict-Transport-Security:
445
+ - max-age=31536000
446
+ body:
447
+ encoding: UTF-8
448
+ string: '{"createdAt":"2015-04-10T09:10:30.956Z","objectId":"55279386e4b0da2c5defa0fa"}'
449
+ http_version:
450
+ recorded_at: Fri, 10 Apr 2015 09:10:30 GMT
451
+ - request:
452
+ method: post
453
+ uri: https://api.leancloud.cn/1.1/classes/BatchTestObject
454
+ body:
455
+ encoding: UTF-8
456
+ string: '{"foo":"3"}'
457
+ headers:
458
+ User-Agent:
459
+ - Parse for Ruby, 0.0
460
+ Content-Type:
461
+ - application/json
462
+ X-Avoscloud-Application-Id:
463
+ - <X-AVOSCloud-Application-Id>
464
+ X-Avoscloud-Application-Key:
465
+ - <X-AVOSCloud-Application-Key>
466
+ Accept-Encoding:
467
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
468
+ Accept:
469
+ - '*/*'
470
+ response:
471
+ status:
472
+ code: 201
473
+ message: Created
474
+ headers:
475
+ Server:
476
+ - Tengine
477
+ Date:
478
+ - Fri, 10 Apr 2015 09:10:31 GMT
479
+ Content-Type:
480
+ - application/json;charset=utf-8
481
+ Content-Length:
482
+ - '78'
483
+ Connection:
484
+ - keep-alive
485
+ Location:
486
+ - /1.1/classes/BatchTestObject/55279387e4b0da2c5defa0fc
487
+ Cache-Control:
488
+ - no-cache,no-store
489
+ Pragma:
490
+ - no-cache
491
+ Strict-Transport-Security:
492
+ - max-age=31536000
493
+ body:
494
+ encoding: UTF-8
495
+ string: '{"createdAt":"2015-04-10T09:10:31.280Z","objectId":"55279387e4b0da2c5defa0fc"}'
496
+ http_version:
497
+ recorded_at: Fri, 10 Apr 2015 09:10:31 GMT
498
+ - request:
499
+ method: post
500
+ uri: https://api.leancloud.cn/1.1/classes/BatchTestObject
501
+ body:
502
+ encoding: UTF-8
503
+ string: '{"foo":"4"}'
504
+ headers:
505
+ User-Agent:
506
+ - Parse for Ruby, 0.0
507
+ Content-Type:
508
+ - application/json
509
+ X-Avoscloud-Application-Id:
510
+ - <X-AVOSCloud-Application-Id>
511
+ X-Avoscloud-Application-Key:
512
+ - <X-AVOSCloud-Application-Key>
513
+ Accept-Encoding:
514
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
515
+ Accept:
516
+ - '*/*'
517
+ response:
518
+ status:
519
+ code: 201
520
+ message: Created
521
+ headers:
522
+ Server:
523
+ - Tengine
524
+ Date:
525
+ - Fri, 10 Apr 2015 09:10:31 GMT
526
+ Content-Type:
527
+ - application/json;charset=utf-8
528
+ Content-Length:
529
+ - '78'
530
+ Connection:
531
+ - keep-alive
532
+ Location:
533
+ - /1.1/classes/BatchTestObject/55279387e4b0da2c5defa100
534
+ Cache-Control:
535
+ - no-cache,no-store
536
+ Pragma:
537
+ - no-cache
538
+ Strict-Transport-Security:
539
+ - max-age=31536000
540
+ body:
541
+ encoding: UTF-8
542
+ string: '{"createdAt":"2015-04-10T09:10:31.591Z","objectId":"55279387e4b0da2c5defa100"}'
543
+ http_version:
544
+ recorded_at: Fri, 10 Apr 2015 09:10:31 GMT
545
+ - request:
546
+ method: post
547
+ uri: https://api.leancloud.cn/1.1/classes/BatchTestObject
548
+ body:
549
+ encoding: UTF-8
550
+ string: '{"foo":"5"}'
551
+ headers:
552
+ User-Agent:
553
+ - Parse for Ruby, 0.0
554
+ Content-Type:
555
+ - application/json
556
+ X-Avoscloud-Application-Id:
557
+ - <X-AVOSCloud-Application-Id>
558
+ X-Avoscloud-Application-Key:
559
+ - <X-AVOSCloud-Application-Key>
560
+ Accept-Encoding:
561
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
562
+ Accept:
563
+ - '*/*'
564
+ response:
565
+ status:
566
+ code: 201
567
+ message: Created
568
+ headers:
569
+ Server:
570
+ - Tengine
571
+ Date:
572
+ - Fri, 10 Apr 2015 09:10:31 GMT
573
+ Content-Type:
574
+ - application/json;charset=utf-8
575
+ Content-Length:
576
+ - '78'
577
+ Connection:
578
+ - keep-alive
579
+ Location:
580
+ - /1.1/classes/BatchTestObject/55279387e4b0da2c5defa103
581
+ Cache-Control:
582
+ - no-cache,no-store
583
+ Pragma:
584
+ - no-cache
585
+ Strict-Transport-Security:
586
+ - max-age=31536000
587
+ body:
588
+ encoding: UTF-8
589
+ string: '{"createdAt":"2015-04-10T09:10:31.887Z","objectId":"55279387e4b0da2c5defa103"}'
590
+ http_version:
591
+ recorded_at: Fri, 10 Apr 2015 09:10:31 GMT
592
+ - request:
593
+ method: post
594
+ uri: https://api.leancloud.cn/1.1/batch
595
+ body:
596
+ encoding: UTF-8
597
+ string: '{"requests":[{"method":"PUT","path":"/1.1/classes/BatchTestObject/55279386e4b0da2c5defa0f5","body":{"foo":"updated"}},{"method":"PUT","path":"/1.1/classes/BatchTestObject/55279386e4b0da2c5defa0fa","body":{"foo":"updated"}},{"method":"PUT","path":"/1.1/classes/BatchTestObject/55279387e4b0da2c5defa0fc","body":{"foo":"updated"}},{"method":"PUT","path":"/1.1/classes/BatchTestObject/55279387e4b0da2c5defa100","body":{"foo":"updated"}},{"method":"PUT","path":"/1.1/classes/BatchTestObject/55279387e4b0da2c5defa103","body":{"foo":"updated"}}]}'
598
+ headers:
599
+ User-Agent:
600
+ - Parse for Ruby, 0.0
601
+ Content-Type:
602
+ - application/json
603
+ X-Avoscloud-Application-Id:
604
+ - <X-AVOSCloud-Application-Id>
605
+ X-Avoscloud-Application-Key:
606
+ - <X-AVOSCloud-Application-Key>
607
+ Accept-Encoding:
608
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
609
+ Accept:
610
+ - '*/*'
611
+ response:
612
+ status:
613
+ code: 200
614
+ message: OK
615
+ headers:
616
+ Server:
617
+ - Tengine
618
+ Date:
619
+ - Fri, 10 Apr 2015 09:10:32 GMT
620
+ Content-Type:
621
+ - application/json;charset=utf-8
622
+ Content-Length:
623
+ - '456'
624
+ Connection:
625
+ - keep-alive
626
+ Cache-Control:
627
+ - no-cache,no-store
628
+ Pragma:
629
+ - no-cache
630
+ Strict-Transport-Security:
631
+ - max-age=31536000
632
+ body:
633
+ encoding: UTF-8
634
+ string: '[{"success":{"updatedAt":"2015-04-10T09:10:32.234Z","objectId":"55279386e4b0da2c5defa0f5"}},{"success":{"updatedAt":"2015-04-10T09:10:32.247Z","objectId":"55279386e4b0da2c5defa0fa"}},{"success":{"updatedAt":"2015-04-10T09:10:32.255Z","objectId":"55279387e4b0da2c5defa0fc"}},{"success":{"updatedAt":"2015-04-10T09:10:32.264Z","objectId":"55279387e4b0da2c5defa100"}},{"success":{"updatedAt":"2015-04-10T09:10:32.275Z","objectId":"55279387e4b0da2c5defa103"}}]'
635
+ http_version:
636
+ recorded_at: Fri, 10 Apr 2015 09:10:32 GMT
637
+ recorded_with: VCR 2.4.0