cloudapp 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cloudapp (0.0.10)
4
+ cloudapp (0.0.11)
5
5
  addressable
6
6
  faraday (~> 0.8.0.rc2)
7
7
  formatador
@@ -24,7 +24,7 @@ GEM
24
24
  hookr (1.1.1)
25
25
  fail-fast (= 1.0.0)
26
26
  hpricot (0.8.6)
27
- leadlight (0.0.3)
27
+ leadlight (0.0.4)
28
28
  addressable
29
29
  faraday
30
30
  fattr
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # CloudApp Ruby Client
1
+ # CloudApp Ruby Client [![Build Status](https://secure.travis-ci.org/cloudapp/cloudapp.png)](http://travis-ci.org/cloudapp/cloudapp)
2
2
 
3
3
  Interact with the [CloudApp API][] from Ruby. Comes with a command line
4
4
  interface to CloudApp as an added bonus.
data/bin/cloudapp CHANGED
@@ -24,7 +24,7 @@ def check_for_credentials(global_options)
24
24
 
25
25
  exit_now! [
26
26
  'CloudApp credentials missing. Save them to ~/.cloudapp.rc using:',
27
- ' cloudapp --email=EMAIL --password=PASSWORD initconfig' ].join("\n"),
27
+ ' cloudapp --email=<email> --password=<password> initconfig' ].join("\n"),
28
28
  1
29
29
  end
30
30
 
@@ -38,6 +38,12 @@ def set_default_format(global_options)
38
38
  global_options[:format] = $stdout.tty? ? :pretty : :csv
39
39
  end
40
40
 
41
+ def privacy_from(options)
42
+ if options[:private] || options[:public]
43
+ options[:private] || !options[:public]
44
+ end
45
+ end
46
+
41
47
 
42
48
  include GLI
43
49
 
@@ -53,44 +59,70 @@ desc 'CloudApp account password'
53
59
  arg_name 'password'
54
60
  flag :password
55
61
 
56
- desc 'Output format (default: pretty for TTY, csv otherwise)'
62
+ desc 'Output format (default: pretty for tty, csv otherwise)'
57
63
  arg_name 'csv|pretty'
58
64
  flag [:f, :format]
59
65
 
60
- desc 'Create a new bookmark to each URL and print each link'
66
+ desc 'Create a new bookmark to each url and print each link'
61
67
  arg_name 'url [url...]'
62
68
  command [:bookmark, :shorten] do |c|
69
+
70
+ c.desc 'Use a private (long) link'
71
+ c.switch :private
72
+
73
+ c.desc 'Use a public (short) link'
74
+ c.switch :public
75
+
63
76
  c.action do |global_options, options, urls|
64
77
  check_for_credentials global_options
65
-
66
- url = URI.parse urls.first
67
- waiting = "Bookmarking #{ url }... "
68
78
  format = format_from global_options
79
+ private = privacy_from options
69
80
 
70
- CloudApp::DropPresenter.print(on: $stdout,
71
- waiting: waiting,
72
- format: format) do
73
- new_drop = service(global_options).create url: url
74
- new_drop.url
81
+ urls.each do |url|
82
+ url = URI.parse url
83
+ waiting = "Bookmarking #{ url }... "
84
+
85
+ CloudApp::DropPresenter.print(on: $stdout,
86
+ waiting: waiting,
87
+ format: format) do
88
+ new_options = { url: url }
89
+ new_options[:private] = private unless private.nil?
90
+
91
+ new_drop = service(global_options).create new_options
92
+ new_drop.url
93
+ end
75
94
  end
76
95
  end
77
96
  end
78
97
 
79
- desc 'Upload each FILE and print each link'
98
+ desc 'Upload each file and print each link'
80
99
  arg_name 'file [file...]'
81
100
  command :upload do |c|
101
+
102
+ c.desc 'Use a private (long) link'
103
+ c.switch :private
104
+
105
+ c.desc 'Use a public (short) link'
106
+ c.switch :public
107
+
82
108
  c.action do |global_options, options, files|
83
109
  check_for_credentials global_options
84
-
85
- file = Pathname.new files.first
86
- waiting = "Uploading #{ file }... "
87
110
  format = format_from global_options
111
+ private = privacy_from options
88
112
 
89
- CloudApp::DropPresenter.print(on: $stdout,
90
- waiting: waiting,
91
- format: format) do
92
- new_drop = service(global_options).create path: file
93
- new_drop.url
113
+ files.each do |file|
114
+ file = Pathname.new file
115
+ waiting = "Uploading #{ file }... "
116
+
117
+ CloudApp::DropPresenter.print(on: $stdout,
118
+ waiting: waiting,
119
+ format: format) do
120
+ new_options = { path: file }
121
+ new_options[:private] = private unless private.nil?
122
+
123
+ new_drop = service(global_options).create new_options
124
+ new_drop.url
125
+ end
94
126
  end
