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,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://api.parse.com/1/installations/987
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"channels":["","my-channel"],"badge":5}'
9
+ headers:
10
+ User-Agent:
11
+ - Parse for Ruby, 0.0
12
+ Content-Type:
13
+ - application/json
14
+ X-Parse-Application-Id:
15
+ - "<X-Parse-Application-Id>"
16
+ X-Parse-Rest-Api-Key:
17
+ - "<X-Parse-REST-API-Key>"
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ Accept:
21
+ - "*/*"
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Access-Control-Allow-Origin:
28
+ - "*"
29
+ Access-Control-Request-Method:
30
+ - "*"
31
+ Cache-Control:
32
+ - max-age=0, private, must-revalidate
33
+ Content-Type:
34
+ - application/json; charset=utf-8
35
+ Date:
36
+ - Fri, 19 Sep 2014 15:30:53 GMT
37
+ Server:
38
+ - nginx/1.6.0
39
+ Set-Cookie:
40
+ - "<COOKIE-KEY>"
41
+ Status:
42
+ - 200 OK
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Runtime:
46
+ - '0.090476'
47
+ X-Ua-Compatible:
48
+ - IE=Edge,chrome=1
49
+ Content-Length:
50
+ - '60'
51
+ Connection:
52
+ - keep-alive
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"updatedAt":"2014-09-19T15:30:53.411Z"}'
56
+ http_version:
57
+ recorded_at: Fri, 19 Sep 2014 15:30:53 GMT
58
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,484 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.parse.com/1/classes/Bar
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"foobar":"foobar"}'
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/Bar/yDpCynCG2B
43
+ Server:
44
+ - nginx/1.2.2
45
+ Set-Cookie:
46
+ - <COOKIE-KEY>
47
+ Status:
48
+ - 201 Created
49
+ X-Runtime:
50
+ - '0.224637'
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:22.831Z","objectId":"yDpCynCG2B"}'
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/Foo
65
+ body:
66
+ encoding: UTF-8
67
+ string: '{"bar":{"__type":"Pointer","className":"Bar","objectId":"yDpCynCG2B"},"bars":[{"__type":"Pointer","className":"Bar","objectId":"yDpCynCG2B"}]}'
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/Foo/ma4CFzqV7V
102
+ Server:
103
+ - nginx/1.2.2
104
+ Set-Cookie:
105
+ - <COOKIE-KEY>
106
+ Status:
107
+ - 201 Created
108
+ X-Runtime:
109
+ - '0.028363'
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.060Z","objectId":"ma4CFzqV7V"}'
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/Foo?include=bar,bars&where=%7B%22objectId%22:%22ma4CFzqV7V%22%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
+ - '"f04d35c92565b25735569f5b522d64c5"'
161
+ Server:
162
+ - nginx/1.2.2
163
+ Set-Cookie:
164
+ - <COOKIE-KEY>
165
+ Status:
166
+ - 200 OK
167
+ X-Runtime:
168
+ - '0.036559'
169
+ X-Ua-Compatible:
170
+ - IE=Edge,chrome=1
171
+ Content-Length:
172
+ - '448'
173
+ Connection:
174
+ - keep-alive
175
+ body:
176
+ encoding: ASCII-8BIT
177
+ string: '{"results":[{"bar":{"foobar":"foobar","createdAt":"2013-04-22T16:03:22.831Z","updatedAt":"2013-04-22T16:03:22.831Z","objectId":"yDpCynCG2B","__type":"Object","className":"Bar"},"bars":[{"foobar":"foobar","createdAt":"2013-04-22T16:03:22.831Z","updatedAt":"2013-04-22T16:03:22.831Z","objectId":"yDpCynCG2B","__type":"Object","className":"Bar"}],"createdAt":"2013-04-22T16:03:23.060Z","updatedAt":"2013-04-22T16:03:23.060Z","objectId":"ma4CFzqV7V"}]}'
178
+ http_version:
179
+ recorded_at: Mon, 22 Apr 2013 16:03:23 GMT
180
+ - request:
181
+ method: put
182
+ uri: https://api.parse.com/1/classes/Foo/ma4CFzqV7V
183
+ body:
184
+ encoding: UTF-8
185
+ string: '{"bar":{"__type":"Pointer","className":"Bar","objectId":"yDpCynCG2B"},"bars":[{"__type":"Pointer","className":"Bar","objectId":"yDpCynCG2B"}]}'
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:23 GMT
218
+ Etag:
219
+ - '"121322612a01be446234b462ecdd06d4"'
220
+ Server:
221
+ - nginx/1.2.2
222
+ Set-Cookie:
223
+ - <COOKIE-KEY>
224
+ Status:
225
+ - 200 OK
226
+ X-Runtime:
227
+ - '0.056070'
228
+ X-Ua-Compatible:
229
+ - IE=Edge,chrome=1
230
+ Content-Length:
231
+ - '40'
232
+ Connection:
233
+ - keep-alive
234
+ body:
235
+ encoding: ASCII-8BIT
236
+ string: '{"updatedAt":"2013-04-22T16:03:23.200Z"}'
237
+ http_version:
238
+ recorded_at: Mon, 22 Apr 2013 16:03:23 GMT
239
+ - request:
240
+ method: put
241
+ uri: https://api.parse.com/1/classes/Bar/yDpCynCG2B
242
+ body:
243
+ encoding: UTF-8
244
+ string: '{"foobar":"foobar","baz":"baz"}'
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: 200
265
+ message: OK
266
+ headers:
267
+ Access-Control-Allow-Origin:
268
+ - '*'
269
+ Access-Control-Request-Method:
270
+ - '*'
271
+ Cache-Control:
272
+ - max-age=0, private, must-revalidate
273
+ Content-Type:
274
+ - application/json; charset=utf-8
275
+ Date:
276
+ - Mon, 22 Apr 2013 16:03:23 GMT
277
+ Etag:
278
+ - '"15f2241d747af88f901741396f8932e3"'
279
+ Server:
280
+ - nginx/1.2.2
281
+ Set-Cookie:
282
+ - <COOKIE-KEY>
283
+ Status:
284
+ - 200 OK
285
+ X-Runtime:
286
+ - '0.025564'
287
+ X-Ua-Compatible:
288
+ - IE=Edge,chrome=1
289
+ Content-Length:
290
+ - '40'
291
+ Connection:
292
+ - keep-alive
293
+ body:
294
+ encoding: ASCII-8BIT
295
+ string: '{"updatedAt":"2013-04-22T16:03:23.255Z"}'
296
+ http_version:
297
+ recorded_at: Mon, 22 Apr 2013 16:03:23 GMT
298
+ - request:
299
+ method: post
300
+ uri: https://api.leancloud.cn/1.1/classes/Bar
301
+ body:
302
+ encoding: UTF-8
303
+ string: '{"foobar":"foobar"}'
304
+ headers:
305
+ User-Agent:
306
+ - Parse for Ruby, 0.0
307
+ Content-Type:
308
+ - application/json
309
+ X-Avoscloud-Application-Id:
310
+ - <X-AVOSCloud-Application-Id>
311
+ X-Avoscloud-Application-Key:
312
+ - <X-AVOSCloud-Application-Key>
313
+ Accept-Encoding:
314
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
315
+ Accept:
316
+ - '*/*'
317
+ response:
318
+ status:
319
+ code: 201
320
+ message: Created
321
+ headers:
322
+ Server:
323
+ - Tengine
324
+ Date:
325
+ - Fri, 10 Apr 2015 09:10:53 GMT
326
+ Content-Type:
327
+ - application/json;charset=utf-8
328
+ Content-Length:
329
+ - '78'
330
+ Connection:
331
+ - keep-alive
332
+ Location:
333
+ - /1.1/classes/Bar/5527939de4b0da2c5defa209
334
+ Cache-Control:
335
+ - no-cache,no-store
336
+ Pragma:
337
+ - no-cache
338
+ Strict-Transport-Security:
339
+ - max-age=31536000
340
+ body:
341
+ encoding: UTF-8
342
+ string: '{"createdAt":"2015-04-10T09:10:53.779Z","objectId":"5527939de4b0da2c5defa209"}'
343
+ http_version:
344
+ recorded_at: Fri, 10 Apr 2015 09:10:53 GMT
345
+ - request:
346
+ method: post
347
+ uri: https://api.leancloud.cn/1.1/classes/Foo
348
+ body:
349
+ encoding: UTF-8
350
+ string: '{"bar":{"__type":"Pointer","className":"Bar","objectId":"5527939de4b0da2c5defa209"},"bars":[{"__type":"Pointer","className":"Bar","objectId":"5527939de4b0da2c5defa209"}]}'
351
+ headers:
352
+ User-Agent:
353
+ - Parse for Ruby, 0.0
354
+ Content-Type:
355
+ - application/json
356
+ X-Avoscloud-Application-Id:
357
+ - <X-AVOSCloud-Application-Id>
358
+ X-Avoscloud-Application-Key:
359
+ - <X-AVOSCloud-Application-Key>
360
+ Accept-Encoding:
361
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
362
+ Accept:
363
+ - '*/*'
364
+ response:
365
+ status:
366
+ code: 201
367
+ message: Created
368
+ headers:
369
+ Server:
370
+ - Tengine
371
+ Date:
372
+ - Fri, 10 Apr 2015 09:10:54 GMT
373
+ Content-Type:
374
+ - application/json;charset=utf-8
375
+ Content-Length:
376
+ - '78'
377
+ Connection:
378
+ - keep-alive
379
+ Location:
380
+ - /1.1/classes/Foo/5527939ee4b0da2c5defa20c
381
+ Cache-Control:
382
+ - no-cache,no-store
383
+ Pragma:
384
+ - no-cache
385
+ Strict-Transport-Security:
386
+ - max-age=31536000
387
+ body:
388
+ encoding: UTF-8
389
+ string: '{"createdAt":"2015-04-10T09:10:54.057Z","objectId":"5527939ee4b0da2c5defa20c"}'
390
+ http_version:
391
+ recorded_at: Fri, 10 Apr 2015 09:10:54 GMT
392
+ - request:
393
+ method: get
394
+ uri: https://api.leancloud.cn/1.1/classes/Foo?include=bar,bars&where=%7B%22objectId%22:%225527939ee4b0da2c5defa20c%22%7D
395
+ body:
396
+ encoding: US-ASCII
397
+ string: ''
398
+ headers:
399
+ User-Agent:
400
+ - Parse for Ruby, 0.0
401
+ Content-Type:
402
+ - application/json
403
+ X-Avoscloud-Application-Id:
404
+ - <X-AVOSCloud-Application-Id>
405
+ X-Avoscloud-Application-Key:
406
+ - <X-AVOSCloud-Application-Key>
407
+ Accept-Encoding:
408
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
409
+ Accept:
410
+ - '*/*'
411
+ response:
412
+ status:
413
+ code: 200
414
+ message: OK
415
+ headers:
416
+ Server:
417
+ - Tengine
418
+ Date:
419
+ - Fri, 10 Apr 2015 09:10:54 GMT
420
+ Content-Type:
421
+ - application/json;charset=utf-8
422
+ Content-Length:
423
+ - '492'
424
+ Connection:
425
+ - keep-alive
426
+ Last-Modified:
427
+ - Fri, 10 Apr 2015 09:10:54.058 GMT
428
+ Cache-Control:
429
+ - no-cache,no-store
430
+ Pragma:
431
+ - no-cache
432
+ Strict-Transport-Security:
433
+ - max-age=31536000
434
+ body:
435
+ encoding: UTF-8
436
+ string: '{"results":[{"bars":[{"foobar":"foobar","createdAt":"2015-04-10T09:10:53.779Z","updatedAt":"2015-04-10T09:10:53.779Z","objectId":"5527939de4b0da2c5defa209","__type":"Pointer","className":"Bar"}],"bar":{"foobar":"foobar","createdAt":"2015-04-10T09:10:53.779Z","updatedAt":"2015-04-10T09:10:53.779Z","objectId":"5527939de4b0da2c5defa209","__type":"Pointer","className":"Bar"},"createdAt":"2015-04-10T09:10:54.057Z","updatedAt":"2015-04-10T09:10:54.057Z","objectId":"5527939ee4b0da2c5defa20c"}]}'
437
+ http_version:
438
+ recorded_at: Fri, 10 Apr 2015 09:10:54 GMT
439
+ - request:
440
+ method: put
441
+ uri: https://api.leancloud.cn/1.1/classes/Bar/5527939de4b0da2c5defa209?new=true
442
+ body:
443
+ encoding: UTF-8
444
+ string: '{"foobar":"foobar","baz":"baz"}'
445
+ headers:
446
+ User-Agent:
447
+ - Parse for Ruby, 0.0
448
+ Content-Type:
449
+ - application/json
450
+ X-Avoscloud-Application-Id:
451
+ - <X-AVOSCloud-Application-Id>
452
+ X-Avoscloud-Application-Key:
453
+ - <X-AVOSCloud-Application-Key>
454
+ Accept-Encoding:
455
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
456
+ Accept:
457
+ - '*/*'
458
+ response:
459
+ status:
460
+ code: 200
461
+ message: OK
462
+ headers:
463
+ Server:
464
+ - Tengine
465
+ Date:
466
+ - Fri, 10 Apr 2015 09:10:54 GMT
467
+ Content-Type:
468
+ - application/json;charset=utf-8
469
+ Content-Length:
470
+ - '108'
471
+ Connection:
472
+ - keep-alive
473
+ Cache-Control:
474
+ - no-cache,no-store
475
+ Pragma:
476
+ - no-cache
477
+ Strict-Transport-Security:
478
+ - max-age=31536000
479
+ body:
480
+ encoding: UTF-8
481
+ string: '{"objectId":"5527939de4b0da2c5defa209","baz":"baz","foobar":"foobar","updatedAt":"2015-04-10T09:10:54.732Z"}'
482
+ http_version:
483
+ recorded_at: Fri, 10 Apr 2015 09:10:54 GMT
484
+ recorded_with: VCR 2.4.0