chute 0.0.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +16 -2
- data/Gemfile.lock +52 -0
- data/LICENSE.txt +20 -0
- data/README.md +46 -0
- data/Rakefile +48 -6
- data/VERSION +1 -0
- data/chute.gemspec +120 -16
- data/lib/chute.rb +7 -20
- data/lib/chute/client.rb +42 -0
- data/lib/chute/configuration.rb +40 -0
- data/lib/chute/connection.rb +64 -0
- data/lib/chute/response.rb +22 -0
- data/lib/chute/v2/albums.rb +60 -0
- data/lib/chute/v2/assets.rb +55 -0
- data/lib/chute/v2/comments.rb +29 -0
- data/lib/chute/v2/flags.rb +21 -0
- data/lib/chute/v2/hearts.rb +21 -0
- data/lib/chute/v2/parcels.rb +21 -0
- data/lib/chute/v2/tags.rb +36 -0
- data/lib/chute/v2/triggers.rb +26 -0
- data/lib/chute/v2/users.rb +18 -0
- data/lib/chute/v2/votes.rb +21 -0
- data/lib/chute/version.rb +7 -1
- data/spec/chute/chute_spec.rb +64 -0
- data/spec/chute/client_spec.rb +82 -0
- data/spec/chute/connection_spec.rb +47 -0
- data/spec/chute/response_spec.rb +16 -0
- data/spec/chute/v2/albums_spec.rb +197 -0
- data/spec/chute/v2/assets_spec.rb +171 -0
- data/spec/chute/v2/comments_spec.rb +88 -0
- data/spec/chute/v2/flags_spec.rb +56 -0
- data/spec/chute/v2/hearts_spec.rb +57 -0
- data/spec/chute/v2/parcels_spec.rb +24 -0
- data/spec/chute/v2/tags_spec.rb +79 -0
- data/spec/chute/v2/trigger_spec.rb +127 -0
- data/spec/chute/v2/users_spec.rb +53 -0
- data/spec/chute/v2/votes_spec.rb +56 -0
- data/spec/fixtures/chute_cassettes/albums/album_create_with_permission_view.yml +69 -0
- data/spec/fixtures/chute_cassettes/albums/albums_add_remove_assets.yml +187 -0
- data/spec/fixtures/chute_cassettes/albums/albums_create.yml +69 -0
- data/spec/fixtures/chute_cassettes/albums/albums_delete.yml +128 -0
- data/spec/fixtures/chute_cassettes/albums/albums_get.yml +135 -0
- data/spec/fixtures/chute_cassettes/albums/albums_list.yml +89 -0
- data/spec/fixtures/chute_cassettes/albums/albums_stats.yml +128 -0
- data/spec/fixtures/chute_cassettes/albums/albums_update.yml +135 -0
- data/spec/fixtures/chute_cassettes/assets/assets_delete.yml +131 -0
- data/spec/fixtures/chute_cassettes/assets/assets_geo.yml +197 -0
- data/spec/fixtures/chute_cassettes/assets/assets_get.yml +138 -0
- data/spec/fixtures/chute_cassettes/assets/assets_import.yml +76 -0
- data/spec/fixtures/chute_cassettes/assets/assets_list.yml +77 -0
- data/spec/fixtures/chute_cassettes/assets/assets_update.yml +138 -0
- data/spec/fixtures/chute_cassettes/comments/comments_create.yml +196 -0
- data/spec/fixtures/chute_cassettes/comments/comments_list.yml +259 -0
- data/spec/fixtures/chute_cassettes/flags/flags_methods.yml +313 -0
- data/spec/fixtures/chute_cassettes/hearts/hearts_methods.yml +254 -0
- data/spec/fixtures/chute_cassettes/tags/tags_assets.yml +311 -0
- data/spec/fixtures/chute_cassettes/triggers/trigger_errors.yml +62 -0
- data/spec/fixtures/chute_cassettes/triggers/triggers_cleanup.yml +184 -0
- data/spec/fixtures/chute_cassettes/triggers/triggers_create.yml +65 -0
- data/spec/fixtures/chute_cassettes/triggers/triggers_delete.yml +124 -0
- data/spec/fixtures/chute_cassettes/triggers/triggers_list.yml +66 -0
- data/spec/fixtures/chute_cassettes/triggers/triggers_update.yml +127 -0
- data/spec/fixtures/chute_cassettes/users/users_get.yml +128 -0
- data/spec/fixtures/chute_cassettes/users/users_me.yml +66 -0
- data/spec/fixtures/chute_cassettes/votes/votes_methods.yml +313 -0
- data/spec/spec_helper.rb +27 -0
- metadata +210 -33
- data/.gitignore +0 -5
- data/README +0 -125
- data/config/chute.rb +0 -0
- data/lib/chute/account.rb +0 -58
- data/lib/chute/app.rb +0 -32
- data/lib/chute/asset.rb +0 -124
- data/lib/chute/bundle.rb +0 -72
- data/lib/chute/chute.rb +0 -203
- data/lib/chute/collection.rb +0 -47
- data/lib/chute/comment.rb +0 -32
- data/lib/chute/exception.rb +0 -7
- data/lib/chute/http_service.rb +0 -114
- data/lib/chute/inbox.rb +0 -41
- data/lib/chute/parcel.rb +0 -45
- data/lib/chute/resource.rb +0 -354
- data/lib/chute/user.rb +0 -113
- data/lib/chute/util.rb +0 -14
- data/test/test_sudoku.rb +0 -7
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Chute::V2::Votes do
|
4
|
+
include_context "init credentials"
|
5
|
+
|
6
|
+
let(:album_id) do
|
7
|
+
Chute::V2::Albums.create({:name => "Album for Votes"}).data.id
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:asset_id) do
|
11
|
+
Chute::V2::Albums.import(album_id,'http://sphotos-f.ak.fbcdn.net/hphotos-ak-snc6/6393_451942991531262_1464781412_n.jpg').data[0].id
|
12
|
+
end
|
13
|
+
|
14
|
+
describe ".all" do
|
15
|
+
it { Chute::V2::Votes.should respond_to(:count).with(2).arguments }
|
16
|
+
it { Chute::V2::Votes.should_not respond_to(:count).with(1).arguments }
|
17
|
+
end
|
18
|
+
|
19
|
+
describe ".create" do
|
20
|
+
it { Chute::V2::Votes.should respond_to(:vote).with(2).arguments }
|
21
|
+
it { Chute::V2::Votes.should_not respond_to(:vote).with(1).arguments }
|
22
|
+
end
|
23
|
+
|
24
|
+
describe ".delete" do
|
25
|
+
it { Chute::V2::Votes.should respond_to(:remove_vote).with(2).arguments }
|
26
|
+
it { Chute::V2::Votes.should_not respond_to(:remove_vote).with(1).arguments }
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
describe "heart methods" do
|
31
|
+
|
32
|
+
before do
|
33
|
+
VCR.insert_cassette 'votes/votes_methods', :record => :new_episodes
|
34
|
+
end
|
35
|
+
after do
|
36
|
+
VCR.eject_cassette
|
37
|
+
end
|
38
|
+
|
39
|
+
it "should be able to vote an asset" do
|
40
|
+
response = Chute::V2::Votes.vote(album_id,asset_id)
|
41
|
+
response.success?.should == true
|
42
|
+
end
|
43
|
+
|
44
|
+
it "should be able list all votes" do
|
45
|
+
response = Chute::V2::Votes.count(album_id,asset_id)
|
46
|
+
response.success?.should == true
|
47
|
+
end
|
48
|
+
|
49
|
+
it "should be able remove a vote" do
|
50
|
+
response = Chute::V2::Votes.vote(album_id,asset_id)
|
51
|
+
response = Chute::V2::Votes.remove_vote(album_id,asset_id)
|
52
|
+
response.success?.should == true
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.getchute.com/v2/albums
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"album":{"name":"some new album 2013-04-08 15:53:50 -0700","permission_view":2}}'
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- OAuth API KEY
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accepts:
|
15
|
+
- application/json
|
16
|
+
X-Client-Id:
|
17
|
+
- 508fc620018d162a070000d6
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 201
|
21
|
+
message: Created
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- max-age=0, private, must-revalidate
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Date:
|
28
|
+
- Mon, 08 Apr 2013 22:53:50 GMT
|
29
|
+
Etag:
|
30
|
+
- ! '"4e34e7716b664f331144a1911d88735d"'
|
31
|
+
Last-Modified:
|
32
|
+
- Mon, 08 Apr 2013 22:53:50 GMT
|
33
|
+
Server:
|
34
|
+
- nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
|
35
|
+
Status:
|
36
|
+
- '201'
|
37
|
+
X-Available-Hourly-Calls:
|
38
|
+
- '4999909'
|
39
|
+
X-Available-Monthly-Calls:
|
40
|
+
- '3719999850'
|
41
|
+
X-Max-Hourly-Calls:
|
42
|
+
- '5000000'
|
43
|
+
X-Max-Monthly-Calls:
|
44
|
+
- '3720000000'
|
45
|
+
X-Powered-By:
|
46
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.18
|
47
|
+
X-Rack-Cache:
|
48
|
+
- invalidate, pass
|
49
|
+
X-Request-Id:
|
50
|
+
- 31a621d8adf8ee41863dbd3f8dc810ed
|
51
|
+
X-Runtime:
|
52
|
+
- '0.103034'
|
53
|
+
X-Ua-Compatible:
|
54
|
+
- IE=Edge,chrome=1
|
55
|
+
Transfer-Encoding:
|
56
|
+
- chunked
|
57
|
+
Connection:
|
58
|
+
- keep-alive
|
59
|
+
body:
|
60
|
+
encoding: US-ASCII
|
61
|
+
string: ! '{"response":{"title":"Album Details","version":2,"code":201,"href":"https://api.getchute.com/v2/albums?album%5Bname%5D=some+new+album+2013-04-08+15%3A53%3A50+-0700&album%5Bpermission_view%5D=2","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999850,"max_hourly_calls":5000000,"available_hourly_calls":4999909}},"data":{"id":2406192,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406192","title":"Album
|
62
|
+
Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406192/assets","title":"Asset
|
63
|
+
Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406192/parcels","title":"Parcel
|
64
|
+
Listing"}},"created_at":"2013-04-08T22:53:50Z","updated_at":"2013-04-08T22:53:50Z","shortcut":"a5Xykyld","name":"some
|
65
|
+
new album 2013-04-08 15:53:50 -0700","description":null,"user":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
|
66
|
+
Details"}},"created_at":"2012-01-17T19:53:39Z","updated_at":"2012-09-15T10:55:51Z","name":"darko1002001","username":"darko1002001","avatar":"http://static.getchute.com/v1/images/avatar-100x100.png","profile":null},"moderate_media":false,"moderate_comments":false,"parent_id":null}}'
|
67
|
+
http_version:
|
68
|
+
recorded_at: Mon, 08 Apr 2013 22:53:50 GMT
|
69
|
+
recorded_with: VCR 2.2.5
|
@@ -0,0 +1,187 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.getchute.com/v2/albums
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"album":{"name":"Created Album"}}'
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- OAuth API KEY
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accepts:
|
15
|
+
- application/json
|
16
|
+
X-Client-Id:
|
17
|
+
- 508fc620018d162a070000d6
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 201
|
21
|
+
message: Created
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- max-age=0, private, must-revalidate
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Date:
|
28
|
+
- Mon, 08 Apr 2013 22:53:55 GMT
|
29
|
+
Etag:
|
30
|
+
- ! '"2e71d002c327629ac8035c6abfa30272"'
|
31
|
+
Last-Modified:
|
32
|
+
- Mon, 08 Apr 2013 22:53:55 GMT
|
33
|
+
Server:
|
34
|
+
- nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
|
35
|
+
Status:
|
36
|
+
- '201'
|
37
|
+
X-Available-Hourly-Calls:
|
38
|
+
- '4999898'
|
39
|
+
X-Available-Monthly-Calls:
|
40
|
+
- '3719999839'
|
41
|
+
X-Max-Hourly-Calls:
|
42
|
+
- '5000000'
|
43
|
+
X-Max-Monthly-Calls:
|
44
|
+
- '3720000000'
|
45
|
+
X-Powered-By:
|
46
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.18
|
47
|
+
X-Rack-Cache:
|
48
|
+
- invalidate, pass
|
49
|
+
X-Request-Id:
|
50
|
+
- 53646ae3430c52e590b01c5360acb460
|
51
|
+
X-Runtime:
|
52
|
+
- '0.031950'
|
53
|
+
X-Ua-Compatible:
|
54
|
+
- IE=Edge,chrome=1
|
55
|
+
Transfer-Encoding:
|
56
|
+
- chunked
|
57
|
+
Connection:
|
58
|
+
- keep-alive
|
59
|
+
body:
|
60
|
+
encoding: US-ASCII
|
61
|
+
string: ! '{"response":{"title":"Album Details","version":2,"code":201,"href":"https://api.getchute.com/v2/albums?album%5Bname%5D=Created+Album","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999839,"max_hourly_calls":5000000,"available_hourly_calls":4999898}},"data":{"id":2406197,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406197","title":"Album
|
62
|
+
Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406197/assets","title":"Asset
|
63
|
+
Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406197/parcels","title":"Parcel
|
64
|
+
Listing"}},"created_at":"2013-04-08T22:53:55Z","updated_at":"2013-04-08T22:53:55Z","shortcut":"a5XDnwkc","name":"Created
|
65
|
+
Album","description":null,"user":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
|
66
|
+
Details"}},"created_at":"2012-01-17T19:53:39Z","updated_at":"2012-09-15T10:55:51Z","name":"darko1002001","username":"darko1002001","avatar":"http://static.getchute.com/v1/images/avatar-100x100.png","profile":null},"moderate_media":false,"moderate_comments":false,"parent_id":null}}'
|
67
|
+
http_version:
|
68
|
+
recorded_at: Mon, 08 Apr 2013 22:53:55 GMT
|
69
|
+
- request:
|
70
|
+
method: post
|
71
|
+
uri: https://api.getchute.com/v2/albums/2406197/add_assets
|
72
|
+
body:
|
73
|
+
encoding: UTF-8
|
74
|
+
string: ! '{"asset_ids":[[71907823]]}'
|
75
|
+
headers:
|
76
|
+
Authorization:
|
77
|
+
- OAuth API KEY
|
78
|
+
Content-Type:
|
79
|
+
- application/json
|
80
|
+
Accepts:
|
81
|
+
- application/json
|
82
|
+
X-Client-Id:
|
83
|
+
- 508fc620018d162a070000d6
|
84
|
+
response:
|
85
|
+
status:
|
86
|
+
code: 200
|
87
|
+
message: OK
|
88
|
+
headers:
|
89
|
+
Cache-Control:
|
90
|
+
- max-age=0, private, must-revalidate
|
91
|
+
Content-Type:
|
92
|
+
- text/html; charset=utf-8
|
93
|
+
Date:
|
94
|
+
- Mon, 08 Apr 2013 22:53:56 GMT
|
95
|
+
Etag:
|
96
|
+
- ! '"7215ee9c7d9dc229d2921a40e899ec5f"'
|
97
|
+
Server:
|
98
|
+
- nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
|
99
|
+
Status:
|
100
|
+
- '200'
|
101
|
+
X-Available-Hourly-Calls:
|
102
|
+
- '4999897'
|
103
|
+
X-Available-Monthly-Calls:
|
104
|
+
- '3719999838'
|
105
|
+
X-Max-Hourly-Calls:
|
106
|
+
- '5000000'
|
107
|
+
X-Max-Monthly-Calls:
|
108
|
+
- '3720000000'
|
109
|
+
X-Powered-By:
|
110
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.18
|
111
|
+
X-Rack-Cache:
|
112
|
+
- invalidate, pass
|
113
|
+
X-Request-Id:
|
114
|
+
- 58848554971f6eaef6657b7be15d6e09
|
115
|
+
X-Runtime:
|
116
|
+
- '0.173735'
|
117
|
+
X-Ua-Compatible:
|
118
|
+
- IE=Edge,chrome=1
|
119
|
+
Content-Length:
|
120
|
+
- '1'
|
121
|
+
Connection:
|
122
|
+
- keep-alive
|
123
|
+
body:
|
124
|
+
encoding: US-ASCII
|
125
|
+
string: ! ' '
|
126
|
+
http_version:
|
127
|
+
recorded_at: Mon, 08 Apr 2013 22:53:56 GMT
|
128
|
+
- request:
|
129
|
+
method: post
|
130
|
+
uri: https://api.getchute.com/v2/albums/2406197/remove_assets
|
131
|
+
body:
|
132
|
+
encoding: UTF-8
|
133
|
+
string: ! '{"asset_ids":[[4342325,4342324,534543]]}'
|
134
|
+
headers:
|
135
|
+
Authorization:
|
136
|
+
- OAuth API KEY
|
137
|
+
Content-Type:
|
138
|
+
- application/json
|
139
|
+
Accepts:
|
140
|
+
- application/json
|
141
|
+
X-Client-Id:
|
142
|
+
- 508fc620018d162a070000d6
|
143
|
+
response:
|
144
|
+
status:
|
145
|
+
code: 200
|
146
|
+
message: OK
|
147
|
+
headers:
|
148
|
+
Cache-Control:
|
149
|
+
- max-age=0, private, must-revalidate
|
150
|
+
Content-Type:
|
151
|
+
- text/html; charset=utf-8
|
152
|
+
Date:
|
153
|
+
- Mon, 08 Apr 2013 22:53:57 GMT
|
154
|
+
Etag:
|
155
|
+
- ! '"7215ee9c7d9dc229d2921a40e899ec5f"'
|
156
|
+
Server:
|
157
|
+
- nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
|
158
|
+
Status:
|
159
|
+
- '200'
|
160
|
+
X-Available-Hourly-Calls:
|
161
|
+
- '4999895'
|
162
|
+
X-Available-Monthly-Calls:
|
163
|
+
- '3719999836'
|
164
|
+
X-Max-Hourly-Calls:
|
165
|
+
- '5000000'
|
166
|
+
X-Max-Monthly-Calls:
|
167
|
+
- '3720000000'
|
168
|
+
X-Powered-By:
|
169
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.18
|
170
|
+
X-Rack-Cache:
|
171
|
+
- invalidate, pass
|
172
|
+
X-Request-Id:
|
173
|
+
- 2cc6f00ca116fb27bb6f0ee7b67b5bd2
|
174
|
+
X-Runtime:
|
175
|
+
- '0.028256'
|
176
|
+
X-Ua-Compatible:
|
177
|
+
- IE=Edge,chrome=1
|
178
|
+
Content-Length:
|
179
|
+
- '1'
|
180
|
+
Connection:
|
181
|
+
- keep-alive
|
182
|
+
body:
|
183
|
+
encoding: US-ASCII
|
184
|
+
string: ! ' '
|
185
|
+
http_version:
|
186
|
+
recorded_at: Mon, 08 Apr 2013 22:53:57 GMT
|
187
|
+
recorded_with: VCR 2.2.5
|
@@ -0,0 +1,69 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.getchute.com/v2/albums
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"album":{"name":"some album 2013-04-08 15:53:49 -0700","moderate_comments":true}}'
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- OAuth API KEY
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accepts:
|
15
|
+
- application/json
|
16
|
+
X-Client-Id:
|
17
|
+
- 508fc620018d162a070000d6
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 201
|
21
|
+
message: Created
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- max-age=0, private, must-revalidate
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Date:
|
28
|
+
- Mon, 08 Apr 2013 22:53:50 GMT
|
29
|
+
Etag:
|
30
|
+
- ! '"f146acd211c8001b983e00821a473dc5"'
|
31
|
+
Last-Modified:
|
32
|
+
- Mon, 08 Apr 2013 22:53:50 GMT
|
33
|
+
Server:
|
34
|
+
- nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
|
35
|
+
Status:
|
36
|
+
- '201'
|
37
|
+
X-Available-Hourly-Calls:
|
38
|
+
- '4999910'
|
39
|
+
X-Available-Monthly-Calls:
|
40
|
+
- '3719999851'
|
41
|
+
X-Max-Hourly-Calls:
|
42
|
+
- '5000000'
|
43
|
+
X-Max-Monthly-Calls:
|
44
|
+
- '3720000000'
|
45
|
+
X-Powered-By:
|
46
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.18
|
47
|
+
X-Rack-Cache:
|
48
|
+
- invalidate, pass
|
49
|
+
X-Request-Id:
|
50
|
+
- f536695cd4e6448b9c0504959ec102a4
|
51
|
+
X-Runtime:
|
52
|
+
- '0.059971'
|
53
|
+
X-Ua-Compatible:
|
54
|
+
- IE=Edge,chrome=1
|
55
|
+
Transfer-Encoding:
|
56
|
+
- chunked
|
57
|
+
Connection:
|
58
|
+
- keep-alive
|
59
|
+
body:
|
60
|
+
encoding: US-ASCII
|
61
|
+
string: ! '{"response":{"title":"Album Details","version":2,"code":201,"href":"https://api.getchute.com/v2/albums?album%5Bmoderate_comments%5D=true&album%5Bname%5D=some+album+2013-04-08+15%3A53%3A49+-0700","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999851,"max_hourly_calls":5000000,"available_hourly_calls":4999910}},"data":{"id":2406191,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406191","title":"Album
|
62
|
+
Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406191/assets","title":"Asset
|
63
|
+
Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406191/parcels","title":"Parcel
|
64
|
+
Listing"}},"created_at":"2013-04-08T22:53:50Z","updated_at":"2013-04-08T22:53:50Z","shortcut":"a5Xxnqza","name":"some
|
65
|
+
album 2013-04-08 15:53:49 -0700","description":null,"user":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
|
66
|
+
Details"}},"created_at":"2012-01-17T19:53:39Z","updated_at":"2012-09-15T10:55:51Z","name":"darko1002001","username":"darko1002001","avatar":"http://static.getchute.com/v1/images/avatar-100x100.png","profile":null},"moderate_media":false,"moderate_comments":true,"parent_id":null}}'
|
67
|
+
http_version:
|
68
|
+
recorded_at: Mon, 08 Apr 2013 22:53:50 GMT
|
69
|
+
recorded_with: VCR 2.2.5
|
@@ -0,0 +1,128 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.getchute.com/v2/albums
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"album":{"name":"Created Album"}}'
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- OAuth API KEY
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accepts:
|
15
|
+
- application/json
|
16
|
+
X-Client-Id:
|
17
|
+
- 508fc620018d162a070000d6
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 201
|
21
|
+
message: Created
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- max-age=0, private, must-revalidate
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Date:
|
28
|
+
- Mon, 08 Apr 2013 22:53:53 GMT
|
29
|
+
Etag:
|
30
|
+
- ! '"2613cf878bd5872efb67be035aa0808c"'
|
31
|
+
Last-Modified:
|
32
|
+
- Mon, 08 Apr 2013 22:53:53 GMT
|
33
|
+
Server:
|
34
|
+
- nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
|
35
|
+
Status:
|
36
|
+
- '201'
|
37
|
+
X-Available-Hourly-Calls:
|
38
|
+
- '4999903'
|
39
|
+
X-Available-Monthly-Calls:
|
40
|
+
- '3719999844'
|
41
|
+
X-Max-Hourly-Calls:
|
42
|
+
- '5000000'
|
43
|
+
X-Max-Monthly-Calls:
|
44
|
+
- '3720000000'
|
45
|
+
X-Powered-By:
|
46
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.18
|
47
|
+
X-Rack-Cache:
|
48
|
+
- invalidate, pass
|
49
|
+
X-Request-Id:
|
50
|
+
- b423c1ccbafd2989a9e43aa085324ad9
|
51
|
+
X-Runtime:
|
52
|
+
- '0.031373'
|
53
|
+
X-Ua-Compatible:
|
54
|
+
- IE=Edge,chrome=1
|
55
|
+
Transfer-Encoding:
|
56
|
+
- chunked
|
57
|
+
Connection:
|
58
|
+
- keep-alive
|
59
|
+
body:
|
60
|
+
encoding: US-ASCII
|
61
|
+
string: ! '{"response":{"title":"Album Details","version":2,"code":201,"href":"https://api.getchute.com/v2/albums?album%5Bname%5D=Created+Album","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999844,"max_hourly_calls":5000000,"available_hourly_calls":4999903}},"data":{"id":2406195,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406195","title":"Album
|
62
|
+
Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406195/assets","title":"Asset
|
63
|
+
Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406195/parcels","title":"Parcel
|
64
|
+
Listing"}},"created_at":"2013-04-08T22:53:53Z","updated_at":"2013-04-08T22:53:53Z","shortcut":"a5XBubak","name":"Created
|
65
|
+
Album","description":null,"user":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
|
66
|
+
Details"}},"created_at":"2012-01-17T19:53:39Z","updated_at":"2012-09-15T10:55:51Z","name":"darko1002001","username":"darko1002001","avatar":"http://static.getchute.com/v1/images/avatar-100x100.png","profile":null},"moderate_media":false,"moderate_comments":false,"parent_id":null}}'
|
67
|
+
http_version:
|
68
|
+
recorded_at: Mon, 08 Apr 2013 22:53:53 GMT
|
69
|
+
- request:
|
70
|
+
method: delete
|
71
|
+
uri: https://api.getchute.com/v2/albums/2406195
|
72
|
+
body:
|
73
|
+
encoding: UTF-8
|
74
|
+
string: ! '{}'
|
75
|
+
headers:
|
76
|
+
Authorization:
|
77
|
+
- OAuth API KEY
|
78
|
+
Content-Type:
|
79
|
+
- application/json
|
80
|
+
Accepts:
|
81
|
+
- application/json
|
82
|
+
X-Client-Id:
|
83
|
+
- 508fc620018d162a070000d6
|
84
|
+
response:
|
85
|
+
status:
|
86
|
+
code: 200
|
87
|
+
message: OK
|
88
|
+
headers:
|
89
|
+
Cache-Control:
|
90
|
+
- max-age=0, private, must-revalidate
|
91
|
+
Content-Type:
|
92
|
+
- application/json; charset=utf-8
|
93
|
+
Date:
|
94
|
+
- Mon, 08 Apr 2013 22:53:54 GMT
|
95
|
+
Etag:
|
96
|
+
- ! '"f21a499aea9c9fb62997793fbdb00ad0"'
|
97
|
+
Server:
|
98
|
+
- nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
|
99
|
+
Status:
|
100
|
+
- '200'
|
101
|
+
X-Available-Hourly-Calls:
|
102
|
+
- '4999902'
|
103
|
+
X-Available-Monthly-Calls:
|
104
|
+
- '3719999843'
|
105
|
+
X-Max-Hourly-Calls:
|
106
|
+
- '5000000'
|
107
|
+
X-Max-Monthly-Calls:
|
108
|
+
- '3720000000'
|
109
|
+
X-Powered-By:
|
110
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.18
|
111
|
+
X-Rack-Cache:
|
112
|
+
- invalidate, pass
|
113
|
+
X-Request-Id:
|
114
|
+
- c512527a0bb9f85e7bb9e680bb14b940
|
115
|
+
X-Runtime:
|
116
|
+
- '0.034592'
|
117
|
+
X-Ua-Compatible:
|
118
|
+
- IE=Edge,chrome=1
|
119
|
+
Content-Length:
|
120
|
+
- '257'
|
121
|
+
Connection:
|
122
|
+
- keep-alive
|
123
|
+
body:
|
124
|
+
encoding: US-ASCII
|
125
|
+
string: ! '{"response":{"title":"Album Deleted","version":2,"code":200,"href":"https://api.getchute.com/v2/albums/2406195?","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999843,"max_hourly_calls":5000000,"available_hourly_calls":4999902}}}'
|
126
|
+
http_version:
|
127
|
+
recorded_at: Mon, 08 Apr 2013 22:53:54 GMT
|
128
|
+
recorded_with: VCR 2.2.5
|