dropbox-api-petems 0.4.2 → 1.0.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 (59) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +5 -0
  3. data/README.markdown +13 -8
  4. data/Rakefile +5 -0
  5. data/dropbox-api.gemspec +9 -8
  6. data/lib/dropbox-api.rb +1 -0
  7. data/lib/dropbox-api/objects/dir.rb +5 -0
  8. data/lib/dropbox-api/objects/file.rb +5 -10
  9. data/lib/dropbox-api/objects/fileops.rb +5 -0
  10. data/lib/dropbox-api/tasks.rb +2 -2
  11. data/lib/dropbox-api/version.rb +1 -1
  12. data/spec/connection.offline.yml +5 -0
  13. data/spec/lib/dropbox-api/client_spec.rb +96 -68
  14. data/spec/lib/dropbox-api/connection_spec.rb +1 -1
  15. data/spec/lib/dropbox-api/dir_spec.rb +12 -6
  16. data/spec/lib/dropbox-api/file_spec.rb +7 -11
  17. data/spec/lib/dropbox-api/oauth_spec.rb +22 -1
  18. data/spec/lib/dropbox-api/thumbnail_spec.rb +4 -4
  19. data/spec/spec_helper.rb +13 -4
  20. data/spec/support/config.rb +5 -1
  21. data/spec/vcr/cassettes/Dropbox_API_Client/_account/retrieves_the_account_object.yml +54 -0
  22. data/spec/vcr/cassettes/Dropbox_API_Client/_chunked_upload/puts_a_5MB_file_in_dropbox.yml +150 -0
  23. data/spec/vcr/cassettes/Dropbox_API_Client/_chunked_upload/yields_current_offset_and_upload_id.yml +150 -0
  24. data/spec/vcr/cassettes/Dropbox_API_Client/_copy_from_copy_ref/copies_a_file_from_a_copy_ref.yml +271 -0
  25. data/spec/vcr/cassettes/Dropbox_API_Client/_delta/returns_a_cursor_and_list_of_files.yml +184 -0
  26. data/spec/vcr/cassettes/Dropbox_API_Client/_delta/returns_the_files_that_have_changed_since_the_cursor_was_made.yml +361 -0
  27. data/spec/vcr/cassettes/Dropbox_API_Client/_download/a_file/downloads_a_file.yml +58 -0
  28. data/spec/vcr/cassettes/Dropbox_API_Client/_download/a_non-existant_file/raises_a_404.yml +38 -0
  29. data/spec/vcr/cassettes/Dropbox_API_Client/_find/returns_a_single_directory.yml +63 -0
  30. data/spec/vcr/cassettes/Dropbox_API_Client/_find/returns_a_single_file.yml +55 -0
  31. data/spec/vcr/cassettes/Dropbox_API_Client/_ls/a_directory/returns_an_item_array_of_directory_contents.yml +107 -0
  32. data/spec/vcr/cassettes/Dropbox_API_Client/_ls/a_single_file/returns_a_single_item_array_of_if_we_ls_a_file.yml +107 -0
  33. data/spec/vcr/cassettes/Dropbox_API_Client/_ls/no_value/returns_an_array_of_files_and_dirs.yml +115 -0
  34. data/spec/vcr/cassettes/Dropbox_API_Client/_mkdir/creates_dirs_with_tricky_characters.yml +61 -0
  35. data/spec/vcr/cassettes/Dropbox_API_Client/_mkdir/creates_dirs_with_utf8_characters.yml +61 -0
  36. data/spec/vcr/cassettes/Dropbox_API_Client/_mkdir/returns_an_array_of_files_and_dirs.yml +61 -0
  37. data/spec/vcr/cassettes/Dropbox_API_Client/_search/no_path_given/finds_the_file_if_in_root.yml +55 -0
  38. data/spec/vcr/cassettes/Dropbox_API_Client/_search/path_with_leading_slash/finds_the_file.yml +56 -0
  39. data/spec/vcr/cassettes/Dropbox_API_Client/_search/with_path/finds_a_file.yml +56 -0
  40. data/spec/vcr/cassettes/Dropbox_API_Client/_upload/a_file_with_tricky_characters/is_uploaded.yml +56 -0
  41. data/spec/vcr/cassettes/Dropbox_API_Client/_upload/a_file_with_utf8/is_uploaded.yml +56 -0
  42. data/spec/vcr/cassettes/Dropbox_API_Client/_upload/a_simple_file/is_uploaded.yml +55 -0
  43. data/spec/vcr/cassettes/Dropbox_API_Dir/_copy/copies_the_dir_properly.yml +120 -0
  44. data/spec/vcr/cassettes/Dropbox_API_Dir/_destroy/destroys_the_dir_properly.yml +120 -0
  45. data/spec/vcr/cassettes/Dropbox_API_Dir/_direct_url/gives_the_direct_url.yml +115 -0
  46. data/spec/vcr/cassettes/Dropbox_API_Dir/_move/moves_the_dir_properly.yml +120 -0
  47. data/spec/vcr/cassettes/Dropbox_API_File/_copy/copies_the_file_properly.yml +115 -0
  48. data/spec/vcr/cassettes/Dropbox_API_File/_copy_ref/returns_a_copy_ref_object.yml +104 -0
  49. data/spec/vcr/cassettes/Dropbox_API_File/_destroy/destroys_the_file_properly.yml +115 -0
  50. data/spec/vcr/cassettes/Dropbox_API_File/_direct_url/returns_an_Url_object.yml +109 -0
  51. data/spec/vcr/cassettes/Dropbox_API_File/_download/should_download_the_file.yml +109 -0
  52. data/spec/vcr/cassettes/Dropbox_API_File/_move/moves_the_file_properly.yml +115 -0
  53. data/spec/vcr/cassettes/Dropbox_API_File/_restore/restores_the_file_to_a_specific_revision.yml +270 -0
  54. data/spec/vcr/cassettes/Dropbox_API_File/_revisions/retrieves_all_revisions_as_an_Array_of_File_objects.yml +166 -0
  55. data/spec/vcr/cassettes/Dropbox_API_File/_share_url/returns_an_Url_object.yml +109 -0
  56. data/spec/vcr/cassettes/Dropbox_API_File/_thumbnail/downloads_a_thumbnail.yml +427 -0
  57. data/spec/vcr/cassettes/Dropbox_API_OAuth/_consumer/provides_an_oauth_method.yml +105 -0
  58. metadata +127 -41
  59. data/.ruby-version +0 -1
