cloudapp 1.1.0 → 2.0.0.beta.1

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 (87) hide show
  1. data/CHANGELOG.md +3 -0
  2. data/Gemfile.lock +18 -34
  3. data/README.md +2 -1
  4. data/Rakefile +5 -1
  5. data/cloudapp.gemspec +50 -41
  6. data/lib/cloudapp/account.rb +111 -0
  7. data/lib/cloudapp/authorized_representation.rb +17 -0
  8. data/lib/cloudapp/collection_json/item.rb +20 -0
  9. data/lib/cloudapp/collection_json/representation.rb +74 -0
  10. data/lib/cloudapp/collection_json/template.rb +17 -0
  11. data/lib/cloudapp/collection_json/tint.rb +11 -0
  12. data/lib/cloudapp/collection_json.rb +3 -0
  13. data/lib/cloudapp/drop.rb +22 -6
  14. data/lib/cloudapp/drop_collection.rb +22 -0
  15. data/lib/cloudapp/service.rb +172 -0
  16. data/lib/cloudapp/token.rb +27 -0
  17. data/lib/cloudapp.rb +5 -1
  18. data/man/cloudapp.1 +202 -45
  19. data/man/cloudapp.1.html +114 -42
  20. data/man/cloudapp.1.ronn +125 -45
  21. data/spec/cassettes/create_bookmark.yml +255 -0
  22. data/spec/cassettes/create_bookmark_with_name.yml +266 -0
  23. data/spec/cassettes/create_bookmark_with_privacy.yml +277 -0
  24. data/spec/cassettes/delete_drop.yml +383 -0
  25. data/spec/cassettes/list_drops.yml +139 -0
  26. data/spec/cassettes/list_drops_with_bad_token.yml +57 -0
  27. data/spec/cassettes/list_drops_with_filter.yml +209 -0
  28. data/spec/cassettes/list_drops_with_href.yml +287 -0
  29. data/spec/cassettes/list_drops_with_href_and_filter.yml +287 -0
  30. data/spec/cassettes/list_drops_with_href_and_limit.yml +287 -0
  31. data/spec/cassettes/list_drops_with_limit.yml +211 -0
  32. data/spec/cassettes/list_drops_with_nil_href.yml +139 -0
  33. data/spec/cassettes/purge_drops.yml +1103 -0
  34. data/spec/cassettes/recover_drop.yml +628 -0
  35. data/spec/cassettes/rename_drop.yml +367 -0
  36. data/spec/cassettes/setup_drops.yml +968 -0
  37. data/spec/cassettes/token_for_account.yml +127 -0
  38. data/spec/cassettes/token_for_account_with_bad_credentials.yml +115 -0
  39. data/spec/cassettes/trash_drop.yml +478 -0
  40. data/spec/cassettes/update_drop_bookmark_url.yml +379 -0
  41. data/spec/cassettes/update_file.yml +573 -0
  42. data/spec/cassettes/upload_file.yml +470 -0
  43. data/spec/cassettes/upload_file_with_name.yml +484 -0
  44. data/spec/cassettes/upload_file_with_privacy.yml +495 -0
  45. data/spec/cassettes/view_drop.yml +73 -0
  46. data/spec/cloudapp/account_spec.rb +166 -0
  47. data/spec/cloudapp/authorized_representation_spec.rb +32 -0
  48. data/spec/cloudapp/collection_json/item_spec.rb +45 -0
  49. data/spec/cloudapp/collection_json/representation_spec.rb +118 -0
  50. data/spec/cloudapp/collection_json/template_spec.rb +53 -0
  51. data/spec/cloudapp/drop_collection_spec.rb +63 -0
  52. data/spec/cloudapp/drop_spec.rb +81 -51
  53. data/spec/cloudapp/service_spec.rb +357 -0
  54. data/spec/cloudapp/token_spec.rb +33 -0
  55. data/spec/integration_spec.rb +100 -0
  56. data/spec/support/stub_class_or_module.rb +6 -3
  57. data/spec/support/vcr.rb +21 -5
  58. metadata +84 -106
  59. data/bin/cloudapp +0 -184
  60. data/lib/cloudapp/config.rb +0 -39
  61. data/lib/cloudapp/drop_content.rb +0 -34
  62. data/lib/cloudapp/drop_presenter.rb +0 -80
  63. data/lib/cloudapp/drop_service.rb +0 -255
  64. data/lib/cloudapp/identity.rb +0 -14
  65. data/spec/cassettes/DropContent/download.yml +0 -116
  66. data/spec/cassettes/DropService/create_bookmark.yml +0 -105
  67. data/spec/cassettes/DropService/create_bookmark_with_bad_credentials.yml +0 -39
  68. data/spec/cassettes/DropService/create_bookmark_with_name.yml +0 -105
  69. data/spec/cassettes/DropService/create_private_bookmark.yml +0 -105
  70. data/spec/cassettes/DropService/create_public_bookmark.yml +0 -105
  71. data/spec/cassettes/DropService/drop.yml +0 -81
  72. data/spec/cassettes/DropService/list_drops.yml +0 -135
  73. data/spec/cassettes/DropService/list_drops_with_bad_credentials.yml +0 -39
  74. data/spec/cassettes/DropService/list_drops_with_limit.yml +0 -117
  75. data/spec/cassettes/DropService/list_trash.yml +0 -111
  76. data/spec/cassettes/DropService/list_trash_with_bad_credentials.yml +0 -39
  77. data/spec/cassettes/DropService/retrieve_token.yml +0 -42
  78. data/spec/cassettes/DropService/retrieve_token_with_bad_credentials.yml +0 -43
  79. data/spec/cassettes/DropService/upload_file.yml +0 -291
  80. data/spec/cassettes/DropService/upload_public_file.yml +0 -293
  81. data/spec/cloudapp/config_spec.rb +0 -59
  82. data/spec/cloudapp/drop_content_spec.rb +0 -21
  83. data/spec/cloudapp/drop_presenter_spec.rb +0 -120
  84. data/spec/cloudapp/drop_service_spec.rb +0 -400
  85. data/spec/cloudapp/identity_spec.rb +0 -27
  86. data/spec/support/fakefs_rspec.rb +0 -5
  87. data/spec/support/vcr_rspec.rb +0 -9
