cloudapp 2.0.0.beta.4 → 2.0.0.beta.5

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 (50) hide show
  1. data/Gemfile.lock +12 -19
  2. data/README.md +60 -6
  3. data/Rakefile +1 -19
  4. data/bin/cloudapp +48 -0
  5. data/cloudapp.gemspec +11 -42
  6. data/lib/cloudapp/authorized.rb +14 -0
  7. data/lib/cloudapp/collection_json.rb +86 -3
  8. data/lib/cloudapp/credentials.rb +115 -0
  9. data/lib/cloudapp/service.rb +43 -146
  10. data/lib/cloudapp.rb +1 -3
  11. data/man/cloudapp.1 +100 -0
  12. data/man/cloudapp.1.html +157 -0
  13. data/man/cloudapp.1.ronn +56 -0
  14. metadata +24 -69
  15. data/CHANGELOG.md +0 -34
  16. data/lib/cloudapp/authorized_representation.rb +0 -17
  17. data/lib/cloudapp/collection_json/item.rb +0 -20
  18. data/lib/cloudapp/collection_json/representation.rb +0 -74
  19. data/lib/cloudapp/collection_json/template.rb +0 -17
  20. data/lib/cloudapp/collection_json/tint.rb +0 -11
  21. data/lib/cloudapp/drop.rb +0 -37
  22. data/lib/cloudapp/drop_collection.rb +0 -37
  23. data/spec/cassettes/account_token.yml +0 -88
  24. data/spec/cassettes/create_bookmark.yml +0 -132
  25. data/spec/cassettes/create_bookmark_with_name.yml +0 -133
  26. data/spec/cassettes/create_bookmark_with_privacy.yml +0 -133
  27. data/spec/cassettes/list_drops.yml +0 -87
  28. data/spec/cassettes/list_drops_with_bad_token.yml +0 -45
  29. data/spec/cassettes/list_drops_with_filter.yml +0 -129
  30. data/spec/cassettes/list_drops_with_limit.yml +0 -129
  31. data/spec/cassettes/purge_drops.yml +0 -466
  32. data/spec/cassettes/setup_drops.yml +0 -620
  33. data/spec/cassettes/token_for_account.yml +0 -88
  34. data/spec/cassettes/token_for_account_with_bad_credentials.yml +0 -86
  35. data/spec/cassettes/upload_file.yml +0 -276
  36. data/spec/cassettes/upload_file_with_name.yml +0 -278
  37. data/spec/cassettes/upload_file_with_privacy.yml +0 -277
  38. data/spec/cassettes/view_drop.yml +0 -45
  39. data/spec/cloudapp/authorized_representation_spec.rb +0 -32
  40. data/spec/cloudapp/collection_json/item_spec.rb +0 -45
  41. data/spec/cloudapp/collection_json/representation_spec.rb +0 -118
  42. data/spec/cloudapp/collection_json/template_spec.rb +0 -53
  43. data/spec/cloudapp/drop_collection_spec.rb +0 -127
  44. data/spec/cloudapp/drop_spec.rb +0 -142
  45. data/spec/cloudapp/service_spec.rb +0 -335
  46. data/spec/helper.rb +0 -8
  47. data/spec/integration_spec.rb +0 -68
  48. data/spec/support/files/favicon.ico +0 -0
  49. data/spec/support/stub_class_or_module.rb +0 -22
  50. data/spec/support/vcr.rb +0 -24
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta.4
4
+ version: 2.0.0.beta.5
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,16 +9,16 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-25 00:00:00.000000000 Z
12
+ date: 2012-12-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: leadlight
15
+ name: netrc
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 0.0.7
21
+ version: 0.7.7
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,15 +26,15 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 0.0.7
29
+ version: 0.7.7
30
30
  - !ruby/object:Gem::Dependency
31
- name: typhoeus
31
+ name: leadlight
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
35
  - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: 0.3.3
37
+ version: 0.0.7
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,25 +42,25 @@ dependencies:
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 0.3.3
45
+ version: 0.0.7
46
46
  - !ruby/object:Gem::Dependency
47
- name: rake
47
+ name: typhoeus
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements:
51
- - - ! '>='
51
+ - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :development
53
+ version: 0.3.3
54
+ type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
- - - ! '>='
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 0.3.3
62
62
  - !ruby/object:Gem::Dependency