@@ -0,0 +1,361 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://api-content.dropbox.com/1/files_put/dropbox/awesome-tests/delta-test-baz.txt
6
+ body:
7
+ encoding: UTF-8
8
+ string: Some file
9
+ headers:
10
+ Content-Type:
11
+ - application/octet-stream
12
+ Content-Length:
13
+ - '9'
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - '*/*'
18
+ User-Agent:
19
+ - OAuth gem v0.4.7
20
+ Authorization:
21
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Server:
28
+ - nginx
29
+ Date:
30
+ - Mon, 10 Feb 2014 20:47:35 GMT
31
+ Content-Type:
32
+ - text/javascript
33
+ Transfer-Encoding:
34
+ - chunked
35
+ Connection:
36
+ - keep-alive
37
+ X-Server-Response-Time:
38
+ - '757'
39
+ X-Dropbox-Request-Id:
40
+ - 03394603be4a506082c1d97cf49ffcb4
41
+ Pragma:
42
+ - no-cache
43
+ Cache-Control:
44
+ - no-cache
45
+ X-Requestid:
46
+ - 59ae7bbdcc5064db81a1af424e6058c4
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"revision": 105, "rev": "691f47d8b3", "thumb_exists": false, "bytes":
50
+ 9, "modified": "Mon, 10 Feb 2014 20:47:34 +0000", "client_mtime": "Mon, 10
51
+ Feb 2014 20:47:35 +0000", "path": "/awesome-tests/delta-test-baz.txt", "is_dir":
52
+ false, "icon": "page_white_text", "root": "dropbox", "mime_type": "text/plain",
53
+ "size": "9 bytes"}'
54
+ http_version:
55
+ recorded_at: Mon, 10 Feb 2014 20:47:36 GMT
56
+ - request:
57
+ method: post
58
+ uri: https://api.dropbox.com/1/delta
59
+ body:
60
+ encoding: US-ASCII
61
+ string: ''
62
+ headers:
63
+ Accept-Encoding:
64
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
65
+ Accept:
66
+ - '*/*'
67
+ User-Agent:
68
+ - OAuth gem v0.4.7
69
+ Content-Length:
70
+ - '0'
71
+ Content-Type:
72
+ - application/x-www-form-urlencoded
73
+ Authorization:
74
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
75
+ response:
76
+ status:
77
+ code: 200
78
+ message: OK
79
+ headers:
80
+ Server:
81
+ - nginx
82
+ Date:
83
+ - Mon, 10 Feb 2014 20:47:36 GMT
84
+ Content-Type:
85
+ - text/javascript
86
+ Transfer-Encoding:
87
+ - chunked
88
+ Connection:
89
+ - keep-alive
90
+ X-Server-Response-Time:
91
+ - '50'
92
+ X-Dropbox-Request-Id:
93
+ - 979e547fc9cc43f443d971f43d35f999
94
+ Pragma:
95
+ - no-cache
96
+ Cache-Control:
97
+ - no-cache
98
+ X-Dropbox-Http-Protocol:
99
+ - None
100
+ X-Frame-Options:
101
+ - SAMEORIGIN
102
+ X-Requestid:
103
+ - 58b6fdf5f58524661bbeb7ea10da3dad
104
+ body:
105
+ encoding: UTF-8
106
+ string: '{"has_more": false, "cursor": "AAH8DWQ5U_abxuz-zq9klgVXyKrILyLYjcasZYicZl5E_-pDmwyQct_-DKaCHhWVR7dNDbNdmxpoFMZl8xk-ZIJDmiOQGmitpnifzAHTfZyI1A",
107
+ "entries": [["/getting started.pdf", {"revision": 1, "rev": "11f47d8b3", "thumb_exists":
108
+ false, "bytes": 249159, "modified": "Mon, 10 Feb 2014 17:46:48 +0000", "client_mtime":
109
+ "Mon, 10 Feb 2014 17:46:48 +0000", "path": "/Getting Started.pdf", "is_dir":
110
+ false, "icon": "page_white_acrobat", "root": "dropbox", "mime_type": "application/pdf",
111
+ "size": "243.3 KB"}], ["/test-1392055876.txt", {"revision": 5, "rev": "51f47d8b3",
112
+ "thumb_exists": false, "bytes": 9, "modified": "Mon, 10 Feb 2014 18:11:24
113
+ +0000", "client_mtime": "Mon, 10 Feb 2014 18:11:24 +0000", "path": "/test-1392055876.txt",
114
+ "is_dir": false, "icon": "page_white_text", "root": "dropbox", "mime_type":
115
+ "text/plain", "size": "9 bytes"}], ["/test ,|!@#$%^&*{b}[].;''.,<>?:-1392055876.txt",
116
+ {"revision": 6, "rev": "61f47d8b3", "thumb_exists": false, "bytes": 9, "modified":
117
+ "Mon, 10 Feb 2014 18:11:25 +0000", "client_mtime": "Mon, 10 Feb 2014 18:11:25
118
+ +0000", "path": "/test ,|!@#$%^&*{b}[].;''.,<>?:-1392055876.txt", "is_dir":
119
+ false, "icon": "page_white_text", "root": "dropbox", "mime_type": "text/plain",
120
+ "size": "9 bytes"}], ["/test \u0142o\u0142\u0105\u00f3-1392055876.txt", {"revision":
121
+ 7, "rev": "71f47d8b3", "thumb_exists": false, "bytes": 9, "modified": "Mon,
122
+ 10 Feb 2014 18:11:26 +0000", "client_mtime": "Mon, 10 Feb 2014 18:11:26 +0000",
123
+ "path": "/test \u0142o\u0142\u0105\u00f3-1392055876.txt", "is_dir": false,
124
+ "icon": "page_white_text", "root": "dropbox", "mime_type": "text/plain", "size":
125
+ "9 bytes"}], ["/test.txt", {"revision": 9, "rev": "91f47d8b3", "thumb_exists":
126
+ false, "bytes": 9, "modified": "Mon, 10 Feb 2014 18:14:02 +0000", "client_mtime":
127
+ "Mon, 10 Feb 2014 18:14:02 +0000", "path": "/test.txt", "is_dir": false, "icon":
128
+ "page_white_text", "root": "dropbox", "mime_type": "text/plain", "size": "9
129
+ bytes"}], ["/test ,|!@#$%^&*{b}[].;''.,<>?:.txt", {"revision": 10, "rev":
130
+ "a1f47d8b3", "thumb_exists": false, "bytes": 9, "modified": "Mon, 10 Feb 2014
131
+ 18:14:03 +0000", "client_mtime": "Mon, 10 Feb 2014 18:14:03 +0000", "path":
132
+ "/test ,|!@#$%^&*{b}[].;''.,<>?:.txt", "is_dir": false, "icon": "page_white_text",
133
+ "root": "dropbox", "mime_type": "text/plain", "size": "9 bytes"}], ["/test
134
+ \u0142o\u0142\u0105\u00f3.txt", {"revision": 11, "rev": "b1f47d8b3", "thumb_exists":
135
+ false, "bytes": 9, "modified": "Mon, 10 Feb 2014 18:14:04 +0000", "client_mtime":
136
+ "Mon, 10 Feb 2014 18:14:04 +0000", "path": "/test \u0142o\u0142\u0105\u00f3.txt",
137
+ "is_dir": false, "icon": "page_white_text", "root": "dropbox", "mime_type":
138
+ "text/plain", "size": "9 bytes"}], ["/foo.txt", {"revision": 13, "rev": "d1f47d8b3",
139
+ "thumb_exists": false, "bytes": 9, "modified": "Mon, 10 Feb 2014 18:14:12
140
+ +0000", "client_mtime": "Mon, 10 Feb 2014 18:12:21 +0000", "path": "/foo.txt",
141
+ "is_dir": false, "icon": "page_white_text", "root": "dropbox", "mime_type":
142
+ "text/plain", "size": "9 bytes"}], ["/baz.txt", {"revision": 43, "rev": "2b1f47d8b3",
143
+ "thumb_exists": false, "bytes": 15, "modified": "Mon, 10 Feb 2014 18:28:30
144
+ +0000", "client_mtime": "Mon, 10 Feb 2014 18:28:30 +0000", "path": "/baz.txt",
145
+ "is_dir": false, "icon": "page_white_text", "root": "dropbox", "mime_type":
146
+ "text/plain", "size": "15 bytes"}], ["/test-1392058752/spec-test-1392058752.jpg",
147
+ {"revision": 44, "rev": "2c1f47d8b3", "thumb_exists": true, "bytes": 12582,
148
+ "modified": "Mon, 10 Feb 2014 18:59:13 +0000", "client_mtime": "Mon, 10 Feb
149
+ 2014 18:59:13 +0000", "path": "/test-1392058752/spec-test-1392058752.jpg",
150
+ "is_dir": false, "icon": "page_white_picture", "root": "dropbox", "mime_type":
151
+ "image/jpeg", "size": "12.3 KB"}], ["/test-1392058752", {"revision": 45, "rev":
152
+ "2d1f47d8b3", "thumb_exists": false, "bytes": 0, "modified": "Mon, 10 Feb
153
+ 2014 18:59:13 +0000", "path": "/test-1392058752", "is_dir": true, "icon":
154
+ "folder", "root": "dropbox", "size": "0 bytes"}], ["/spec-test-1392058752.jpg",
155
+ {"revision": 67, "rev": "431f47d8b3", "thumb_exists": true, "bytes": 12582,
156
+ "modified": "Mon, 10 Feb 2014 20:30:20 +0000", "client_mtime": "Mon, 10 Feb
157
+ 2014 20:30:20 +0000", "path": "/spec-test-1392058752.jpg", "is_dir": false,
158
+ "icon": "page_white_picture", "root": "dropbox", "mime_type": "image/jpeg",
159
+ "size": "12.3 KB"}], ["/dir-spec-tests-copied", {"revision": 93, "rev": "5d1f47d8b3",
160
+ "thumb_exists": false, "bytes": 0, "modified": "Mon, 10 Feb 2014 20:39:21
161
+ +0000", "path": "/dir-spec-tests-copied", "is_dir": true, "icon": "folder",
162
+ "root": "dropbox", "size": "0 bytes"}], ["/dir-spec-tests", {"revision": 96,
163
+ "rev": "601f47d8b3", "thumb_exists": false, "bytes": 0, "modified": "Mon,
164
+ 10 Feb 2014 20:39:27 +0000", "path": "/dir-spec-tests", "is_dir": true, "icon":
165
+ "folder", "root": "dropbox", "size": "0 bytes"}], ["/qux.txt.copied", {"revision":
166
+ 101, "rev": "651f47d8b3", "thumb_exists": false, "bytes": 9, "modified": "Mon,
167
+ 10 Feb 2014 20:41:14 +0000", "client_mtime": "Mon, 10 Feb 2014 20:41:10 +0000",
168
+ "path": "/qux.txt.copied", "is_dir": false, "icon": "page_white", "root":
169
+ "dropbox", "mime_type": "application/octet-stream", "size": "9 bytes"}], ["/awesome-tests",
170
+ {"revision": 102, "rev": "661f47d8b3", "thumb_exists": false, "bytes": 0,
171
+ "modified": "Mon, 10 Feb 2014 20:41:49 +0000", "path": "/awesome-tests", "is_dir":
172
+ true, "icon": "folder", "root": "dropbox", "size": "0 bytes"}], ["/awesome-tests/foo.txt",
173
+ {"revision": 103, "rev": "671f47d8b3", "thumb_exists": false, "bytes": 9,
174
+ "modified": "Mon, 10 Feb 2014 20:42:38 +0000", "client_mtime": "Mon, 10 Feb
175
+ 2014 18:12:21 +0000", "path": "/awesome-tests/foo.txt", "is_dir": false, "icon":
176
+ "page_white_text", "root": "dropbox", "mime_type": "text/plain", "size": "9
177
+ bytes"}], ["/awesome-tests/delta-test-foo.txt", {"revision": 104, "rev": "681f47d8b3",
178
+ "thumb_exists": false, "bytes": 9, "modified": "Mon, 10 Feb 2014 20:47:32
179
+ +0000", "client_mtime": "Mon, 10 Feb 2014 20:47:32 +0000", "path": "/awesome-tests/delta-test-foo.txt",
180
+ "is_dir": false, "icon": "page_white_text", "root": "dropbox", "mime_type":
181
+ "text/plain", "size": "9 bytes"}], ["/awesome-tests/delta-test-baz.txt", {"revision":
182
+ 105, "rev": "691f47d8b3", "thumb_exists": false, "bytes": 9, "modified": "Mon,
183
+ 10 Feb 2014 20:47:34 +0000", "client_mtime": "Mon, 10 Feb 2014 20:47:35 +0000",
184
+ "path": "/awesome-tests/delta-test-baz.txt", "is_dir": false, "icon": "page_white_text",
185
+ "root": "dropbox", "mime_type": "text/plain", "size": "9 bytes"}]], "reset":
186
+ true}'
187
+ http_version:
188
+ recorded_at: Mon, 10 Feb 2014 20:47:37 GMT
189
+ - request:
190
+ method: post
191
+ uri: https://api.dropbox.com/1/fileops/delete
192
+ body:
193
+ encoding: US-ASCII
194
+ string: path=awesome-tests%2Fdelta-test-baz.txt&root=dropbox
195
+ headers:
196
+ Accept-Encoding:
197
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
198
+ Accept:
199
+ - '*/*'
200
+ User-Agent:
201
+ - OAuth gem v0.4.7
202
+ Content-Length:
203
+ - '0'
204
+ Content-Type:
205
+ - application/x-www-form-urlencoded
206
+ Authorization:
207
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
208
+ response:
209
+ status:
210
+ code: 200
211
+ message: OK
212
+ headers:
213
+ Server:
214
+ - nginx
215
+ Date:
216
+ - Mon, 10 Feb 2014 20:47:37 GMT
217
+ Content-Type:
218
+ - text/javascript
219
+ Transfer-Encoding:
220
+ - chunked
221
+ Connection:
222
+ - keep-alive
223
+ Set-Cookie:
224
+ - gvc=MzA0MDkzNDIwNDM3NjE2NjMwMjk3NDM1MDA4MzgxMDc2OTEyOTAy; expires=Sat, 09
225
+ Feb 2019 20:47:37 GMT; Path=/; httponly
226
+ X-Server-Response-Time:
227
+ - '179'
228
+ X-Dropbox-Request-Id:
229
+ - 842fad3eb774b2d4e3f8cca9cb2e2434
230
+ Pragma:
231
+ - no-cache
232
+ Cache-Control:
233
+ - no-cache
234
+ X-Dropbox-Http-Protocol:
235
+ - None
236
+ X-Frame-Options:
237
+ - SAMEORIGIN
238
+ X-Requestid:
239
+ - bf17a7efb7ce60baa1edfea9a3eb1367
240
+ body:
241
+ encoding: UTF-8
242
+ string: '{"is_deleted": true, "revision": 106, "rev": "6a1f47d8b3", "thumb_exists":
243
+ false, "bytes": 0, "modified": "Mon, 10 Feb 2014 20:47:37 +0000", "client_mtime":
244
+ "Wed, 31 Dec 1969 23:59:59 +0000", "path": "/awesome-tests/delta-test-baz.txt",
245
+ "is_dir": false, "icon": "page_white_text", "root": "dropbox", "mime_type":
246
+ "text/plain", "size": "0 bytes"}'
247
+ http_version:
248
+ recorded_at: Mon, 10 Feb 2014 20:47:38 GMT
249
+ - request:
250
+ method: put
251
+ uri: https://api-content.dropbox.com/1/files_put/dropbox/awesome-tests/delta-test-bar.txt
252
+ body:
253
+ encoding: UTF-8
254
+ string: Another file
255
+ headers:
256
+ Content-Type:
257
+ - application/octet-stream
258
+ Content-Length:
259
+ - '12'
260
+ Accept-Encoding:
261
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
262
+ Accept:
263
+ - '*/*'
264
+ User-Agent:
265
+ - OAuth gem v0.4.7
266
+ Authorization:
267
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
268
+ response:
269
+ status:
270
+ code: 200
271
+ message: OK
272
+ headers:
273
+ Server:
274
+ - nginx
275
+ Date:
276
+ - Mon, 10 Feb 2014 20:47:40 GMT
277
+ Content-Type:
278
+ - text/javascript
279
+ Transfer-Encoding:
280
+ - chunked
281
+ Connection:
282
+ - keep-alive
283
+ X-Server-Response-Time:
284
+ - '541'
285
+ X-Dropbox-Request-Id:
286
+ - 876c34745b4429ab7f6dafcbe2fc7d16
287
+ Pragma:
288
+ - no-cache
289
+ Cache-Control:
290
+ - no-cache
291
+ X-Requestid:
292
+ - c6682f249ff508516442e12b2638c956
293
+ body:
294
+ encoding: UTF-8
295
+ string: '{"revision": 107, "rev": "6b1f47d8b3", "thumb_exists": false, "bytes":
296
+ 12, "modified": "Mon, 10 Feb 2014 20:47:40 +0000", "client_mtime": "Mon, 10
297
+ Feb 2014 20:47:40 +0000", "path": "/awesome-tests/delta-test-bar.txt", "is_dir":
298
+ false, "icon": "page_white_text", "root": "dropbox", "mime_type": "text/plain",
299
+ "size": "12 bytes"}'
300
+ http_version:
301
+ recorded_at: Mon, 10 Feb 2014 20:47:41 GMT
302
+ - request:
303
+ method: post
304
+ uri: https://api.dropbox.com/1/delta
305
+ body:
306
+ encoding: US-ASCII
307
+ string: cursor=AAH8DWQ5U_abxuz-zq9klgVXyKrILyLYjcasZYicZl5E_-pDmwyQct_-DKaCHhWVR7dNDbNdmxpoFMZl8xk-ZIJDmiOQGmitpnifzAHTfZyI1A
308
+ headers:
309
+ Accept-Encoding:
310
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
311
+ Accept:
312
+ - '*/*'
313
+ User-Agent:
314
+ - OAuth gem v0.4.7
315
+ Content-Length:
316
+ - '0'
317
+ Content-Type:
318
+ - application/x-www-form-urlencoded
319
+ Authorization:
320
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
321
+ response:
322
+ status:
323
+ code: 200
324
+ message: OK
325
+ headers:
326
+ Server:
327
+ - nginx
328
+ Date:
329
+ - Mon, 10 Feb 2014 20:47:43 GMT
330
+ Content-Type:
331
+ - text/javascript
332
+ Transfer-Encoding:
333
+ - chunked
334
+ Connection:
335
+ - keep-alive
336
+ X-Server-Response-Time:
337
+ - '34'
338
+ X-Dropbox-Request-Id:
339
+ - 4d2b77601663c415db2bda99754088ea
340
+ Pragma:
341
+ - no-cache
342
+ Cache-Control:
343
+ - no-cache
344
+ X-Dropbox-Http-Protocol:
345
+ - None
346
+ X-Frame-Options:
347
+ - SAMEORIGIN
348
+ X-Requestid:
349
+ - fca3f18b9121ceccbaf981327e1dfa23
350
+ body:
351
+ encoding: UTF-8
352
+ string: '{"has_more": false, "cursor": "AAEEdtIs8w3jyRiYmp2f067wZhJWZ-9Ap0i6LLuWcpRee5a9KB-e9LIFkmFsosWvqf-gEQR3dSzaOkG_JKKz638CatASXx-T7CR8jd-3aox0eA",
353
+ "entries": [["/awesome-tests/delta-test-baz.txt", null], ["/awesome-tests/delta-test-bar.txt",
354
+ {"revision": 107, "rev": "6b1f47d8b3", "thumb_exists": false, "bytes": 12,
355
+ "modified": "Mon, 10 Feb 2014 20:47:40 +0000", "client_mtime": "Mon, 10 Feb
356
+ 2014 20:47:40 +0000", "path": "/awesome-tests/delta-test-bar.txt", "is_dir":
357
+ false, "icon": "page_white_text", "root": "dropbox", "mime_type": "text/plain",
358
+ "size": "12 bytes"}]], "reset": false}'
359
+ http_version:
360
+ recorded_at: Mon, 10 Feb 2014 20:47:44 GMT
361
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api-content.dropbox.com/1/files/dropbox/awesome-tests/foo.txt
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ User-Agent:
15
+ - OAuth gem v0.4.7
16
+ Authorization:
17
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - nginx
25
+ Date:
26
+ - Mon, 10 Feb 2014 20:43:09 GMT
27
+ Content-Type:
28
+ - text/plain; charset=ascii
29
+ Content-Length:
30
+ - '9'
31
+ Connection:
32
+ - keep-alive
33
+ Accept-Ranges:
34
+ - bytes
35
+ X-Dropbox-Metadata:
36
+ - '{"revision": 103, "rev": "671f47d8b3", "thumb_exists": false, "bytes": 9,
37
+ "modified": "Mon, 10 Feb 2014 20:42:38 +0000", "client_mtime": "Mon, 10 Feb
38
+ 2014 18:12:21 +0000", "path": "/awesome-tests/foo.txt", "is_dir": false, "icon":
39
+ "page_white_text", "root": "dropbox", "mime_type": "text/plain", "size": "9
40
+ bytes"}'
41
+ X-Server-Response-Time:
42
+ - '174'
43
+ Etag:
44
+ - 103n
45
+ X-Dropbox-Request-Id:
46
+ - 0f5aef0f176f66e0f4cb663da420931f
47
+ Pragma:
48
+ - public
49
+ Cache-Control:
50
+ - max-age=0
51
+ X-Requestid:
52
+ - c7f3d0ff73ac4b4e56abe0131dab20e1
53
+ body:
54
+ encoding: UTF-8
55
+ string: Some file
56
+ http_version:
57
+ recorded_at: Mon, 10 Feb 2014 20:43:10 GMT
58
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api-content.dropbox.com/1/files/dropbox/awesome-tests/no.txt
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ User-Agent:
15
+ - OAuth gem v0.4.7
16
+ Authorization:
17
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
18
+ response:
19
+ status:
20
+ code: 404
21
+ message: Not Found
22
+ headers:
23
+ Server:
24
+ - nginx
25
+ Date:
26
+ - Mon, 10 Feb 2014 20:29:18 GMT
27
+ Content-Type:
28
+ - application/json
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"error": "File not found"}'
36
+ http_version:
37
+ recorded_at: Mon, 10 Feb 2014 20:29:19 GMT
38
+ recorded_with: VCR 2.8.0