data/man/cloudapp.1.html CHANGED
@@ -83,11 +83,14 @@
83
83
 
84
84
  <h2 id="SYNOPSIS">SYNOPSIS</h2>
85
85
 
86
- <p><code>cloudapp</code> [<code>--format</code>=<var>format</var>] <var>command</var> [<var>args</var>]<br />
87
- <code>cloudapp list</code> [<code>--count</code>=<var>count</var>]<br />
88
- <code>cloudapp bookmark</code> [<code>--private</code>] [<code>--public</code>] <var>url</var> [<var>url</var>...]<br />
89
- <code>cloudapp upload</code> [<code>--private</code>] [<code>--public</code>] <var>file</var> [<var>file</var>...]<br />
90
- <code>cloudapp download</code> [<code>--output</code>=<var>file</var>] <var>url</var></p>
86
+ <p><code>cloudapp</code> [<var>global</var>] <code>list</code> [<var>options</var>]<br />
87
+ <code>cloudapp</code> [<var>global</var>] <code>details</code> <var>href</var> [<var>href</var>...]<br />
88
+ <code>cloudapp</code> [<var>global</var>] <code>bookmark</code> [<var>options</var>] <var>url</var> [<var>url</var>...]<br />
89
+ <code>cloudapp</code> [<var>global</var>] <code>upload</code> [<var>options</var>] <var>file</var> [<var>file</var>...]<br />
90
+ <code>cloudapp</code> [<var>global</var>] <code>update</code> [<var>options</var>] <var>href</var> [<var>href</var>...]<br />
91
+ <code>cloudapp</code> [<var>global</var>] <code>trash</code> <var>href</var> [<var>href</var>...]<br />
92
+ <code>cloudapp</code> [<var>global</var>] <code>recover</code> <var>href</var> [<var>href</var>...]<br />
93
+ <code>cloudapp</code> [<var>global</var>] <code>delete</code> <var>href</var> [<var>href</var>...]</p>
91
94
 
92
95
  <h2 id="DESCRIPTION">DESCRIPTION</h2>
93
96
 
@@ -98,7 +101,7 @@ terminal and other times it's the only tool available.</p>
98
101
  <h2 id="GLOBAL-OPTIONS">GLOBAL OPTIONS</h2>