95
127
  end
96
128
  end
data/cloudapp.gemspec CHANGED
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  ## If your rubyforge_project name is different, then edit it and comment out
14
14
  ## the sub! line in the Rakefile
15
15
  s.name = 'cloudapp'
16
- s.version = '0.0.10'
17
- s.date = '2012-02-08'
16
+ s.version = '0.0.11'
17
+ s.date = '2012-02-10'
18
18
  s.rubyforge_project = 'cloudapp'
19
19
 
20
20
  ## Make sure your summary is short. The description may be as long
@@ -81,12 +81,16 @@ Gem::Specification.new do |s|
81
81
  man/cloudapp.1.ronn
82
82
  spec/cassettes/DropService/create_bookmark.yml
83
83
  spec/cassettes/DropService/create_bookmark_with_name.yml
84
+ spec/cassettes/DropService/create_private_bookmark.yml
85
+ spec/cassettes/DropService/create_public_bookmark.yml
84
86
  spec/cassettes/DropService/list_drops.yml
85
87
  spec/cassettes/DropService/list_drops_with_limit.yml
86
88
  spec/cassettes/DropService/list_trash.yml
87
89
  spec/cassettes/DropService/upload_file.yml
90
+ spec/cassettes/DropService/upload_public_file.yml
88
91
  spec/cloudapp/drop_presenter_spec.rb
89
92
  spec/cloudapp/drop_service_spec.rb
93
+ spec/cloudapp/drop_spec.rb
90
94
  spec/cloudapp/identity_spec.rb
91
95
  spec/helper.rb
92
96
  spec/support/files/favicon.ico
data/lib/cloudapp/drop.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  require 'ostruct'
2
2
  module CloudApp
3
3
  class Drop < OpenStruct
4
+ def private?() private == true end
5
+ def public? () !private? end
4
6
  end
5
7
  end
@@ -7,28 +7,34 @@ require 'cloudapp/drop'
7
7
  #
8
8
  # Usage:
9
9
  #
10
- # service = DropSerivce.as_identity email: 'arthur@dent.com',
11
- # password: 'towel'
10
+ # # Create a new service passing CloudApp account credentials:
11
+ # identity = Identity.from_config email: 'arthur@dent.com', password: 'towel'
12
+ # service = DropSerivce.as_identity identity
12
13
  #
13
- # # List all your drops
14
+ # # List all drops:
14
15
  # service.drops
15
16
  #
16
- # # Create a bookmark
17
+ # # Create a bookmark:
17
18
  # service.create url: 'http://getcloudapp.com', name: 'CloudApp'
18
19
  #
19
- # # Upload a file
20
+ # # Upload a file:
20
21
  # service.create path: #<Pathname>, name: 'Screen shot'
21
22
  #
22
- # # List all your trashed drops
23
+ # # Use a public (short) link for the new drop:
24
+ # service.create url: 'http://getcloudapp.com',
25
+ # name: 'CloudApp',
26
+ # private: false
27
+ #
28
+ # # List all trashed drops:
23
29
  # service.trash
24
30
  #
25
- # # Delete a drop
31
+ # # Delete a drop (not yet implemented):
26
32
  # service.drops.get(123).destroy
27
33
  #
28
- # # Delete a drop from the trash
34
+ # # Delete a drop from the trash (not yet implemented):
29
35
  # service.trash.get(123).destroy
30
36
  #
31
- # # Restore a drop from the trash
37
+ # # Restore a drop from the trash (not yet implemented):
32
38
  # service.trash.get(123).restore
33
39
  #
34
40
  module CloudApp
@@ -120,29 +126,29 @@ module CloudApp
120
126
  end
121
127
 
122
128
  def create(attributes)
123
- body = { item: {}}
124
-
125
- body[:item][:name] = attributes[:name] if attributes.key? :name
126
- body[:item][:redirect_url] = attributes[:url] if attributes.key? :url
129
+ options = { item: {}}
130
+ options[:item][:name] = attributes[:name] if attributes.key? :name
131
+ options[:item][:redirect_url] = attributes[:url] if attributes.key? :url
132
+ options[:item][:private] = attributes[:private] if attributes.key? :private
127
133
 
128
134
  if attributes.key? :path
129
- create_file attributes[:path], body
135
+ create_file attributes[:path], options
130
136
  else