63
- name: rspec
63
+ name: rake
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
@@ -76,23 +76,7 @@ dependencies:
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  - !ruby/object:Gem::Dependency
79
- name: vcr
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ~>
84
- - !ruby/object:Gem::Version
85
- version: 2.0.0
86
- type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ~>
92
- - !ruby/object:Gem::Version
93
- version: 2.0.0
94
- - !ruby/object:Gem::Dependency
95
- name: webmock
79
+ name: ronn
96
80
  requirement: !ruby/object:Gem::Requirement
97
81
  none: false
98
82
  requirements:
@@ -109,57 +93,28 @@ dependencies:
109
93
  version: '0'
110
94
  description: Experience all the pleasures of sharing with CloudApp now in your terminal.
111
95
  email: larry@marburger.cc
112
- executables: []
96
+ executables:
97
+ - cloudapp
113
98
  extensions: []
114
99
  extra_rdoc_files:
115
100
  - README.md
116
101
  - MIT-LICENSE
117
102
  files:
118
- - CHANGELOG.md
119
103
  - Gemfile
120
104
  - Gemfile.lock
121
105
  - MIT-LICENSE
122
106
  - README.md
123
107
  - Rakefile
108
+ - bin/cloudapp
124
109
  - cloudapp.gemspec
125
110
  - lib/cloudapp.rb
126
- - lib/cloudapp/authorized_representation.rb
111
+ - lib/cloudapp/authorized.rb
127
112
  - lib/cloudapp/collection_json.rb
128
- - lib/cloudapp/collection_json/item.rb
129
- - lib/cloudapp/collection_json/representation.rb
130
- - lib/cloudapp/collection_json/template.rb
131
- - lib/cloudapp/collection_json/tint.rb
132
- - lib/cloudapp/drop.rb
133
- - lib/cloudapp/drop_collection.rb
113
+ - lib/cloudapp/credentials.rb
134
114
  - lib/cloudapp/service.rb
135
- - spec/cassettes/account_token.yml
136
- - spec/cassettes/create_bookmark.yml
137
- - spec/cassettes/create_bookmark_with_name.yml
138
- - spec/cassettes/create_bookmark_with_privacy.yml
139
- - spec/cassettes/list_drops.yml
140
- - spec/cassettes/list_drops_with_bad_token.yml
141
- - spec/cassettes/list_drops_with_filter.yml
142
- - spec/cassettes/list_drops_with_limit.yml
143
- - spec/cassettes/purge_drops.yml
144
- - spec/cassettes/setup_drops.yml
145
- - spec/cassettes/token_for_account.yml
146
- - spec/cassettes/token_for_account_with_bad_credentials.yml
147
- - spec/cassettes/upload_file.yml
148
- - spec/cassettes/upload_file_with_name.yml
149
- - spec/cassettes/upload_file_with_privacy.yml
150
- - spec/cassettes/view_drop.yml
151
- - spec/cloudapp/authorized_representation_spec.rb
152
- - spec/cloudapp/collection_json/item_spec.rb
153
- - spec/cloudapp/collection_json/representation_spec.rb
154
- - spec/cloudapp/collection_json/template_spec.rb
155
- - spec/cloudapp/drop_collection_spec.rb
156
- - spec/cloudapp/drop_spec.rb
157
- - spec/cloudapp/service_spec.rb
158
- - spec/helper.rb
159
- - spec/integration_spec.rb
160
- - spec/support/files/favicon.ico
161
- - spec/support/stub_class_or_module.rb
162
- - spec/support/vcr.rb
115
+ - man/cloudapp.1
116
+ - man/cloudapp.1.html
117
+ - man/cloudapp.1.ronn
163
118
  homepage: https://github.com/cloudapp/cloudapp
164
119
  licenses: []
165
120
  post_install_message:
data/CHANGELOG.md DELETED
@@ -1,34 +0,0 @@
1
- # Change Log
2
-
3
- Below is a complete listing of changes for each revision of `cloudapp`.
4
-
5
- ## Unreleased
6
-
7
- - Use new [hypermedia CloudApp API][api].
8
- - Extract CLI into [cloudapp-cli gem][cli].
9
- - Much refactoring
10
-
11
- [api]: http://developer.getcloudapp.com/api-v2/
12
- [cli]: https://github.com/cloudapp/cloudapp-cli
13
-
14
- ## 1.1.0
15
-
16
- - Add `download` command
17
- - General housecleaning in `bin/cloudapp`
18
- - Fix typo ([#22][] by [Mark Mulder][bittersweet])
19
- - Extract Config class
20
-
21
- [#22]: https://github.com/cloudapp/cloudapp/pull/22
22
- [bittersweet]: https://github.com/bittersweet
23
-
24
- ## 1.0.2
25
-
26
- - Bump leadlight and relax highline dependencies.
27
-
28
- ## 1.0.1
29
-
30
- - Tightened leadlight and highline dependencies.
31
-
32
- ## 1.0.0
33
-
34
- - Stable release
@@ -1,17 +0,0 @@
1
- require 'leadlight'
2
-
3
- module CloudApp
4
- module AuthorizedRepresentation
5
- Tint = Leadlight::Tint.new 'authorized', status: [ :success, 401 ] do
6
- extend AuthorizedRepresentation
7
- end
8
-
9
- def authorized?
10
- not unauthorized?
11
- end
12
-
13
- def unauthorized?
14
- __response__.status == 401
15
- end
16
- end
17
- end
@@ -1,20 +0,0 @@
1
- require 'ostruct'
2
-
3
- module CloudApp
4
- module CollectionJson
5
- class Item
6
- attr_reader :href, :links, :data
7
- def initialize(item_data)
8
- @href = item_data.fetch('href', nil)
9
- @links = item_data.fetch('links', []).map {|link| OpenStruct.new(link) }
10
- @data = DataCollection.hash_from(item_data.fetch('data'))
11
- end
12
- end
13
-
14
- class DataCollection
15
- def self.hash_from(data)
16
- Hash[data.map {|datum| [ datum['name'], datum['value'] ]}]
17
- end
18
- end
19
- end
20
- end
@@ -1,74 +0,0 @@
1
- require 'ostruct'
2
-
3
- module CloudApp
4
- module CollectionJson
5
- module Representation
6
- def href
7
- collection.fetch('href')
8
- end
9
-
10
- def collection_links
11
- return [] unless collection.has_key?('links')
12
- collection.fetch('links').map {|link| OpenStruct.new(link) }
13
- end
14
-
15
- def items(item_source = default_item_source)
16
- collection.fetch('items').map {|item|
17
- item_source.call(item)
18
- }
19
- end
20
-
21
- # Ultimately this API would be nice:
22
- #
23
- # root.template(email: email, password: password).
24
- # post do |response|
25
- # return response
26
- # end
27
- #
28
- # The Command Pattern could be nice as well. Template#[] may be a better
29
- # solution than faux methods.
30
- #
31
- # root.create do |template|
32
- # template.email = email
33
- # template.password = password
34
- # end
35
- #
36
- # Updates also use the template.
37
- #
38
- # root.items.first.update do |template|
39
- # template.name.reverse!
40
- # end
41
- def template(template_source = default_template_source)
42
- return unless collection.has_key?('template')
43
- template_source.call collection.fetch('template')
44
- end
45
-
46
- def queries(query_source = default_query_source)
47
- return unless collection.has_key?('queries')
48
- collection.fetch('queries').map {|query| query_source.call(query) }
49
- end
50
-
51
- def query(rel, query_source = default_query_source)
52
- Array(queries(query_source)).find {|query| query.rel == rel }
53
- end
54
-
55
- protected
56
-
57
- def default_item_source
58
- CloudApp::CollectionJson::Item.public_method(:new)
59
- end
60
-
61
- def default_template_source
62
- CloudApp::CollectionJson::Template.public_method(:new)
63
- end
64
-
65
- def default_query_source
66
- CloudApp::CollectionJson::Template.public_method(:new)
67
- end
68
-
69
- def collection
70
- self.fetch('collection')
71
- end
72
- end
73
- end
74
- end
@@ -1,17 +0,0 @@
1
- module CloudApp
2
- module CollectionJson
3
- class Template < Item
4
- attr_reader :rel, :enctype
5
- def initialize(template_data)
6
- super
7
- @rel = template_data.fetch('rel', nil)
8
- @enctype = template_data.fetch('enctype', nil)
9
- end
10
-
11
- def fill(template_data)
12
- template_data = template_data.select {|key| data.has_key?(key) }
13
- data.merge template_data
14
- end
15
- end
16
- end
17
- end
@@ -1,11 +0,0 @@
1
- module CloudApp
2
- module CollectionJson
3
- Tint = Leadlight::Tint.new 'collection+json', status: [ :success, 401 ] do
4
- match_content_type 'application/vnd.collection+json'
5
- extend CollectionJson::Representation
6
- collection_links.each do |link|
7
- add_link link.href, link.rel
8
- end
9
- end
10
- end
11
- end
data/lib/cloudapp/drop.rb DELETED
@@ -1,37 +0,0 @@
1
- require 'date'
2
- require 'ostruct'
3
-
4
- module CloudApp
5
- class Drop < OpenStruct
6
- attr_accessor :href, :data
7
-
8
- def initialize(collection_item, collection)
9
- @href = collection_item.href
10
- @links = collection_item.links
11
- @data = collection_item.data
12
- @collection = collection
13
- super @data
14
- end
15
-
16
- def name() super || share_url end
17
- def private?() private == true end
18
- def public?() !private? end
19
- def created() DateTime.parse(super) end
20
-
21
- def share_url() link_for_relation('canonical') end
22
- def thumbnail_url() link_for_relation('icon') end
23
- def embed_url() link_for_relation('embed') end
24
- def download_url() link_for_relation('download') end
25
-
26
- def trash() @collection.trash(self) end
27
- def recover() @collection.recover(self) end
28
- def delete() @collection.delete(self) end
29
-
30
- protected
31
-
32
- def link_for_relation(relation)
33
- link = @links.find {|link| link.rel == relation }
34
- link and link.href
35
- end
36
- end
37
- end
@@ -1,37 +0,0 @@
1
- require 'delegate'
2
- require 'forwardable'
3
-
4
- module CloudApp
5
- class DropCollection < SimpleDelegator
6
- extend Forwardable
7
- def_delegators :representation, :authorized?, :unauthorized?#, :link, :links
8
-
9
- attr_reader :representation, :drop_class
10
-
11
- def initialize(representation, service, drop_class = Drop)
12
- @representation = representation
13
- @service = service
14
- @drop_class = drop_class
15
- super drops
16
- end
17
-
18
- def follow(relation)
19
- self.class.new representation.link(relation).follow, nil, drop_class
20
- end
21
-
22
- def has_link?(relation)
23
- !representation.link(relation) { nil }.nil?
24
- end
25
-
26
- def trash(drop) @service.trash_drop drop.href end
27
- def recover(drop) @service.recover_drop drop.href end
28
- def delete(drop) @service.delete_drop drop.href end
29
-
30
- protected
31
-
32
- def drops
33
- return [] if unauthorized?
34
- @drops ||= representation.items.map {|drop| drop_class.new(drop, self) }
35
- end
36
- end
37
- end
@@ -1,88 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.getcloudapp.com/
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
12
- text/plain
13
- Accept-Encoding:
14
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
15
- User-Agent:
16
- - Ruby
17
- response:
18
- status:
19
- code: 401
20
- message: Unauthorized
21
- headers:
22
- Cache-Control:
23
- - no-cache
24
- Content-Type:
25
- - application/vnd.collection+json; charset=utf-8
26
- Server:
27
- - thin 1.4.1 codename Chromeo
28
- Www-Authenticate:
29
- - Token realm="CloudApp"
30
- X-Runtime:
31
- - '0.003172'
32
- X-Ua-Compatible:
33
- - IE=Edge,chrome=1
34
- Content-Length:
35
- - '231'
36
- Connection:
37
- - keep-alive
38
- body:
39
- encoding: US-ASCII
40
- string: ! '{"collection":{"version":"1.0","href":"https://api.getcloudapp.com/account/token","links":[{"rel":"root","href":"https://api.getcloudapp.com/"}],"template":{"data":[{"name":"email","value":null},{"name":"password","value":null}]}}}'
41
- http_version:
42
- recorded_at: Fri, 24 Aug 2012 20:43:21 GMT
43
- - request:
44
- method: post
45
- uri: https://api.getcloudapp.com/account/token
46
- body:
47
- encoding: UTF-8
48
- string: ! '{"email":"arthur@dent.com","password":"towel"}'
49
- headers:
50
- Content-Type:
51
- - application/json
52
- Accept:
53
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
54
- text/plain
55
- User-Agent:
56
- - Ruby
57
- response:
58
- status:
59
- code: 201
60
- message: Created
61
- headers:
62
- Cache-Control:
63
- - max-age=0, private, must-revalidate
64
- Content-Type:
65
- - application/vnd.collection+json; charset=utf-8
66
- Etag:
67
- - ! '"4438a3f4f703a01c251b7ecc1feab772"'
68
- Server:
69
- - thin 1.4.1 codename Chromeo
70
- Set-Cookie:
71
- - _engine_session=BAh7CEkiFXVzZXJfY3JlZGVudGlhbHMGOgZFRkkiAYBhOGUwNDBkMDY3YWJkMTEyZGM1NTJhOTlkMjYyNmU1NzU0Y2FmZjc3MDEzZTc0ZDU5NTFjMTI2M2QxYTEyMGQxNThjZjI3ZDgzNmVmN2QyMmEwZjQzN2RlMjg3NGE3OWQwMWM4NWViOWFmYTVmMzQ1ZGFjZjQyZDAxNjlkMTY4MwY7AFRJIhh1c2VyX2NyZWRlbnRpYWxzX2lkBjsARmkDp4EBSSIPc2Vzc2lvbl9pZAY7AEZJIiVjM2VhMzliN2MzZDMzMjEyYWZiOGU2ZWQzNTM5MTIxZAY7AFQ%3D--3c536cf8834d3f78bbb164613a405dc6b4c4bf66;
72
- path=/; HttpOnly
73
- - user_credentials=a8e040d067abd112dc552a99d2626e5754caff77013e74d5951c1263d1a120d158cf27d836ef7d22a0f437de2874a79d01c85eb9afa5f345dacf42d0169d1683%3A%3A98727;
74
- path=/; expires=Sat, 24-Nov-2012 20:43:21 GMT
75
- X-Runtime:
76
- - '0.015032'
77
- X-Ua-Compatible:
78
- - IE=Edge,chrome=1
79
- Transfer-Encoding:
80
- - chunked
81
- Connection:
82
- - keep-alive
83
- body:
84
- encoding: US-ASCII
85
- string: ! '{"collection":{"version":"1.0","href":"https://api.getcloudapp.com/account/token","links":[{"rel":"root","href":"https://api.getcloudapp.com/"}],"items":[{"href":"https://api.getcloudapp.com/account/token","data":[{"name":"token","value":"abc123"}]}]}}'
86
- http_version:
87
- recorded_at: Fri, 24 Aug 2012 20:43:21 GMT
88
- recorded_with: VCR 2.0.1
@@ -1,132 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.getcloudapp.com/
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Authorization:
11
- - Token token="abc123"
12
- Accept:
13
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
14
- text/plain
15
- Accept-Encoding:
16
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
17
- User-Agent:
18
- - Ruby
19
- response:
20
- status:
21
- code: 200
22
- message: OK
23
- headers:
24
- Cache-Control:
25
- - max-age=0, private, must-revalidate
26
- Content-Type:
27
- - application/vnd.collection+json; charset=utf-8
28
- Etag:
29
- - ! '"44e8e003e0f1b5e38f7ca916ff4497d7"'
30
- Server:
31
- - thin 1.4.1 codename Chromeo
32
- X-Runtime:
33
- - '0.009253'
34
- X-Ua-Compatible:
35
- - IE=Edge,chrome=1
36
- Content-Length:
37
- - '139'
38
- Connection:
39
- - keep-alive
40
- body:
41
- encoding: US-ASCII
42
- string: ! '{"collection":{"version":"1.0","href":"https://api.getcloudapp.com/","links":[{"rel":"drops","href":"https://api.getcloudapp.com/drops"}]}}'
43
- http_version:
44
- recorded_at: Fri, 24 Aug 2012 20:43:33 GMT
45
- - request:
46
- method: get
47
- uri: https://api.getcloudapp.com/drops
48
- body:
49
- encoding: US-ASCII
50
- string: ''
51
- headers:
52
- Authorization:
53
- - Token token="abc123"
54
- Accept:
55
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
56
- text/plain
57
- Accept-Encoding:
58
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
59
- User-Agent:
60
- - Ruby
61
- response:
62
- status:
63
- code: 200
64
- message: OK
65
- headers:
66
- Cache-Control:
67
- - max-age=0, private, must-revalidate
68
- Content-Type:
69
- - application/vnd.collection+json; charset=utf-8
70
- Etag:
71
- - ! '"47b61ccba7fbae8a22e1be29f6eb50b8"'
72
- Server:
73
- - thin 1.4.1 codename Chromeo
74
- X-Runtime:
75
- - '0.120766'
76
- X-Ua-Compatible:
77
- - IE=Edge,chrome=1
78
- Transfer-Encoding:
79
- - chunked
80
- Connection:
81
- - keep-alive
82
- body:
83
- encoding: US-ASCII
84
- string: ! '{"collection":{"version":"1.0","href":"https://api.getcloudapp.com/drops","links":[{"rel":"drops-stream","href":"https://api.getcloudapp.com/drops/stream"}],"queries":[{"href":"https://api.getcloudapp.com/drops","rel":"drops-list","data":[{"name":"filter","value":"active"},{"name":"limit","value":20}]}],"template":{"data":[{"name":"name","value":null},{"name":"private","value":true},{"name":"trash","value":false},{"name":"bookmark_url","value":null},{"name":"file_size","value":null}]},"items":[{"href":"https://api.getcloudapp.com/drops/21399180","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/IzhX"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21399180},{"name":"name","value":"http://cl.ly"},{"name":"private","value":false},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-08-24T20:43:24Z"}]},{"href":"https://api.getcloudapp.com/drops/21399179","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/image/2D0r2k0z2u2E"},{"rel":"icon","href":"https://thumbs.getcloudapp.com/2D0r2k0z2u2E"},{"rel":"embed","href":"http://cl.ly/image/2D0r2k0z2u2E/favicon.ico"},{"rel":"download","href":"http://cl.ly/image/2D0r2k0z2u2E/download/favicon.ico"}],"data":[{"name":"id","value":21399179},{"name":"name","value":"favicon.ico"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-08-24T20:43:22Z"}]}]}}'
85
- http_version:
86
- recorded_at: Fri, 24 Aug 2012 20:43:33 GMT
87
- - request:
88
- method: post
89
- uri: https://api.getcloudapp.com/drops
90
- body:
91
- encoding: UTF-8
92
- string: ! '{"name":null,"private":true,"trash":false,"bookmark_url":"http://getcloudapp.com","file_size":null}'
93
- headers:
94
- Authorization:
95
- - Token token="abc123"
96
- Content-Type:
97
- - application/json
98
- Accept:
99
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
100
- text/plain
101
- User-Agent:
102
- - Ruby
103
- response:
104
- status:
105
- code: 201
106
- message: Created
107
- headers:
108
- Cache-Control:
109
- - max-age=0, private, must-revalidate
110
- Content-Type:
111
- - application/vnd.collection+json; charset=utf-8
112
- Etag:
113
- - ! '"62043352a419fa740e0cc79766384e51"'
114
- Server:
115
- - thin 1.4.1 codename Chromeo
116
- Set-Cookie:
117
- - _engine_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTIxNWEwZDdjYzQ4YzhmNjNkNjNkYzA3ZjhkYjI4Yzg3BjsAVA%3D%3D--25497c79703f55d2ba0bd061e86b103a0f636c08;
118
- path=/; HttpOnly
119
- X-Runtime:
120
- - '0.035032'
121
- X-Ua-Compatible:
122
- - IE=Edge,chrome=1
123
- Content-Length:
124
- - '1005'
125
- Connection:
126
- - keep-alive
127
- body:
128
- encoding: US-ASCII
129
- string: ! '{"collection":{"version":"1.0","href":"https://api.getcloudapp.com/drops","links":[{"rel":"drops-stream","href":"https://api.getcloudapp.com/drops/stream"}],"queries":[{"href":"https://api.getcloudapp.com/drops","rel":"drops-list","data":[{"name":"filter","value":"active"},{"name":"limit","value":20}]}],"template":{"data":[{"name":"name","value":null},{"name":"private","value":true},{"name":"trash","value":false},{"name":"bookmark_url","value":null},{"name":"file_size","value":null}]},"items":[{"href":"https://api.getcloudapp.com/drops/21399186","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/182Y3i0P0h03"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21399186},{"name":"name","value":"http://getcloudapp.com"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-08-24T20:43:34Z"}]}]}}'
130
- http_version:
131
- recorded_at: Fri, 24 Aug 2012 20:43:34 GMT
132
- recorded_with: VCR 2.0.1