99
102
 
100
103
  <dl>
101
- <dt><code>-f</code> <var>format</var>, <code>--format</code>=<var>format</var></dt><dd>Output using either <strong>pretty</strong> or <strong>csv</strong> format. (Default: <strong>pretty</strong> when
104
+ <dt><code>-f</code> <var>pretty,csv</var>, <code>--format</code>=<var>pretty,csv</var></dt><dd>Output using either <strong>pretty</strong> or <strong>csv</strong> format. (Default: <strong>pretty</strong> when
102
105
  output to a terminal and <strong>csv</strong> when output is piped to another program.)</dd>
103
106
  </dl>
104
107
 
@@ -106,21 +109,30 @@ output to a terminal and <strong>csv</strong> when output is piped to another pr
106
109
  <h2 id="COMMANDS">COMMANDS</h2>
107
110
 
108
111
  <dl>
109
- <dt><code>bookmark</code> [<code>--private</code>] [<code>--public</code>] [<var>url</var>...]</dt><dd><p>Create a new bookmark to each <var>url</var> and print each link.</p></dd>
110
- <dt><code>download</code> [<code>--output</code>=<var>file</var>] <var>url</var></dt><dd><p>Download the file at <var>url</var> to the current directory or to <var>file</var> if present.</p></dd>
111
- <dt><code>list</code> [<code>--count</code>=<var>count</var>]</dt><dd><p>List the most recent <var>count</var> drops. The default is to list <strong>20</strong> drops.</p></dd>
112
- <dt><code>upload</code> [<code>--private</code>] [<code>--public</code>] <var>file</var> [<var>file</var>...]</dt><dd><p>Upload each <var>file</var> and print each link.</p></dd>
112
+ <dt><code>--bookmark</code>=<var>url</var></dt><dd><p>Update the drop converting it into a bookmark to <var>url</var>.</p></dd>
113
+ <dt><code>bookmark</code> [<code>--private</code>] [<code>--public</code>] <var>url</var> [<var>url</var>...]</dt><dd><p>Create a new bookmark to each <var>url</var> and print the share links.</p></dd>
114
+ <dt><code>delete</code> <var>href</var> [<var>href</var>...]</dt><dd><p>Delete each drop at <var>href</var> immediately and bypass the trash.</p></dd>
115
+ <dt><code>details</code> <var>href</var> [<var>href</var>...]</dt><dd><p>View the details of each drop at <var>href</var>.</p></dd>
116
+ <dt><code>list</code>, <code>ls</code> [<code>--count</code>=<var>count</var>] [<code>--filter</code>=<var>active,trash,all</var>]</dt><dd><p>List the newest <var>count</var> of <var>filter</var> drops. The default is to list <strong>20
117
+ active</strong> drops.</p></dd>
118
+ <dt><code>recover</code> <var>href</var> [<var>href</var>...]</dt><dd><p>Recover each drop at <var>href</var> from the trash.</p></dd>
119
+ <dt><code>trash</code> <var>href</var> [<var>href</var>...]</dt><dd><p>Send each drop at <var>href</var> to the trash.</p></dd>
120
+ <dt><code>update</code> [<code>--name</code>=<var>name</var>] [<code>--private</code>] [<code>--public</code>] [<code>--bookmark</code>=<var>url</var>] [<code>--file</code>=<var>file</var>] <var>href</var> [<var>href</var>...]</dt><dd><p>Update the name, privacy, bookmark link, or file of each drop at <var>href</var>.</p></dd>
121
+ <dt><code>upload</code> [<code>--private</code>] [<code>--public</code>] <var>file</var> [<var>file</var>...]</dt><dd><p>Upload each <var>file</var> and print the share links.</p></dd>
113
122
  </dl>
114
123
 
115
124
 
116
125
  <h2 id="COMMAND-OPTIONS">COMMAND OPTIONS</h2>
117
126
 
118
127
  <dl>
128
+ <dt><code>--bookmark</code>=<var>url</var></dt><dd><p>Update the drop converting it into a bookmark to <var>url</var>.</p></dd>
129
+ <dt><code>--file</code>=<var>file</var></dt><dd><p>Update the drop converting it into a file and replacing its content with
130
+ <var>file</var>.</p></dd>
131
+ <dt><code>--filter</code>=<var>active,trash,all</var></dt><dd><p>Show <var>filter</var> drops. (Default: <strong>active</strong>)</p></dd>
119
132
  <dt><code>-n</code> <var>count</var>, <code>--count</code>=<var>count</var></dt><dd><p>Display <var>count</var> drops. (Default: <strong>20</strong>)</p></dd>
120
- <dt><code>-o</code> <var>file</var>, <code>--output</code>=<var>file</var></dt><dd><p>Download file as <var>file</var>. (Default: current directory using the remote file's
121
- name)</p></dd>
122
- <dt><code>--private</code></dt><dd><p>Use a private (long) link when creating a new drop.</p></dd>
123
- <dt><code>--public</code></dt><dd><p>Use a public (short) link when creating a new drop.</p></dd>
133
+ <dt><code>--name</code>=<var>name</var></dt><dd><p>Update the drop's name to <var>name</var>.</p></dd>
134
+ <dt><code>--private</code></dt><dd><p>Use a private (long) link for the drop.</p></dd>
135
+ <dt><code>--public</code></dt><dd><p>Use a public (short) link for the drop.</p></dd>
124
136
  </dl>
125
137
 
126
138
 
@@ -130,39 +142,69 @@ name)</p></dd>
130
142
 