131
- create_bookmark body
137
+ create_bookmark options
132
138
  end
133
139
  end
134
140
 
135
141
  protected
136
142
 
137
- def create_bookmark(body)
138
- root.link('drops').post({}, body).raise_on_error.
143
+ def create_bookmark(options)
144
+ root.link('drops').post({}, options).raise_on_error.
139
145
  submit_and_wait do |new_drop|
140
146
  return Drop.new new_drop
141
147
  end
142
148
  end
143
149
 
144
- def create_file(path, body)
145
- root.drops.link('create_file').get.raise_on_error.
150
+ def create_file(path, options)
151
+ root.drops.link('create_file').get(options).raise_on_error.
146
152
  submit_and_wait do |details|
147
153
  uri = Addressable::URI.parse details['url']
148
154
  file = Faraday::UploadIO.new File.open(path), 'image/png'
data/lib/cloudapp.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module CloudApp
2
- VERSION = '0.0.10'
2
+ VERSION = '0.0.11'
3
3
  end
data/man/cloudapp.1 CHANGED
@@ -13,15 +13,15 @@
13
13
  \fBcloudapp list\fR [\fB\-\-count\fR=\fIcount\fR]
14
14
  .
15
15
  .br
16
- \fBcloudapp bookmark\fR \fIurl\fR
16
+ \fBcloudapp bookmark\fR [\fB\-\-private\fR] [\fB\-\-public\fR] \fIurl\fR [\fIurl\fR\.\.\.]
17
17
  .
18
18
  .br
19
- \fBcloudapp upload\fR \fIfile\fR
19
+ \fBcloudapp upload\fR [\fB\-\-private\fR] [\fB\-\-public\fR] \fIfile\fR [\fIfile\fR\.\.\.]
20
20
  .
21
21
  .SH "DESCRIPTION"
22
22
  \fBcloudapp\fR is a simple, Unix\-friendly tool for CloudApp meant to augment the Mac and Web apps\. Sometimes it\'s more convenient to share without leaving the terminal and other times it\'s the only tool available\.
23
23
  .
24
- .SH "OPTIONS"
24
+ .SH "GLOBAL OPTIONS"
25
25
  .
26
26
  .TP
27
27
  \fB\-\-email\fR=\fIemail\fR
@@ -35,10 +35,6 @@ Use \fIpassword\fR for CloudApp account credentials\.
35
35
  \fB\-f\fR \fIformat\fR, \fB\-\-format\fR=\fIformat\fR
36
36
  Output using either \fBpretty\fR or \fBcsv\fR format\. (Default: \fBpretty\fR when output to a terminal and \fBcsv\fR when output is piped to another program\.)
37
37
  .
38
- .TP
39
- \fB\-n\fR \fIcount\fR, \fB\-\-count\fR=\fIcount\fR
40
- Display \fIcount\fR drops\. (Default: \fB20\fR)
41
- .
42
38
  .SH "COMMANDS"
43
39
  .
44
40
  .TP
@@ -46,13 +42,27 @@ Display \fIcount\fR drops\. (Default: \fB20\fR)
46
42
  List the most recent \fIcount\fR drops\. The default is to list \fB20\fR drops\.
47
43
  .
48
44
  .TP
49
- \fBbookmark\fR \fIurl\fR [\fIurl\fR\.\.\.]
45
+ \fBbookmark\fR [\fB\-\-private\fR] [\fB\-\-public\fR] [\fIurl\fR\.\.\.]
50
46
  Create a new bookmark to each \fIurl\fR and print each link\.
51
47
  .
52
48
  .TP
53
- \fBupload\fR \fIfile\fR [\fIfile\fR\.\.\.]
49
+ \fBupload\fR [\fB\-\-private\fR] [\fB\-\-public\fR] \fIfile\fR [\fIfile\fR\.\.\.]
54
50
  Upload each \fIfile\fR and print each link\.
55
51
  .
52
+ .SH "COMMAND OPTIONS"
53
+ .
54
+ .TP
55
+ \fB\-\-private\fR
56
+ Use a private (long) link when creating a new drop\.
57
+ .
58
+ .TP
59
+ \fB\-\-public\fR
60
+ Use a public (short) link when creating a new drop\.
61
+ .
62
+ .TP
63
+ \fB\-n\fR \fIcount\fR, \fB\-\-count\fR=\fIcount\fR
64
+ Display \fIcount\fR drops\. (Default: \fB20\fR)
65
+ .
56
66
  .SH "EXAMPLES"
57
67
  List newest 20 drops:
58
68
  .
data/man/cloudapp.1.html CHANGED
@@ -62,8 +62,9 @@
62
62
  <a href="#NAME">NAME</a>
