dropbox-api-petems 0.4.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +5 -0
- data/README.markdown +13 -8
- data/Rakefile +5 -0
- data/dropbox-api.gemspec +9 -8
- data/lib/dropbox-api.rb +1 -0
- data/lib/dropbox-api/objects/dir.rb +5 -0
- data/lib/dropbox-api/objects/file.rb +5 -10
- data/lib/dropbox-api/objects/fileops.rb +5 -0
- data/lib/dropbox-api/tasks.rb +2 -2
- data/lib/dropbox-api/version.rb +1 -1
- data/spec/connection.offline.yml +5 -0
- data/spec/lib/dropbox-api/client_spec.rb +96 -68
- data/spec/lib/dropbox-api/connection_spec.rb +1 -1
- data/spec/lib/dropbox-api/dir_spec.rb +12 -6
- data/spec/lib/dropbox-api/file_spec.rb +7 -11
- data/spec/lib/dropbox-api/oauth_spec.rb +22 -1
- data/spec/lib/dropbox-api/thumbnail_spec.rb +4 -4
- data/spec/spec_helper.rb +13 -4
- data/spec/support/config.rb +5 -1
- data/spec/vcr/cassettes/Dropbox_API_Client/_account/retrieves_the_account_object.yml +54 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_chunked_upload/puts_a_5MB_file_in_dropbox.yml +150 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_chunked_upload/yields_current_offset_and_upload_id.yml +150 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_copy_from_copy_ref/copies_a_file_from_a_copy_ref.yml +271 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_delta/returns_a_cursor_and_list_of_files.yml +184 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_delta/returns_the_files_that_have_changed_since_the_cursor_was_made.yml +361 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_download/a_file/downloads_a_file.yml +58 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_download/a_non-existant_file/raises_a_404.yml +38 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_find/returns_a_single_directory.yml +63 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_find/returns_a_single_file.yml +55 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_ls/a_directory/returns_an_item_array_of_directory_contents.yml +107 -0
- 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
- data/spec/vcr/cassettes/Dropbox_API_Client/_ls/no_value/returns_an_array_of_files_and_dirs.yml +115 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_mkdir/creates_dirs_with_tricky_characters.yml +61 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_mkdir/creates_dirs_with_utf8_characters.yml +61 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_mkdir/returns_an_array_of_files_and_dirs.yml +61 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_search/no_path_given/finds_the_file_if_in_root.yml +55 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_search/path_with_leading_slash/finds_the_file.yml +56 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_search/with_path/finds_a_file.yml +56 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_upload/a_file_with_tricky_characters/is_uploaded.yml +56 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_upload/a_file_with_utf8/is_uploaded.yml +56 -0
- data/spec/vcr/cassettes/Dropbox_API_Client/_upload/a_simple_file/is_uploaded.yml +55 -0
- data/spec/vcr/cassettes/Dropbox_API_Dir/_copy/copies_the_dir_properly.yml +120 -0
- data/spec/vcr/cassettes/Dropbox_API_Dir/_destroy/destroys_the_dir_properly.yml +120 -0
- data/spec/vcr/cassettes/Dropbox_API_Dir/_direct_url/gives_the_direct_url.yml +115 -0
- data/spec/vcr/cassettes/Dropbox_API_Dir/_move/moves_the_dir_properly.yml +120 -0
- data/spec/vcr/cassettes/Dropbox_API_File/_copy/copies_the_file_properly.yml +115 -0
- data/spec/vcr/cassettes/Dropbox_API_File/_copy_ref/returns_a_copy_ref_object.yml +104 -0
- data/spec/vcr/cassettes/Dropbox_API_File/_destroy/destroys_the_file_properly.yml +115 -0
- data/spec/vcr/cassettes/Dropbox_API_File/_direct_url/returns_an_Url_object.yml +109 -0
- data/spec/vcr/cassettes/Dropbox_API_File/_download/should_download_the_file.yml +109 -0
- data/spec/vcr/cassettes/Dropbox_API_File/_move/moves_the_file_properly.yml +115 -0
- data/spec/vcr/cassettes/Dropbox_API_File/_restore/restores_the_file_to_a_specific_revision.yml +270 -0
- data/spec/vcr/cassettes/Dropbox_API_File/_revisions/retrieves_all_revisions_as_an_Array_of_File_objects.yml +166 -0
- data/spec/vcr/cassettes/Dropbox_API_File/_share_url/returns_an_Url_object.yml +109 -0
- data/spec/vcr/cassettes/Dropbox_API_File/_thumbnail/downloads_a_thumbnail.yml +427 -0
- data/spec/vcr/cassettes/Dropbox_API_OAuth/_consumer/provides_an_oauth_method.yml +105 -0
- metadata +127 -41
- data/.ruby-version +0 -1
@@ -0,0 +1,115 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://api-content.dropbox.com/1/files_put/dropbox/qux.txt
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: spec 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:41:10 GMT
|
31
|
+
Content-Type:
|
32
|
+
- text/javascript
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
X-Server-Response-Time:
|
38
|
+
- '346'
|
39
|
+
X-Dropbox-Request-Id:
|
40
|
+
- 615685a236dfcd457aa583dff5f73198
|
41
|
+
Pragma:
|
42
|
+
- no-cache
|
43
|
+
Cache-Control:
|
44
|
+
- no-cache
|
45
|
+
X-Requestid:
|
46
|
+
- 5145b88eefe5fcdda9c983b373e89c34
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"revision": 99, "rev": "631f47d8b3", "thumb_exists": false, "bytes":
|
50
|
+
9, "modified": "Mon, 10 Feb 2014 20:41:10 +0000", "client_mtime": "Mon, 10
|
51
|
+
Feb 2014 20:41:10 +0000", "path": "/qux.txt", "is_dir": false, "icon": "page_white_text",
|
52
|
+
"root": "dropbox", "mime_type": "text/plain", "size": "9 bytes"}'
|
53
|
+
http_version:
|
54
|
+
recorded_at: Mon, 10 Feb 2014 20:41:11 GMT
|
55
|
+
- request:
|
56
|
+
method: post
|
57
|
+
uri: https://api.dropbox.com/1/fileops/move
|
58
|
+
body:
|
59
|
+
encoding: US-ASCII
|
60
|
+
string: from_path=qux.txt&root=dropbox&to_path=qux.txt.copied
|
61
|
+
headers:
|
62
|
+
Accept-Encoding:
|
63
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
64
|
+
Accept:
|
65
|
+
- '*/*'
|
66
|
+
User-Agent:
|
67
|
+
- OAuth gem v0.4.7
|
68
|
+
Content-Length:
|
69
|
+
- '0'
|
70
|
+
Content-Type:
|
71
|
+
- application/x-www-form-urlencoded
|
72
|
+
Authorization:
|
73
|
+
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
74
|
+
response:
|
75
|
+
status:
|
76
|
+
code: 200
|
77
|
+
message: OK
|
78
|
+
headers:
|
79
|
+
Server:
|
80
|
+
- nginx
|
81
|
+
Date:
|
82
|
+
- Mon, 10 Feb 2014 20:41:14 GMT
|
83
|
+
Content-Type:
|
84
|
+
- text/javascript
|
85
|
+
Transfer-Encoding:
|
86
|
+
- chunked
|
87
|
+
Connection:
|
88
|
+
- keep-alive
|
89
|
+
Set-Cookie:
|
90
|
+
- gvc=MjIwNTQyNjg0MTAwNjY4MTg3MjkzNTQ4Njc3MTE3ODU4MDQyNDY5; expires=Sat, 09
|
91
|
+
Feb 2019 20:41:14 GMT; Path=/; httponly
|
92
|
+
X-Server-Response-Time:
|
93
|
+
- '171'
|
94
|
+
X-Dropbox-Request-Id:
|
95
|
+
- 236b718da5f8ded241fedc4718460faa
|
96
|
+
Pragma:
|
97
|
+
- no-cache
|
98
|
+
Cache-Control:
|
99
|
+
- no-cache
|
100
|
+
X-Dropbox-Http-Protocol:
|
101
|
+
- None
|
102
|
+
X-Frame-Options:
|
103
|
+
- SAMEORIGIN
|
104
|
+
X-Requestid:
|
105
|
+
- 7c4f9b1e5b1b56a6a6b311eabac97475
|
106
|
+
body:
|
107
|
+
encoding: UTF-8
|
108
|
+
string: '{"revision": 101, "rev": "651f47d8b3", "thumb_exists": false, "bytes":
|
109
|
+
9, "modified": "Mon, 10 Feb 2014 20:41:14 +0000", "client_mtime": "Mon, 10
|
110
|
+
Feb 2014 20:41:10 +0000", "path": "/qux.txt.copied", "is_dir": false, "icon":
|
111
|
+
"page_white", "root": "dropbox", "mime_type": "application/octet-stream",
|
112
|
+
"size": "9 bytes"}'
|
113
|
+
http_version:
|
114
|
+
recorded_at: Mon, 10 Feb 2014 20:41:15 GMT
|
115
|
+
recorded_with: VCR 2.8.0
|
data/spec/vcr/cassettes/Dropbox_API_File/_restore/restores_the_file_to_a_specific_revision.yml
ADDED
@@ -0,0 +1,270 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://api-content.dropbox.com/1/files_put/dropbox/qux.txt
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: spec 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:29:58 GMT
|
31
|
+
Content-Type:
|
32
|
+
- text/javascript
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
X-Server-Response-Time:
|
38
|
+
- '429'
|
39
|
+
X-Dropbox-Request-Id:
|
40
|
+
- f532d5e1aa770f03854d7d62b61b3225
|
41
|
+
Pragma:
|
42
|
+
- no-cache
|
43
|
+
Cache-Control:
|
44
|
+
- no-cache
|
45
|
+
X-Requestid:
|
46
|
+
- 309c74a1112d163797632cc3ddf65266
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"revision": 64, "rev": "401f47d8b3", "thumb_exists": false, "bytes":
|
50
|
+
9, "modified": "Mon, 10 Feb 2014 20:29:58 +0000", "client_mtime": "Mon, 10
|
51
|
+
Feb 2014 20:29:58 +0000", "path": "/qux.txt", "is_dir": false, "icon": "page_white_text",
|
52
|
+
"root": "dropbox", "mime_type": "text/plain", "size": "9 bytes"}'
|
53
|
+
http_version:
|
54
|
+
recorded_at: Mon, 10 Feb 2014 20:29:59 GMT
|
55
|
+
- request:
|
56
|
+
method: put
|
57
|
+
uri: https://api-content.dropbox.com/1/files_put/dropbox/qux.txt
|
58
|
+
body:
|
59
|
+
encoding: UTF-8
|
60
|
+
string: Updated content
|
61
|
+
headers:
|
62
|
+
Content-Type:
|
63
|
+
- application/octet-stream
|
64
|
+
Content-Length:
|
65
|
+
- '15'
|
66
|
+
Accept-Encoding:
|
67
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
68
|
+
Accept:
|
69
|
+
- '*/*'
|
70
|
+
User-Agent:
|
71
|
+
- OAuth gem v0.4.7
|
72
|
+
Authorization:
|
73
|
+
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
74
|
+
response:
|
75
|
+
status:
|
76
|
+
code: 200
|
77
|
+
message: OK
|
78
|
+
headers:
|
79
|
+
Server:
|
80
|
+
- nginx
|
81
|
+
Date:
|
82
|
+
- Mon, 10 Feb 2014 20:30:00 GMT
|
83
|
+
Content-Type:
|
84
|
+
- text/javascript
|
85
|
+
Transfer-Encoding:
|
86
|
+
- chunked
|
87
|
+
Connection:
|
88
|
+
- keep-alive
|
89
|
+
X-Server-Response-Time:
|
90
|
+
- '962'
|
91
|
+
X-Dropbox-Request-Id:
|
92
|
+
- 786f3abf7de20afaf07c49c9f4198786
|
93
|
+
Pragma:
|
94
|
+
- no-cache
|
95
|
+
Cache-Control:
|
96
|
+
- no-cache
|
97
|
+
X-Requestid:
|
98
|
+
- b76336e4410d1eb5e18260c00444d572
|
99
|
+
body:
|
100
|
+
encoding: UTF-8
|
101
|
+
string: '{"revision": 65, "rev": "411f47d8b3", "thumb_exists": false, "bytes":
|
102
|
+
15, "modified": "Mon, 10 Feb 2014 20:29:59 +0000", "client_mtime": "Mon, 10
|
103
|
+
Feb 2014 20:29:59 +0000", "path": "/qux.txt", "is_dir": false, "icon": "page_white_text",
|
104
|
+
"root": "dropbox", "mime_type": "text/plain", "size": "15 bytes"}'
|
105
|
+
http_version:
|
106
|
+
recorded_at: Mon, 10 Feb 2014 20:30:01 GMT
|
107
|
+
- request:
|
108
|
+
method: get
|
109
|
+
uri: https://api.dropbox.com/1/metadata/dropbox/qux.txt
|
110
|
+
body:
|
111
|
+
encoding: US-ASCII
|
112
|
+
string: ''
|
113
|
+
headers:
|
114
|
+
Accept-Encoding:
|
115
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
116
|
+
Accept:
|
117
|
+
- '*/*'
|
118
|
+
User-Agent:
|
119
|
+
- OAuth gem v0.4.7
|
120
|
+
Authorization:
|
121
|
+
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
122
|
+
response:
|
123
|
+
status:
|
124
|
+
code: 200
|
125
|
+
message: OK
|
126
|
+
headers:
|
127
|
+
Server:
|
128
|
+
- nginx
|
129
|
+
Date:
|
130
|
+
- Mon, 10 Feb 2014 20:30:03 GMT
|
131
|
+
Content-Type:
|
132
|
+
- text/javascript
|
133
|
+
Transfer-Encoding:
|
134
|
+
- chunked
|
135
|
+
Connection:
|
136
|
+
- keep-alive
|
137
|
+
X-Server-Response-Time:
|
138
|
+
- '35'
|
139
|
+
X-Dropbox-Request-Id:
|
140
|
+
- 485ec55811b2545040b28dbf1b836ec2
|
141
|
+
Pragma:
|
142
|
+
- no-cache
|
143
|
+
Cache-Control:
|
144
|
+
- no-cache
|
145
|
+
X-Dropbox-Http-Protocol:
|
146
|
+
- None
|
147
|
+
X-Frame-Options:
|
148
|
+
- SAMEORIGIN
|
149
|
+
X-Requestid:
|
150
|
+
- ee2799dd66a19ddde84afdb517e0246b
|
151
|
+
body:
|
152
|
+
encoding: UTF-8
|
153
|
+
string: '{"revision": 65, "rev": "411f47d8b3", "thumb_exists": false, "bytes":
|
154
|
+
15, "modified": "Mon, 10 Feb 2014 20:29:59 +0000", "client_mtime": "Mon, 10
|
155
|
+
Feb 2014 20:29:59 +0000", "path": "/qux.txt", "is_dir": false, "icon": "page_white_text",
|
156
|
+
"root": "dropbox", "mime_type": "text/plain", "size": "15 bytes"}'
|
157
|
+
http_version:
|
158
|
+
recorded_at: Mon, 10 Feb 2014 20:30:04 GMT
|
159
|
+
- request:
|
160
|
+
method: post
|
161
|
+
uri: https://api.dropbox.com/1/restore/dropbox/qux.txt
|
162
|
+
body:
|
163
|
+
encoding: US-ASCII
|
164
|
+
string: rev=401f47d8b3
|
165
|
+
headers:
|
166
|
+
Accept-Encoding:
|
167
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
168
|
+
Accept:
|
169
|
+
- '*/*'
|
170
|
+
User-Agent:
|
171
|
+
- OAuth gem v0.4.7
|
172
|
+
Content-Length:
|
173
|
+
- '0'
|
174
|
+
Content-Type:
|
175
|
+
- application/x-www-form-urlencoded
|
176
|
+
Authorization:
|
177
|
+
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
178
|
+
response:
|
179
|
+
status:
|
180
|
+
code: 200
|
181
|
+
message: OK
|
182
|
+
headers:
|
183
|
+
Server:
|
184
|
+
- nginx
|
185
|
+
Date:
|
186
|
+
- Mon, 10 Feb 2014 20:30:05 GMT
|
187
|
+
Content-Type:
|
188
|
+
- text/javascript
|
189
|
+
Transfer-Encoding:
|
190
|
+
- chunked
|
191
|
+
Connection:
|
192
|
+
- keep-alive
|
193
|
+
Set-Cookie:
|
194
|
+
- gvc=MjQ4NTA1OTYwMjQxODg0NjYzMjYyMjc5OTU2NDI3NDEzNjQzMzMx; expires=Sat, 09
|
195
|
+
Feb 2019 20:30:04 GMT; Path=/; httponly
|
196
|
+
X-Server-Response-Time:
|
197
|
+
- '190'
|
198
|
+
X-Dropbox-Request-Id:
|
199
|
+
- e809ad60009c237e74cc3b310e0c6b07
|
200
|
+
Pragma:
|
201
|
+
- no-cache
|
202
|
+
Cache-Control:
|
203
|
+
- no-cache
|
204
|
+
X-Dropbox-Http-Protocol:
|
205
|
+
- None
|
206
|
+
X-Frame-Options:
|
207
|
+
- SAMEORIGIN
|
208
|
+
X-Requestid:
|
209
|
+
- 86af155e21ffc7b91c3003e1e9628c86
|
210
|
+
body:
|
211
|
+
encoding: UTF-8
|
212
|
+
string: '{"revision": 66, "rev": "421f47d8b3", "thumb_exists": false, "bytes":
|
213
|
+
9, "modified": "Mon, 10 Feb 2014 20:30:04 +0000", "client_mtime": "Mon, 10
|
214
|
+
Feb 2014 20:29:58 +0000", "path": "/qux.txt", "is_dir": false, "icon": "page_white_text",
|
215
|
+
"root": "dropbox", "mime_type": "text/plain", "size": "9 bytes"}'
|
216
|
+
http_version:
|
217
|
+
recorded_at: Mon, 10 Feb 2014 20:30:06 GMT
|
218
|
+
- request:
|
219
|
+
method: get
|
220
|
+
uri: https://api.dropbox.com/1/metadata/dropbox/qux.txt
|
221
|
+
body:
|
222
|
+
encoding: US-ASCII
|
223
|
+
string: ''
|
224
|
+
headers:
|
225
|
+
Accept-Encoding:
|
226
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
227
|
+
Accept:
|
228
|
+
- '*/*'
|
229
|
+
User-Agent:
|
230
|
+
- OAuth gem v0.4.7
|
231
|
+
Authorization:
|
232
|
+
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
233
|
+
response:
|
234
|
+
status:
|
235
|
+
code: 200
|
236
|
+
message: OK
|
237
|
+
headers:
|
238
|
+
Server:
|
239
|
+
- nginx
|
240
|
+
Date:
|
241
|
+
- Mon, 10 Feb 2014 20:30:05 GMT
|
242
|
+
Content-Type:
|
243
|
+
- text/javascript
|
244
|
+
Transfer-Encoding:
|
245
|
+
- chunked
|
246
|
+
Connection:
|
247
|
+
- keep-alive
|
248
|
+
X-Server-Response-Time:
|
249
|
+
- '40'
|
250
|
+
X-Dropbox-Request-Id:
|
251
|
+
- 26157079463da49a00d10c4789f22774
|
252
|
+
Pragma:
|
253
|
+
- no-cache
|
254
|
+
Cache-Control:
|
255
|
+
- no-cache
|
256
|
+
X-Dropbox-Http-Protocol:
|
257
|
+
- None
|
258
|
+
X-Frame-Options:
|
259
|
+
- SAMEORIGIN
|
260
|
+
X-Requestid:
|
261
|
+
- 40ca46bde0342e40fddd6dd2f39fcf26
|
262
|
+
body:
|
263
|
+
encoding: UTF-8
|
264
|
+
string: '{"revision": 66, "rev": "421f47d8b3", "thumb_exists": false, "bytes":
|
265
|
+
9, "modified": "Mon, 10 Feb 2014 20:30:04 +0000", "client_mtime": "Mon, 10
|
266
|
+
Feb 2014 20:29:58 +0000", "path": "/qux.txt", "is_dir": false, "icon": "page_white_text",
|
267
|
+
"root": "dropbox", "mime_type": "text/plain", "size": "9 bytes"}'
|
268
|
+
http_version:
|
269
|
+
recorded_at: Mon, 10 Feb 2014 20:30:06 GMT
|
270
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,166 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://api-content.dropbox.com/1/files_put/dropbox/qux.txt
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: spec 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:54:09 GMT
|
31
|
+
Content-Type:
|
32
|
+
- text/javascript
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
X-Server-Response-Time:
|
38
|
+
- '417'
|
39
|
+
X-Dropbox-Request-Id:
|
40
|
+
- c7023dba065453cfb08e478549381a0b
|
41
|
+
Pragma:
|
42
|
+
- no-cache
|
43
|
+
Cache-Control:
|
44
|
+
- no-cache
|
45
|
+
X-Requestid:
|
46
|
+
- 8ce308dbae99c77204ab419f37807c25
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"revision": 110, "rev": "6e1f47d8b3", "thumb_exists": false, "bytes":
|
50
|
+
9, "modified": "Mon, 10 Feb 2014 20:54:09 +0000", "client_mtime": "Mon, 10
|
51
|
+
Feb 2014 20:54:09 +0000", "path": "/qux.txt", "is_dir": false, "icon":
|
52
|
+
"page_white_text", "root": "dropbox", "mime_type": "text/plain", "size": "9
|
53
|
+
bytes"}'
|
54
|
+
http_version:
|
55
|
+
recorded_at: Mon, 10 Feb 2014 20:54:11 GMT
|
56
|
+
- request:
|
57
|
+
method: put
|
58
|
+
uri: https://api-content.dropbox.com/1/files_put/dropbox/qux.txt
|
59
|
+
body:
|
60
|
+
encoding: UTF-8
|
61
|
+
string: Updated content
|
62
|
+
headers:
|
63
|
+
Content-Type:
|
64
|
+
- application/octet-stream
|
65
|
+
Content-Length:
|
66
|
+
- '15'
|
67
|
+
Accept-Encoding:
|
68
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
69
|
+
Accept:
|
70
|
+
- '*/*'
|
71
|
+
User-Agent:
|
72
|
+
- OAuth gem v0.4.7
|
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:54:13 GMT
|
84
|
+
Content-Type:
|
85
|
+
- text/javascript
|
86
|
+
Transfer-Encoding:
|
87
|
+
- chunked
|
88
|
+
Connection:
|
89
|
+
- keep-alive
|
90
|
+
X-Server-Response-Time:
|
91
|
+
- '1124'
|
92
|
+
X-Dropbox-Request-Id:
|
93
|
+
- 5c2830e7dcd97d95179906f72765b4d4
|
94
|
+
Pragma:
|
95
|
+
- no-cache
|
96
|
+
Cache-Control:
|
97
|
+
- no-cache
|
98
|
+
X-Requestid:
|
99
|
+
- 751e0fc6523a5720573f1946e257bd1d
|
100
|
+
body:
|
101
|
+
encoding: UTF-8
|
102
|
+
string: '{"revision": 111, "rev": "6f1f47d8b3", "thumb_exists": false, "bytes":
|
103
|
+
15, "modified": "Mon, 10 Feb 2014 20:54:13 +0000", "client_mtime": "Mon, 10
|
104
|
+
Feb 2014 20:54:13 +0000", "path": "/qux.txt", "is_dir": false, "icon":
|
105
|
+
"page_white_text", "root": "dropbox", "mime_type": "text/plain", "size": "15
|
106
|
+
bytes"}'
|
107
|
+
http_version:
|
108
|
+
recorded_at: Mon, 10 Feb 2014 20:54:15 GMT
|
109
|
+
- request:
|
110
|
+
method: get
|
111
|
+
uri: https://api.dropbox.com/1/revisions/dropbox/qux.txt
|
112
|
+
body:
|
113
|
+
encoding: US-ASCII
|
114
|
+
string: ''
|
115
|
+
headers:
|
116
|
+
Accept-Encoding:
|
117
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
118
|
+
Accept:
|
119
|
+
- '*/*'
|
120
|
+
User-Agent:
|
121
|
+
- OAuth gem v0.4.7
|
122
|
+
Authorization:
|
123
|
+
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
124
|
+
response:
|
125
|
+
status:
|
126
|
+
code: 200
|
127
|
+
message: OK
|
128
|
+
headers:
|
129
|
+
Server:
|
130
|
+
- nginx
|
131
|
+
Date:
|
132
|
+
- Mon, 10 Feb 2014 20:54:16 GMT
|
133
|
+
Content-Type:
|
134
|
+
- text/javascript
|
135
|
+
Transfer-Encoding:
|
136
|
+
- chunked
|
137
|
+
Connection:
|
138
|
+
- keep-alive
|
139
|
+
X-Server-Response-Time:
|
140
|
+
- '39'
|
141
|
+
X-Dropbox-Request-Id:
|
142
|
+
- 4c63e67b6d1749839c9e5380d1a829f3
|
143
|
+
Pragma:
|
144
|
+
- no-cache
|
145
|
+
Cache-Control:
|
146
|
+
- no-cache
|
147
|
+
X-Dropbox-Http-Protocol:
|
148
|
+
- None
|
149
|
+
X-Frame-Options:
|
150
|
+
- SAMEORIGIN
|
151
|
+
X-Requestid:
|
152
|
+
- 40183151f26b3850df36f431d4f8a730
|
153
|
+
body:
|
154
|
+
encoding: UTF-8
|
155
|
+
string: '[{"revision": 111, "rev": "6f1f47d8b3", "thumb_exists": false, "bytes":
|
156
|
+
15, "modified": "Mon, 10 Feb 2014 20:54:13 +0000", "client_mtime": "Mon, 10
|
157
|
+
Feb 2014 20:54:13 +0000", "path": "/qux.txt", "is_dir": false, "icon":
|
158
|
+
"page_white_text", "root": "dropbox", "mime_type": "text/plain", "size": "15
|
159
|
+
bytes"}, {"revision": 110, "rev": "6e1f47d8b3", "thumb_exists": false, "bytes":
|
160
|
+
9, "modified": "Mon, 10 Feb 2014 20:54:09 +0000", "client_mtime": "Mon, 10
|
161
|
+
Feb 2014 20:54:09 +0000", "path": "/qux.txt", "is_dir": false, "icon":
|
162
|
+
"page_white_text", "root": "dropbox", "mime_type": "text/plain", "size": "9
|
163
|
+
bytes"}]'
|
164
|
+
http_version:
|
165
|
+
recorded_at: Mon, 10 Feb 2014 20:54:18 GMT
|
166
|
+
recorded_with: VCR 2.8.0
|