131
143
  <h2 id="EXAMPLES">EXAMPLES</h2>
132
144
 
133
- <p>List newest 20 drops:</p>
145
+ <p>List the newest drops:</p>
134
146
 
135
147
  <pre><code>$ cloudapp list
136
- Name Link Views
137
- favicon.ico http://cl.ly/0P28... 3
138
- The Hitchhiker's Guide http://cl.ly/3I28... 4
139
- CloudApp 1.5 Released http://cl.ly/0s1o... 4
140
- Cover.jpeg http://cl.ly/1x20... 1
141
- Chapter 1.md http://cl.ly/3U3d... 7
142
- CloudApp http://cl.ly/2O2J... 3
148
+ Name Views Href
149
+ favicon.ico 1 http://api.getcloudapp.com/...
150
+ The Hitchhiker's Guide 0 http://api.getcloudapp.com/...
151
+ CloudApp 1.5 Released 5 http://api.getcloudapp.com/...
152
+ Cover.jpeg 23 http://api.getcloudapp.com/...
153
+ Chapter 1.md 8 http://api.getcloudapp.com/...
154
+ CloudApp 3 http://api.getcloudapp.com/...
143
155
  ...
144
156
  </code></pre>
145
157
 
146
- <p>List newest 5 drops:</p>
158
+ <p>List the 5 newest drops:</p>
147
159
 
148
160
  <pre><code>$ cloudapp list --count=5
149
- Name Link Views
150
- favicon.ico http://cl.ly/0P28... 3
151
- The Hitchhiker's Guide http://cl.ly/3I28... 4
152
- CloudApp 1.5 Released http://cl.ly/0s1o... 4
153
- Cover.jpeg http://cl.ly/1x20... 1
154
- Chapter 1.md http://cl.ly/3U3d... 7
161
+ Name Views Href
162
+ favicon.ico 1 http://api.getcloudapp.com/...
163
+ The Hitchhiker's Guide 0 http://api.getcloudapp.com/...
164
+ CloudApp 1.5 Released 5 http://api.getcloudapp.com/...
165
+ Cover.jpeg 23 http://api.getcloudapp.com/...
166
+ Chapter 1.md 8 http://api.getcloudapp.com/...
167
+ </code></pre>
168
+
169
+ <p>List newest, deleted drops:</p>
170
+
171
+ <pre><code>$ cloudapp list --filter=trash
172
+ Name Views Href
173
+ Delete Me 0 http://api.getcloudapp.com/...
174
+ ...
155
175
  </code></pre>
156
176
 
157
177
  <p>List newest 5 drops in CSV format:</p>
158
178
 
159
179
  <pre><code>$ cloudapp --format=csv list --count=5