63
63
  <a href="#SYNOPSIS">SYNOPSIS</a>
64
64
  <a href="#DESCRIPTION">DESCRIPTION</a>
65
- <a href="#OPTIONS">OPTIONS</a>
65
+ <a href="#GLOBAL-OPTIONS">GLOBAL OPTIONS</a>
66
66
  <a href="#COMMANDS">COMMANDS</a>
67
+ <a href="#COMMAND-OPTIONS">COMMAND OPTIONS</a>
67
68
  <a href="#EXAMPLES">EXAMPLES</a>
68
69
  <a href="#SECURITY-CONSIDERATIONS">SECURITY CONSIDERATIONS</a>
69
70
  <a href="#LICENSE">LICENSE</a>
@@ -84,8 +85,8 @@
84
85
 
85
86
  <p><code>cloudapp</code> [<code>--email</code>=<var>email</var>] [<code>--password</code>=<var>password</var>] <var>command</var> [<var>args</var>]<br />
86
87
  <code>cloudapp list</code> [<code>--count</code>=<var>count</var>]<br />
87
- <code>cloudapp bookmark</code> <var>url</var><br />
88
- <code>cloudapp upload</code> <var>file</var></p>
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>...]</p>
89
90
 
90
91
  <h2 id="DESCRIPTION">DESCRIPTION</h2>
91
92
 
@@ -93,14 +94,13 @@
93
94
  and Web apps. Sometimes it's more convenient to share without leaving the
94
95
  terminal and other times it's the only tool available.</p>
95
96
 
96
- <h2 id="OPTIONS">OPTIONS</h2>
97
+ <h2 id="GLOBAL-OPTIONS">GLOBAL OPTIONS</h2>
97
98
 
98
99
  <dl>
99
100
  <dt><code>--email</code>=<var>email</var></dt><dd><p>Use <var>email</var> for CloudApp account credentials.</p></dd>
100
101
  <dt><code>--password</code>=<var>password</var></dt><dd><p>Use <var>password</var> for CloudApp account credentials.</p></dd>
101
102
  <dt><code>-f</code> <var>format</var>, <code>--format</code>=<var>format</var></dt><dd><p>Output using either <strong>pretty</strong> or <strong>csv</strong> format. (Default: <strong>pretty</strong> when
102
103
  output to a terminal and <strong>csv</strong> when output is piped to another program.)</p></dd>
103
- <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>
104
104
  </dl>
105
105
 
106
106
 
@@ -108,8 +108,17 @@ output to a terminal and <strong>csv</strong> when output is piped to another pr
108
108
 
109
109
  <dl>
110
110
  <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>
111
- <dt><code>bookmark</code> <var>url</var> [<var>url</var>...]</dt><dd><p>Create a new bookmark to each <var>url</var> and print each link.</p></dd>
112
- <dt><code>upload</code> <var>file</var> [<var>file</var>...]</dt><dd><p>Upload each <var>file</var> and print each link.</p></dd>
111
+ <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>
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>
113
+ </dl>
114
+
115
+
116
+ <h2 id="COMMAND-OPTIONS">COMMAND OPTIONS</h2>
117
+
118
+ <dl>
119
+ <dt><code>--private</code></dt><dd><p>Use a private (long) link when creating a new drop.</p></dd>
120
+ <dt><code>--public</code></dt><dd><p>Use a public (short) link when creating a new drop.</p></dd>
121
+ <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>
113
122
  </dl>
114
123
 
115
124
 
data/man/cloudapp.1.ronn CHANGED
@@ -5,8 +5,8 @@ cloudapp(1) -- All the pleasures of CloudApp now at your terminal
5
5
 
6
6
  `cloudapp` [`--email`=<email>] [`--password`=<password>] <command> [<args>]<br>
7
7
  `cloudapp list` [`--count`=<count>]<br>
8
- `cloudapp bookmark` <url><br>
9
- `cloudapp upload` <file>
8
+ `cloudapp bookmark` [`--private`] [`--public`] <url> [<url>...]<br>
9
+ `cloudapp upload` [`--private`] [`--public`] <file> [<file>...]
10
10
 
11
11
  ## DESCRIPTION
12
12
 
@@ -14,7 +14,7 @@ cloudapp(1) -- All the pleasures of CloudApp now at your terminal
14
14
  and Web apps. Sometimes it's more convenient to share without leaving the
15
15
  terminal and other times it's the only tool available.
16
16
 
17
- ## OPTIONS
17
+ ## GLOBAL OPTIONS
18
18
 
19
19
  * `--email`=<email>:
20
20
  Use <email> for CloudApp account credentials.
@@ -26,20 +26,28 @@ terminal and other times it's the only tool available.
26
26
  Output using either **pretty** or **csv** format. (Default: **pretty** when
27
27
  output to a terminal and **csv** when output is piped to another program.)
28
28
 
29
- * `-n` <count>, `--count`=<count>:
30
- Display <count> drops. (Default: **20**)
31
-
32
29
  ## COMMANDS
33
30
 
34
31
  * `list` [`--count`=<count>]:
35
32
  List the most recent <count> drops. The default is to list **20** drops.
36
33
 
37
- * `bookmark` <url> [<url>...]:
34
+ * `bookmark` [`--private`] [`--public`] [<url>...]:
38
35
  Create a new bookmark to each <url> and print each link.
39
36
 
40
- * `upload` <file> [<file>...]:
37
+ * `upload` [`--private`] [`--public`] <file> [<file>...]:
41
38
  Upload each <file> and print each link.
42
39
 
40
+ ## COMMAND OPTIONS
41
+
42
+ * `--private`:
43
+ Use a private (long) link when creating a new drop.
44
+
45
+ * `--public`:
46
+ Use a public (short) link when creating a new drop.
47
+
48
+ * `-n` <count>, `--count`=<count>:
49
+ Display <count> drops. (Default: **20**)
50
+
43
51
  ## EXAMPLES
44
52
 
45
53
  List newest 20 drops:
@@ -0,0 +1,119 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://arthur%40dent.com:towel@my.cl.ly/
6
+ body: ''
7
+ headers:
8
+ Accept:
9
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
10
+ text/plain
11
+ response:
12
+ status:
13
+ code: 200
14
+ message: Unauthorized
15
+ headers:
16
+ Cache-Control:
17
+ - max-age=0, private, must-revalidate
18
+ - no-cache
19
+ Content-Type:
20
+ - application/json; charset=utf-8
21
+ - application/json; charset=utf-8
22
+ Server:
23
+ - thin 1.2.11 codename Bat-Shit Crazy
24
+ - thin 1.2.11 codename Bat-Shit Crazy
25
+ Www-Authenticate:
26
+ - Digest realm="Application", qop="auth", algorithm=MD5, nonce="MTMyODgyMDIzMjowODAxZTUzNzFjNDA4MjA0MGZjNTQ1ZDk0MTY3MDk5Nw==",
27
+ opaque="9eb56ccb2e8b017ae42bdb4739690863"
28
+ X-Runtime:
29
+ - '0.002135'
30
+ - '0.201625'
31
+ X-Ua-Compatible:
32
+ - IE=Edge,chrome=1
33
+ - IE=Edge,chrome=1
34
+ Transfer-Encoding:
35
+ - chunked
36
+ - chunked
37
+ Connection:
38
+ - keep-alive
39
+ - keep-alive
40
+ Etag:
41
+ - ! '"a77339f2ab6091baa6a1f2cabff69b53"'
42
+ Last-Modified:
43
+ - Thu, 09 Feb 2012 20:40:52 GMT
44
+ Set-Cookie:
45
+ - _engine_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRiIlMTI3N2QxNmQzM2JiN2YwZjU0ODRjZGRkMzRlYWNjYzRJIhV1c2VyX2NyZWRlbnRpYWxzBjsARkkiAYAxYTM5Mjg4MzhlZDcwY2UyOGVkYWRkOGE1MDU2NWU1MzFlNzlhOTg4ODQxZmY5NTkxMjAzNWNhYTU1ZmIxZTZhODliMmMzN2VlYzkzMzFmOWE2ZDRjN2Y1ZDM4ZDIwNGE5NjM1ZTI0YTAxNzM1NDNiYThkNDlhNDkxY2M5NDM3MAY7AFRJIhh1c2VyX2NyZWRlbnRpYWxzX2lkBjsARmkDp4EB--8d10681f38a2d3506a3274e8d8dc819a01b4695f;
46
+ path=/; HttpOnly
47
+ - user_credentials=1a3928838ed70ce28edadd8a50565e531e79a988841ff95912035caa55fb1e6a89b2c37eec9331f9a6d4c7f5d38d204a9635e24a0173543ba8d49a491cc94370%3A%3A98727;
48
+ path=/; expires=Wed, 09-May-2012 20:43:52 GMT
49
+ body: ! '[{"created_at":"2012-02-09T20:40:16Z","deleted_at":null,"id":15024141,"item_type":"bookmark","name":"CloudApp","private":false,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-02-09T20:40:16Z","view_counter":0,"href":"http://my.cl.ly/items/15024141","url":"http://cl.ly/E67c","content_url":"http://cl.ly/E67c","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-02-09T20:38:07Z","deleted_at":null,"id":15024025,"item_type":"bookmark","name":"CloudApp","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-02-09T20:38:07Z","view_counter":0,"href":"http://my.cl.ly/items/15024025","url":"http://cl.ly/1m440K2A2t1R3e0V1V2u","content_url":"http://cl.ly/1m440K2A2t1R3e0V1V2u","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:49:23Z","deleted_at":null,"id":13950097,"item_type":"image","name":"favicon.ico","private":true,"redirect_url":null,"remote_url":"http://f.cl.ly/items/0p2t030e0a1N091o2t3o/favicon.ico","source":"Mozilla/5.0
50
+ (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75
51
+ Safari/535.7","updated_at":"2012-02-07T15:34:17Z","view_counter":3,"href":"http://my.cl.ly/items/13950097","url":"http://cl.ly/0P281s1u1J1p47241B3o","content_url":"http://cl.ly/0P281s1u1J1p47241B3o/favicon.ico","icon":"http://assets.my.cld.me/images/item-types/image.png","thumbnail_url":"http://thumbs.cl.ly/0P281s1u1J1p47241B3o","subscribed":false,"download_url":"http://api.cld.me/0P281s1u1J1p47241B3o/download/favicon.ico"},{"created_at":"2012-01-12T20:49:13Z","deleted_at":null,"id":13950087,"item_type":"image","name":"\u00f8\u00e6\u00d8\u00fc\u00f6\u00e4\u00df!?&+-.jpeg","private":true,"redirect_url":null,"remote_url":"http://f.cl.ly/items/0p2t030e0a1N091o2t3o/%C3%B8%C3%A6%C3%98%C3%BC%C3%B6%C3%A4%C3%9F!%3F&%2B-.jpeg","source":"Mozilla/5.0
52
+ (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75
53
+ Safari/535.7","updated_at":"2012-01-18T23:25:10Z","view_counter":6,"href":"http://my.cl.ly/items/13950087","url":"http://cl.ly/2n3a3S3f0J2w3X453r3L","content_url":"http://cl.ly/2n3a3S3f0J2w3X453r3L/%C3%B8%C3%A6%C3%98%C3%BC%C3%B6%C3%A4%C3%9F!%3F&%2B-.jpeg","icon":"http://assets.my.cld.me/images/item-types/image.png","thumbnail_url":"http://thumbs.cl.ly/2n3a3S3f0J2w3X453r3L","subscribed":false,"download_url":"http://api.cld.me/2n3a3S3f0J2w3X453r3L/download/%C3%B8%C3%A6%C3%98%C3%BC%C3%B6%C3%A4%C3%9F!%3F&%2B-.jpeg"},{"created_at":"2012-01-12T20:48:03Z","deleted_at":null,"id":13950015,"item_type":"bookmark","name":"The
54
+ Hitchhiker''s Guide to the Galaxy","private":true,"redirect_url":"http://en.wikipedia.org/wiki/The_Hitchhiker''s_Guide_to_the_Galaxy","remote_url":null,"source":"Mozilla/5.0
55
+ (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75
56
+ Safari/535.7","updated_at":"2012-02-07T15:34:23Z","view_counter":4,"href":"http://my.cl.ly/items/13950015","url":"http://cl.ly/3I28311d3n3S0x3R3k2Y","content_url":"http://cl.ly/3I28311d3n3S0x3R3k2Y","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:45:24Z","deleted_at":null,"id":13949886,"item_type":"audio","name":"Epic
57
+ Sax Guy NES Remix.mp3","private":true,"redirect_url":null,"remote_url":"http://f.cl.ly/items/0p2t030e0a1N091o2t3o/Epic%20Sax%20Guy%20NES%20Remix.mp3","source":"Mozilla/5.0
58
+ (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75
59
+ Safari/535.7","updated_at":"2012-01-12T20:45:24Z","view_counter":0,"href":"http://my.cl.ly/items/13949886","url":"http://cl.ly/322M3q1t261o30012s32","content_url":"http://cl.ly/322M3q1t261o30012s32/Epic%20Sax%20Guy%20NES%20Remix.mp3","icon":"http://assets.my.cld.me/images/item-types/audio.png","subscribed":false,"download_url":"http://api.cld.me/322M3q1t261o30012s32/download/Epic%20Sax%20Guy%20NES%20Remix.mp3"},{"created_at":"2012-01-12T20:45:05Z","deleted_at":null,"id":13949869,"item_type":"text","name":"2011-05-03-cloudapp-1.5-released.md","private":true,"redirect_url":null,"remote_url":"http://f.cl.ly/items/0p2t030e0a1N091o2t3o/2011-05-03-cloudapp-1.5-released.md","source":"Mozilla/5.0
60
+ (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75
61
+ Safari/535.7","updated_at":"2012-02-07T15:35:28Z","view_counter":4,"href":"http://my.cl.ly/items/13949869","url":"http://cl.ly/0s1o3A46290S1s331G28","content_url":"http://cl.ly/0s1o3A46290S1s331G28/2011-05-03-cloudapp-1.5-released.md","icon":"http://assets.my.cld.me/images/item-types/text.png","subscribed":false,"download_url":"http://api.cld.me/0s1o3A46290S1s331G28/download/2011-05-03-cloudapp-1.5-released.md"},{"created_at":"2012-01-12T20:44:58Z","deleted_at":null,"id":13949858,"item_type":"image","name":"Cover.jpeg","private":true,"redirect_url":null,"remote_url":"http://f.cl.ly/items/0p2t030e0a1N091o2t3o/Cover.jpeg","source":"Mozilla/5.0
62
+ (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75
63
+ Safari/535.7","updated_at":"2012-02-07T15:34:41Z","view_counter":1,"href":"http://my.cl.ly/items/13949858","url":"http://cl.ly/1x200A0m3v101d1n2O1u","content_url":"http://cl.ly/1x200A0m3v101d1n2O1u/Cover.jpeg","icon":"http://assets.my.cld.me/images/item-types/image.png","thumbnail_url":"http://thumbs.cl.ly/1x200A0m3v101d1n2O1u","subscribed":false,"download_url":"http://api.cld.me/1x200A0m3v101d1n2O1u/download/Cover.jpeg"},{"created_at":"2012-01-12T20:44:54Z","deleted_at":null,"id":13949855,"item_type":"text","name":"Chapter
64
+ 1.md","private":true,"redirect_url":null,"remote_url":"http://f.cl.ly/items/0p2t030e0a1N091o2t3o/Chapter%201.md","source":"Mozilla/5.0
65
+ (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75
66
+ Safari/535.7","updated_at":"2012-02-07T15:34:41Z","view_counter":7,"href":"http://my.cl.ly/items/13949855","url":"http://cl.ly/3U3d3w3r0G0T1T1M0d2T","content_url":"http://cl.ly/3U3d3w3r0G0T1T1M0d2T/Chapter%201.md","icon":"http://assets.my.cld.me/images/item-types/text.png","subscribed":false,"download_url":"http://api.cld.me/3U3d3w3r0G0T1T1M0d2T/download/Chapter%201.md"},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949577,"item_type":"bookmark","name":"Link
67
+ 40","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-02-07T15:35:45Z","view_counter":3,"href":"http://my.cl.ly/items/13949577","url":"http://cl.ly/2O2J1h3t0H0v1I1u0t0P","content_url":"http://cl.ly/2O2J1h3t0H0v1I1u0t0P","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949576,"item_type":"bookmark","name":"Link
68
+ 39","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:04Z","view_counter":0,"href":"http://my.cl.ly/items/13949576","url":"http://cl.ly/2t062C1h393d2L452U2Z","content_url":"http://cl.ly/2t062C1h393d2L452U2Z","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949575,"item_type":"bookmark","name":"Link
69
+ 38","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:04Z","view_counter":0,"href":"http://my.cl.ly/items/13949575","url":"http://cl.ly/1S131o2v2J3z2r0A0Q0W","content_url":"http://cl.ly/1S131o2v2J3z2r0A0Q0W","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949574,"item_type":"bookmark","name":"Link
70
+ 37","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:04Z","view_counter":0,"href":"http://my.cl.ly/items/13949574","url":"http://cl.ly/423a3W361X1l1i2w0q30","content_url":"http://cl.ly/423a3W361X1l1i2w0q30","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949573,"item_type":"bookmark","name":"Link
71
+ 36","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:04Z","view_counter":0,"href":"http://my.cl.ly/items/13949573","url":"http://cl.ly/3m3u2b1y461a2M3i0a0o","content_url":"http://cl.ly/3m3u2b1y461a2M3i0a0o","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949572,"item_type":"bookmark","name":"Link
72
+ 35","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:04Z","view_counter":0,"href":"http://my.cl.ly/items/13949572","url":"http://cl.ly/1Q1G170D1B2c2X3R0C2M","content_url":"http://cl.ly/1Q1G170D1B2c2X3R0C2M","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949571,"item_type":"bookmark","name":"Link
73
+ 34","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:04Z","view_counter":0,"href":"http://my.cl.ly/items/13949571","url":"http://cl.ly/3s153f2u3m1L471T390C","content_url":"http://cl.ly/3s153f2u3m1L471T390C","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949570,"item_type":"bookmark","name":"Link
74
+ 33","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:04Z","view_counter":0,"href":"http://my.cl.ly/items/13949570","url":"http://cl.ly/1W2f000i091B2128303J","content_url":"http://cl.ly/1W2f000i091B2128303J","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949568,"item_type":"bookmark","name":"Link
75
+ 32","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:04Z","view_counter":0,"href":"http://my.cl.ly/items/13949568","url":"http://cl.ly/333d0V1B403M0d2f2o09","content_url":"http://cl.ly/333d0V1B403M0d2f2o09","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:03Z","deleted_at":null,"id":13949567,"item_type":"bookmark","name":"Link
76
+ 31","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:03Z","view_counter":0,"href":"http://my.cl.ly/items/13949567","url":"http://cl.ly/260m2h3T0O2P272k2F3h","content_url":"http://cl.ly/260m2h3T0O2P272k2F3h","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:03Z","deleted_at":null,"id":13949566,"item_type":"bookmark","name":"Link
77
+ 30","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:03Z","view_counter":0,"href":"http://my.cl.ly/items/13949566","url":"http://cl.ly/411H1g1a3y2T2B3U322x","content_url":"http://cl.ly/411H1g1a3y2T2B3U322x","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false}]'
78
+ http_version:
79
+ recorded_at: Thu, 09 Feb 2012 20:43:51 GMT
80
+ - request:
81
+ method: post
82
+ uri: http://arthur%40dent.com:towel@my.cl.ly/items?api_version=1.2
83
+ body: ! '{"item":{"name":"CloudApp","redirect_url":"http://getcloudapp.com","private":true}}'
84
+ headers:
85
+ Content-Type:
86
+ - application/json
87
+ Accept:
88
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
89
+ text/plain
90
+ response:
91
+ status:
92
+ code: 200
93
+ message: OK
94
+ headers:
95
+ Cache-Control:
96
+ - max-age=0, private, must-revalidate
97
+ Content-Type:
98
+ - application/json; charset=utf-8
99
+ Etag:
100
+ - ! '"4be1f8ed1539953eb3a2551299bbb6a0"'
101
+ Server:
102
+ - thin 1.2.11 codename Bat-Shit Crazy
103
+ Set-Cookie:
104
+ - _engine_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRiIlNmE2NWZlNjA1MTE1OTkxMjAzZWYzMGRjMmM4ZTk3NDVJIhV1c2VyX2NyZWRlbnRpYWxzBjsARkkiAYAxYTM5Mjg4MzhlZDcwY2UyOGVkYWRkOGE1MDU2NWU1MzFlNzlhOTg4ODQxZmY5NTkxMjAzNWNhYTU1ZmIxZTZhODliMmMzN2VlYzkzMzFmOWE2ZDRjN2Y1ZDM4ZDIwNGE5NjM1ZTI0YTAxNzM1NDNiYThkNDlhNDkxY2M5NDM3MAY7AFRJIhh1c2VyX2NyZWRlbnRpYWxzX2lkBjsARmkDp4EB--be3ea3a75aa569f1bfef4d5e6bb8cab0156bf8c8;
105
+ path=/; HttpOnly
106
+ - user_credentials=1a3928838ed70ce28edadd8a50565e531e79a988841ff95912035caa55fb1e6a89b2c37eec9331f9a6d4c7f5d38d204a9635e24a0173543ba8d49a491cc94370%3A%3A98727;
107
+ path=/; expires=Wed, 09-May-2012 20:43:53 GMT
108
+ X-Runtime:
109
+ - '0.242731'
110
+ X-Ua-Compatible:
111
+ - IE=Edge,chrome=1
112
+ Transfer-Encoding:
113
+ - chunked
114
+ Connection:
115
+ - keep-alive
116
+ body: ! '{"created_at":"2012-02-09T20:43:53Z","deleted_at":null,"id":15024308,"item_type":"bookmark","name":"CloudApp","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-02-09T20:43:53Z","view_counter":0,"href":"http://my.cl.ly/items/15024308","url":"http://cl.ly/160l0R1D1N0I2t0k2L07","content_url":"http://cl.ly/160l0R1D1N0I2t0k2L07","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false}'
117
+ http_version:
118
+ recorded_at: Thu, 09 Feb 2012 20:43:52 GMT
119
+ recorded_with: VCR 2.0.0.rc1