160
- Name,Link,Views
161
- favicon.ico,http://cl.ly/0P28...,3
162
- The Hitchhiker's Guide to the Galaxy,http://cl.ly/3I28...,4
163
- 2011-05-03-cloudapp-1.5-released.md,http://cl.ly/0s1o...,4
164
- Cover.jpeg,http://cl.ly/1x20...,1
165
- Chapter 1.md,http://cl.ly/3U3d...,7
180
+ Name,Href,Share,Views
181
+ favicon.ico,http://api.getcloudapp.com/...,http://cl.ly/0P28...,3
182
+ The Hitchhiker's Guide to the Galaxy,http://api.getcloudapp.com/...,http://cl.ly/3I28...,4
183
+ 2011-05-03-cloudapp-1.5-released.md,http://api.getcloudapp.com/...,http://cl.ly/0s1o...,4
184
+ Cover.jpeg,http://api.getcloudapp.com/...,http://cl.ly/1x20...,1
185
+ Chapter 1.md,http://api.getcloudapp.com/...,http://cl.ly/3U3d...,7
186
+ </code></pre>
187
+
188
+ <p>View the details of a drop by its <strong>href</strong>:</p>
189
+
190
+ <pre><code>$ cloudapp details http://api.getcloudapp.com/drops/12345
191
+ Details
192
+ Name: Cover.jpeg
193
+ Views: 23
194
+ Privacy: Private
195
+
196
+ Links
197
+ Share: http://cl.ly/1x200A0m3v101d1n2O1u
198
+ Embed: http://cl.ly/1x200A0m3v101d1n2O1u/Cover.jpeg
199
+ Download: http://cl.ly/1x200A0m3v101d1n2O1u/download/Cover.jpeg
200
+ Href: http://api.getcloudapp.com/drops/13949858
201
+ </code></pre>
202
+
203
+ <p>View the details of a drop in CSV format:</p>
204
+
205
+ <pre><code>$ cloudapp --format=csv details http://api.getcloudapp.com/drops/12345
206
+ Name,Created,Privacy,Share,Embed,Download
207
+ Cover.jpg,2012-01-12T20:44:58Z,private,http://cl.ly/1x20...,http://cl.ly/1x20...,http://cl.ly/1x20...
166
208
  </code></pre>
167
209
 
168
210
  <p>Share a new bookmark to <strong>http://douglasadams.com</strong>:</p>
@@ -189,16 +231,46 @@ $ cloudapp upload screenshot.png | pbcopy
189
231
  http://cl.ly/1y0j403g3D0c0X1G0R3m
190
232
  </code></pre>
191
233
 
192
- <p>Download a drop to the current direcctory:</p>
234
+ <p>Update a drop with a new name and privacy:</p>
235
+
236
+ <pre><code>$ cloudapp update --public \
237
+ --name='The Late, Great Douglas Adams' \
238
+ http://api.getcloudapp.com/drops/12345
239
+ Updating... http://cl.ly/abc123
240
+ </code></pre>
241
+
242
+ <p>Update a drop with a new bookmark URL:</p>
243
+
244
+ <pre><code>$ cloudapp update --bookmark=http://douglasadams.com \
245
+ http://api.getcloudapp.com/drops/12345
246
+ Updating... http://cl.ly/1y0j403g3D0c0X1G0R3m
247
+ </code></pre>
248
+
249
+ <p>Update a drop with a new file:</p>
250
+
251
+ <pre><code>$ cloudapp update --file=screenshot.png \
252
+ http://api.getcloudapp.com/drops/12345
253
+ Updating... http://cl.ly/1y0j403g3D0c0X1G0R3m
254
+ </code></pre>
255
+
256
+ <p>Trash a drop:</p>
257
+
258
+ <pre><code>$ cloudapp trash http://api.getcloudapp.com/drops/12345
259
+ Trashing http://api.getcloudapp.dev/drops/12345... done
260
+ </code></pre>
261
+
262
+ <p>Recovering a drop:</p>
193
263
 
194
- <pre><code>$ cloudapp download http://cl.ly/040u2o3X1w0z1z3n2T04
195
- Downloading screenshot.png... done
264
+ <pre><code>$ cloudapp recover http://api.getcloudapp.com/drops/12345
265
+ Recovering http://api.getcloudapp.dev/drops/12345... http://cl.ly/1y0j...
196
266
  </code></pre>
197
267
 
198
- <p>Download a drop to another path:</p>
268
+ <p>Deleting a drop:</p>
199
269
 
200
- <pre><code>$ cloudapp download --output=/Users/Larry/image.png http://cl.ly/040u2o3X1w0z1z3n2T04
201
- Downloading screenshot.png to /Users/Larry... done
270
+ <pre><code>$ cloudapp trash http://api.getcloudapp.com/drops/12345
271
+ Delete http://api.getcloudapp.dev/drops/12345 forever? (y/n)
272
+ yes
273
+ Deleting http://api.getcloudapp.dev/drops/12345... done
202
274
  </code></pre>
203
275
 
204
276
  <h2 id="LICENSE">LICENSE</h2>
@@ -208,7 +280,7 @@ Downloading screenshot.png to /Users/Larry... done
208
280
 
209
281
  <ol class='man-decor man-foot man foot'>
210
282
  <li class='tl'></li>
211
- <li class='tc'>February 2012</li>
283
+ <li class='tc'>May 2012</li>
212
284
  <li class='tr'>cloudapp(1)</li>
213
285
  </ol>
214
286
 
data/man/cloudapp.1.ronn CHANGED
@@ -3,11 +3,14 @@ cloudapp(1) -- All the pleasures of CloudApp now at your terminal
3
3
 
4
4
  ## SYNOPSIS
5
5
 
6
- `cloudapp` [`--format`=<format>] <command> [<args>]<br>
7
- `cloudapp list` [`--count`=<count>]<br>
8
- `cloudapp bookmark` [`--private`] [`--public`] <url> [<url>...]<br>
9
- `cloudapp upload` [`--private`] [`--public`] <file> [<file>...]<br>
10
- `cloudapp download` [`--output`=<file>] <url>
6
+ `cloudapp` [<global>] `list` [<options>]<br>
7
+ `cloudapp` [<global>] `details` <href> [<href>...]<br>
8
+ `cloudapp` [<global>] `bookmark` [<options>] <url> [<url>...]<br>
9
+ `cloudapp` [<global>] `upload` [<options>] <file> [<file>...]<br>
10
+ `cloudapp` [<global>] `update` [<options>] <href> [<href>...]<br>
11
+ `cloudapp` [<global>] `trash` <href> [<href>...]<br>
12
+ `cloudapp` [<global>] `recover` <href> [<href>...]<br>
13
+ `cloudapp` [<global>] `delete` <href> [<href>...]
11
14
 
12
15
  ## DESCRIPTION
13
16
 
@@ -17,38 +20,63 @@ terminal and other times it's the only tool available.
17
20
 
18
21
  ## GLOBAL OPTIONS
19
22
 
20
- * `-f` <format>, `--format`=<format>:
23
+ * `-f` <pretty,csv>, `--format`=<pretty,csv>:
21
24
  Output using either **pretty** or **csv** format. (Default: **pretty** when
22
25
  output to a terminal and **csv** when output is piped to another program.)
23
26
 
24
27
  ## COMMANDS
25
28
 
26
- * `bookmark` [`--private`] [`--public`] [<url>...]:
27
- Create a new bookmark to each <url> and print each link.
29
+ * `--bookmark`=<url>:
30
+ Update the drop converting it into a bookmark to <url>.
28
31
 
29
- * `download` [`--output`=<file>] <url>:
30
- Download the file at <url> to the current directory or to <file> if present.
32
+ * `bookmark` [`--private`] [`--public`] <url> [<url>...]:
33
+ Create a new bookmark to each <url> and print the share links.
31
34
 
32
- * `list` [`--count`=<count>]:
33
- List the most recent <count> drops. The default is to list **20** drops.
35
+ * `delete` <href> [<href>...]:
36
+ Delete each drop at <href> immediately and bypass the trash.
37
+
38
+ * `details` <href> [<href>...]:
39
+ View the details of each drop at <href>.
40
+
41
+ * `list`, `ls` [`--count`=<count>] [`--filter`=<active,trash,all>]:
42
+ List the newest <count> of <filter> drops. The default is to list **20
43
+ active** drops.
44
+
45
+ * `recover` <href> [<href>...]:
46
+ Recover each drop at <href> from the trash.
47
+
48
+ * `trash` <href> [<href>...]:
49
+ Send each drop at <href> to the trash.
50
+
51
+ * `update` [`--name`=<name>] [`--private`] [`--public`] [`--bookmark`=<url>] [`--file`=<file>] <href> [<href>...]:
52
+ Update the name, privacy, bookmark link, or file of each drop at <href>.
34
53
 
35
54
  * `upload` [`--private`] [`--public`] <file> [<file>...]:
36
- Upload each <file> and print each link.
55
+ Upload each <file> and print the share links.
37
56
 
38
57
  ## COMMAND OPTIONS
39
58
 
59
+ * `--bookmark`=<url>:
60
+ Update the drop converting it into a bookmark to <url>.
61
+
62
+ * `--file`=<file>:
63
+ Update the drop converting it into a file and replacing its content with
64
+ <file>.
65
+
66
+ * `--filter`=<active,trash,all>:
67
+ Show <filter> drops. (Default: **active**)
68
+
40
69
  * `-n` <count>, `--count`=<count>:
41
70
  Display <count> drops. (Default: **20**)
42
71
 
43
- * `-o` <file>, `--output`=<file>:
44
- Download file as <file>. (Default: current directory using the remote file's
45
- name)
72
+ * `--name`=<name>:
73
+ Update the drop's name to <name>.
46
74
 
47
75
  * `--private`:
48
- Use a private (long) link when creating a new drop.
76
+ Use a private (long) link for the drop.
49
77
 
50
78
  * `--public`:
51
- Use a public (short) link when creating a new drop.
79
+ Use a public (short) link for the drop.
52
80
 
53
81
  ## REQUIREMENTS
54
82
 
@@ -56,37 +84,64 @@ terminal and other times it's the only tool available.
56
84
 
57
85
  ## EXAMPLES
58
86
 
59
- List newest 20 drops:
87
+ List the newest drops:
60
88
 
61
89
  $ cloudapp list
62
- Name Link Views
63
- favicon.ico http://cl.ly/0P28... 3
64
- The Hitchhiker's Guide http://cl.ly/3I28... 4
65
- CloudApp 1.5 Released http://cl.ly/0s1o... 4
66
- Cover.jpeg http://cl.ly/1x20... 1
67
- Chapter 1.md http://cl.ly/3U3d... 7
68
- CloudApp http://cl.ly/2O2J... 3
90
+ Name Views Href
91
+ favicon.ico 1 http://api.getcloudapp.com/...
92
+ The Hitchhiker's Guide 0 http://api.getcloudapp.com/...
93
+ CloudApp 1.5 Released 5 http://api.getcloudapp.com/...
94
+ Cover.jpeg 23 http://api.getcloudapp.com/...
95
+ Chapter 1.md 8 http://api.getcloudapp.com/...
96
+ CloudApp 3 http://api.getcloudapp.com/...
69
97
  ...
70
98
 
71
- List newest 5 drops:
99
+ List the 5 newest drops:
72
100
 
73
101
  $ cloudapp list --count=5
74
- Name Link Views
75
- favicon.ico http://cl.ly/0P28... 3
76
- The Hitchhiker's Guide http://cl.ly/3I28... 4
77
- CloudApp 1.5 Released http://cl.ly/0s1o... 4
78
- Cover.jpeg http://cl.ly/1x20... 1
79
- Chapter 1.md http://cl.ly/3U3d... 7
102
+ Name Views Href
103
+ favicon.ico 1 http://api.getcloudapp.com/...
104
+ The Hitchhiker's Guide 0 http://api.getcloudapp.com/...
105
+ CloudApp 1.5 Released 5 http://api.getcloudapp.com/...
106
+ Cover.jpeg 23 http://api.getcloudapp.com/...
107
+ Chapter 1.md 8 http://api.getcloudapp.com/...
108
+
109
+ List newest, deleted drops:
110
+
111
+ $ cloudapp list --filter=trash
112
+ Name Views Href
113
+ Delete Me 0 http://api.getcloudapp.com/...
114
+ ...
80
115
 
81
116
  List newest 5 drops in CSV format:
82
117
 
83
118
  $ cloudapp --format=csv list --count=5
84
- Name,Link,Views
85
- favicon.ico,http://cl.ly/0P28...,3
86
- The Hitchhiker's Guide to the Galaxy,http://cl.ly/3I28...,4
87
- 2011-05-03-cloudapp-1.5-released.md,http://cl.ly/0s1o...,4
88
- Cover.jpeg,http://cl.ly/1x20...,1
89
- Chapter 1.md,http://cl.ly/3U3d...,7
119
+ Name,Href,Share,Views
120
+ favicon.ico,http://api.getcloudapp.com/...,http://cl.ly/0P28...,3
121
+ The Hitchhiker's Guide to the Galaxy,http://api.getcloudapp.com/...,http://cl.ly/3I28...,4
122
+ 2011-05-03-cloudapp-1.5-released.md,http://api.getcloudapp.com/...,http://cl.ly/0s1o...,4
123
+ Cover.jpeg,http://api.getcloudapp.com/...,http://cl.ly/1x20...,1
124
+ Chapter 1.md,http://api.getcloudapp.com/...,http://cl.ly/3U3d...,7
125
+
126
+ View the details of a drop by its **href**:
127
+
128
+ $ cloudapp details http://api.getcloudapp.com/drops/12345
129
+ Details
130
+ Name: Cover.jpeg
131
+ Views: 23
132
+ Privacy: Private
133
+
134
+ Links
135
+ Share: http://cl.ly/1x200A0m3v101d1n2O1u
136
+ Embed: http://cl.ly/1x200A0m3v101d1n2O1u/Cover.jpeg
137
+ Download: http://cl.ly/1x200A0m3v101d1n2O1u/download/Cover.jpeg
138
+ Href: http://api.getcloudapp.com/drops/13949858
139
+
140
+ View the details of a drop in CSV format:
141
+
142
+ $ cloudapp --format=csv details http://api.getcloudapp.com/drops/12345
143
+ Name,Created,Privacy,Share,Embed,Download
144
+ Cover.jpg,2012-01-12T20:44:58Z,private,http://cl.ly/1x20...,http://cl.ly/1x20...,http://cl.ly/1x20...
90
145
 
91
146
  Share a new bookmark to **http://douglasadams.com**:
92
147
 
@@ -108,16 +163,41 @@ Share a new bookmark and output only the URL:
108
163
  $ cloudapp --format=csv bookmark http://douglasadams.com
109
164
  http://cl.ly/1y0j403g3D0c0X1G0R3m
110
165
 
111
- Download a drop to the current direcctory:
166
+ Update a drop with a new name and privacy:
167
+
168
+ $ cloudapp update --public \
169
+ --name='The Late, Great Douglas Adams' \
170
+ http://api.getcloudapp.com/drops/12345
171
+ Updating... http://cl.ly/abc123
172
+
173
+ Update a drop with a new bookmark URL:
174
+
175
+ $ cloudapp update --bookmark=http://douglasadams.com \
176
+ http://api.getcloudapp.com/drops/12345
177
+ Updating... http://cl.ly/1y0j403g3D0c0X1G0R3m
178
+
179
+ Update a drop with a new file:
180
+
181
+ $ cloudapp update --file=screenshot.png \
182
+ http://api.getcloudapp.com/drops/12345
183
+ Updating... http://cl.ly/1y0j403g3D0c0X1G0R3m
184
+
185
+ Trash a drop:
186
+
187
+ $ cloudapp trash http://api.getcloudapp.com/drops/12345
188
+ Trashing http://api.getcloudapp.dev/drops/12345... done
112
189
 
113
- $ cloudapp download http://cl.ly/040u2o3X1w0z1z3n2T04
114
- Downloading screenshot.png... done
190
+ Recovering a drop:
115
191
 
116
- Download a drop to another path:
192
+ $ cloudapp recover http://api.getcloudapp.com/drops/12345
193
+ Recovering http://api.getcloudapp.dev/drops/12345... http://cl.ly/1y0j...
117
194
 
118
- $ cloudapp download --output=/Users/Larry/image.png http://cl.ly/040u2o3X1w0z1z3n2T04
119
- Downloading screenshot.png to /Users/Larry... done
195
+ Deleting a drop:
120
196
 
197
+ $ cloudapp trash http://api.getcloudapp.com/drops/12345
198
+ Delete http://api.getcloudapp.dev/drops/12345 forever? (y/n)
199
+ yes
200
+ Deleting http://api.getcloudapp.dev/drops/12345... done
121
201
 
122
202
  ## LICENSE
123
203