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.
Files changed (85) hide show
  1. data/Gemfile +16 -2
  2. data/Gemfile.lock +52 -0
  3. data/LICENSE.txt +20 -0
  4. data/README.md +46 -0
  5. data/Rakefile +48 -6
  6. data/VERSION +1 -0
  7. data/chute.gemspec +120 -16
  8. data/lib/chute.rb +7 -20
  9. data/lib/chute/client.rb +42 -0
  10. data/lib/chute/configuration.rb +40 -0
  11. data/lib/chute/connection.rb +64 -0
  12. data/lib/chute/response.rb +22 -0
  13. data/lib/chute/v2/albums.rb +60 -0
  14. data/lib/chute/v2/assets.rb +55 -0
  15. data/lib/chute/v2/comments.rb +29 -0
  16. data/lib/chute/v2/flags.rb +21 -0
  17. data/lib/chute/v2/hearts.rb +21 -0
  18. data/lib/chute/v2/parcels.rb +21 -0
  19. data/lib/chute/v2/tags.rb +36 -0
  20. data/lib/chute/v2/triggers.rb +26 -0
  21. data/lib/chute/v2/users.rb +18 -0
  22. data/lib/chute/v2/votes.rb +21 -0
  23. data/lib/chute/version.rb +7 -1
  24. data/spec/chute/chute_spec.rb +64 -0
  25. data/spec/chute/client_spec.rb +82 -0
  26. data/spec/chute/connection_spec.rb +47 -0
  27. data/spec/chute/response_spec.rb +16 -0
  28. data/spec/chute/v2/albums_spec.rb +197 -0
  29. data/spec/chute/v2/assets_spec.rb +171 -0
  30. data/spec/chute/v2/comments_spec.rb +88 -0
  31. data/spec/chute/v2/flags_spec.rb +56 -0
  32. data/spec/chute/v2/hearts_spec.rb +57 -0
  33. data/spec/chute/v2/parcels_spec.rb +24 -0
  34. data/spec/chute/v2/tags_spec.rb +79 -0
  35. data/spec/chute/v2/trigger_spec.rb +127 -0
  36. data/spec/chute/v2/users_spec.rb +53 -0
  37. data/spec/chute/v2/votes_spec.rb +56 -0
  38. data/spec/fixtures/chute_cassettes/albums/album_create_with_permission_view.yml +69 -0
  39. data/spec/fixtures/chute_cassettes/albums/albums_add_remove_assets.yml +187 -0
  40. data/spec/fixtures/chute_cassettes/albums/albums_create.yml +69 -0
  41. data/spec/fixtures/chute_cassettes/albums/albums_delete.yml +128 -0
  42. data/spec/fixtures/chute_cassettes/albums/albums_get.yml +135 -0
  43. data/spec/fixtures/chute_cassettes/albums/albums_list.yml +89 -0
  44. data/spec/fixtures/chute_cassettes/albums/albums_stats.yml +128 -0
  45. data/spec/fixtures/chute_cassettes/albums/albums_update.yml +135 -0
  46. data/spec/fixtures/chute_cassettes/assets/assets_delete.yml +131 -0
  47. data/spec/fixtures/chute_cassettes/assets/assets_geo.yml +197 -0
  48. data/spec/fixtures/chute_cassettes/assets/assets_get.yml +138 -0
  49. data/spec/fixtures/chute_cassettes/assets/assets_import.yml +76 -0
  50. data/spec/fixtures/chute_cassettes/assets/assets_list.yml +77 -0
  51. data/spec/fixtures/chute_cassettes/assets/assets_update.yml +138 -0
  52. data/spec/fixtures/chute_cassettes/comments/comments_create.yml +196 -0
  53. data/spec/fixtures/chute_cassettes/comments/comments_list.yml +259 -0
  54. data/spec/fixtures/chute_cassettes/flags/flags_methods.yml +313 -0
  55. data/spec/fixtures/chute_cassettes/hearts/hearts_methods.yml +254 -0
  56. data/spec/fixtures/chute_cassettes/tags/tags_assets.yml +311 -0
  57. data/spec/fixtures/chute_cassettes/triggers/trigger_errors.yml +62 -0
  58. data/spec/fixtures/chute_cassettes/triggers/triggers_cleanup.yml +184 -0
  59. data/spec/fixtures/chute_cassettes/triggers/triggers_create.yml +65 -0
  60. data/spec/fixtures/chute_cassettes/triggers/triggers_delete.yml +124 -0
  61. data/spec/fixtures/chute_cassettes/triggers/triggers_list.yml +66 -0
  62. data/spec/fixtures/chute_cassettes/triggers/triggers_update.yml +127 -0
  63. data/spec/fixtures/chute_cassettes/users/users_get.yml +128 -0
  64. data/spec/fixtures/chute_cassettes/users/users_me.yml +66 -0
  65. data/spec/fixtures/chute_cassettes/votes/votes_methods.yml +313 -0
  66. data/spec/spec_helper.rb +27 -0
  67. metadata +210 -33
  68. data/.gitignore +0 -5
  69. data/README +0 -125
  70. data/config/chute.rb +0 -0
  71. data/lib/chute/account.rb +0 -58
  72. data/lib/chute/app.rb +0 -32
  73. data/lib/chute/asset.rb +0 -124
  74. data/lib/chute/bundle.rb +0 -72
  75. data/lib/chute/chute.rb +0 -203
  76. data/lib/chute/collection.rb +0 -47
  77. data/lib/chute/comment.rb +0 -32
  78. data/lib/chute/exception.rb +0 -7
  79. data/lib/chute/http_service.rb +0 -114
  80. data/lib/chute/inbox.rb +0 -41
  81. data/lib/chute/parcel.rb +0 -45
  82. data/lib/chute/resource.rb +0 -354
  83. data/lib/chute/user.rb +0 -113
  84. data/lib/chute/util.rb +0 -14
  85. data/test/test_sudoku.rb +0 -7
@@ -0,0 +1,127 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.getchute.com/v2/triggers
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"url":"http://www.opencalais.com/HTTPexamples","event":"asset_updated"}'
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:54:17 GMT
29
+ Etag:
30
+ - ! '"52ffb2b97ae5c6a11b99ec6409571240"'
31
+ Last-Modified:
32
+ - Mon, 08 Apr 2013 22:54:17 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
+ - '4999858'
39
+ X-Available-Monthly-Calls:
40
+ - '3719999799'
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
+ - 164a8c1ba1e5a78209f2827b48321f97
51
+ X-Runtime:
52
+ - '0.024615'
53
+ X-Ua-Compatible:
54
+ - IE=Edge,chrome=1
55
+ Content-Length:
56
+ - '673'
57
+ Connection:
58
+ - keep-alive
59
+ body:
60
+ encoding: US-ASCII
61
+ string: ! '{"response":{"title":"Trigger Details","version":2,"code":201,"href":"https://api.getchute.com/v2/triggers?event=asset_updated&trigger%5Bevent%5D=asset_updated&trigger%5Burl%5D=http%3A%2F%2Fwww.opencalais.com%2FHTTPexamples&url=http%3A%2F%2Fwww.opencalais.com%2FHTTPexamples","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999799,"max_hourly_calls":5000000,"available_hourly_calls":4999858}},"data":{"id":31,"links":{"self":{"href":"http://api.getchute.com/v2/triggers/31","title":"Trigger
62
+ Details"}},"created_at":"2013-04-08T22:54:17Z","updated_at":"2013-04-08T22:54:17Z","url":"http://www.opencalais.com/HTTPexamples","event":"asset_updated"}}'
63
+ http_version:
64
+ recorded_at: Mon, 08 Apr 2013 22:54:17 GMT
65
+ - request:
66
+ method: put
67
+ uri: https://api.getchute.com/v2/triggers/31
68
+ body:
69
+ encoding: UTF-8
70
+ string: ! '{"url":"http://www.opencalais.com/HTTPexamples","event":"album_asset_moderated"}'
71
+ headers:
72
+ Authorization:
73
+ - OAuth API KEY
74
+ Content-Type:
75
+ - application/json
76
+ Accepts:
77
+ - application/json
78
+ X-Client-Id:
79
+ - 508fc620018d162a070000d6
80
+ response:
81
+ status:
82
+ code: 200
83
+ message: OK
84
+ headers:
85
+ Cache-Control:
86
+ - max-age=0, private, must-revalidate
87
+ Content-Type:
88
+ - application/json; charset=utf-8
89
+ Date:
90
+ - Mon, 08 Apr 2013 22:54:17 GMT
91
+ Etag:
92
+ - ! '"52ffb2b97ae5c6a11b99ec6409571240"'
93
+ Last-Modified:
94
+ - Mon, 08 Apr 2013 22:54:17 GMT
95
+ Server:
96
+ - nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
97
+ Status:
98
+ - '200'
99
+ X-Available-Hourly-Calls:
100
+ - '4999857'
101
+ X-Available-Monthly-Calls:
102
+ - '3719999798'
103
+ X-Max-Hourly-Calls:
104
+ - '5000000'
105
+ X-Max-Monthly-Calls:
106
+ - '3720000000'
107
+ X-Powered-By:
108
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.18
109
+ X-Rack-Cache:
110
+ - invalidate, pass
111
+ X-Request-Id:
112
+ - 9f439275c20297ee59f5832fbb3c09da
113
+ X-Runtime:
114
+ - '0.094906'
115
+ X-Ua-Compatible:
116
+ - IE=Edge,chrome=1
117
+ Content-Length:
118
+ - '700'
119
+ Connection:
120
+ - keep-alive
121
+ body:
122
+ encoding: US-ASCII
123
+ string: ! '{"response":{"title":"Trigger Details","version":2,"code":200,"href":"https://api.getchute.com/v2/triggers/31?event=album_asset_moderated&trigger%5Bevent%5D=album_asset_moderated&trigger%5Burl%5D=http%3A%2F%2Fwww.opencalais.com%2FHTTPexamples&url=http%3A%2F%2Fwww.opencalais.com%2FHTTPexamples","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999798,"max_hourly_calls":5000000,"available_hourly_calls":4999857}},"data":{"id":31,"links":{"self":{"href":"http://api.getchute.com/v2/triggers/31","title":"Trigger
124
+ Details"}},"created_at":"2013-04-08T22:54:17Z","updated_at":"2013-04-08T22:54:17Z","url":"http://www.opencalais.com/HTTPexamples","event":"album_asset_moderated"}}'
125
+ http_version:
126
+ recorded_at: Mon, 08 Apr 2013 22:54:17 GMT
127
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,128 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.getchute.com/v2/me
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{}'
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: 200
21
+ message: OK
22
+ headers:
23
+ Cache-Control:
24
+ - must-revalidate, private, max-age=0
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Date:
28
+ - Mon, 08 Apr 2013 22:54:21 GMT
29
+ Etag:
30
+ - ! '"b16f7001f3d9f926f4c01e7206b8c653"'
31
+ Last-Modified:
32
+ - Sat, 15 Sep 2012 10:55:51 GMT
33
+ Server:
34
+ - nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
35
+ Status:
36
+ - '200'
37
+ X-Available-Hourly-Calls:
38
+ - '4999849'
39
+ X-Available-Monthly-Calls:
40
+ - '3719999790'
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
+ - miss
49
+ X-Request-Id:
50
+ - 84f9a8f9bebda8a7e8660a8ebc337941
51
+ X-Runtime:
52
+ - '0.022175'
53
+ X-Ua-Compatible:
54
+ - IE=Edge,chrome=1
55
+ Content-Length:
56
+ - '662'
57
+ Connection:
58
+ - keep-alive
59
+ body:
60
+ encoding: US-ASCII
61
+ string: ! '{"response":{"title":"User Details","version":2,"code":200,"href":"https://api.getchute.com/v2/me?","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999790,"max_hourly_calls":5000000,"available_hourly_calls":4999849}},"data":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
62
+ 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,"email":"darko@getchute.com","oauth_token":"API
63
+ KEY"}}'
64
+ http_version:
65
+ recorded_at: Mon, 08 Apr 2013 22:54:21 GMT
66
+ - request:
67
+ method: get
68
+ uri: https://api.getchute.com/v2/users/545
69
+ body:
70
+ encoding: UTF-8
71
+ string: ! '{}'
72
+ headers:
73
+ Authorization:
74
+ - OAuth API KEY
75
+ Content-Type:
76
+ - application/json
77
+ Accepts:
78
+ - application/json
79
+ X-Client-Id:
80
+ - 508fc620018d162a070000d6
81
+ response:
82
+ status:
83
+ code: 200
84
+ message: OK
85
+ headers:
86
+ Cache-Control:
87
+ - must-revalidate, private, max-age=0
88
+ Content-Type:
89
+ - application/json; charset=utf-8
90
+ Date:
91
+ - Mon, 08 Apr 2013 22:54:22 GMT
92
+ Etag:
93
+ - ! '"b16f7001f3d9f926f4c01e7206b8c653"'
94
+ Last-Modified:
95
+ - Sat, 15 Sep 2012 10:55:51 GMT
96
+ Server:
97
+ - nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
98
+ Status:
99
+ - '200'
100
+ X-Available-Hourly-Calls:
101
+ - '4999848'
102
+ X-Available-Monthly-Calls:
103
+ - '3719999789'
104
+ X-Max-Hourly-Calls:
105
+ - '5000000'
106
+ X-Max-Monthly-Calls:
107
+ - '3720000000'
108
+ X-Powered-By:
109
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.18
110
+ X-Rack-Cache:
111
+ - miss
112
+ X-Request-Id:
113
+ - 3facb636e87d7db49aaf002398755869
114
+ X-Runtime:
115
+ - '0.020778'
116
+ X-Ua-Compatible:
117
+ - IE=Edge,chrome=1
118
+ Content-Length:
119
+ - '559'
120
+ Connection:
121
+ - keep-alive
122
+ body:
123
+ encoding: US-ASCII
124
+ string: ! '{"response":{"title":"User Details","version":2,"code":200,"href":"https://api.getchute.com/v2/users/545?","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999789,"max_hourly_calls":5000000,"available_hourly_calls":4999848}},"data":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
125
+ 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}}'
126
+ http_version:
127
+ recorded_at: Mon, 08 Apr 2013 22:54:22 GMT
128
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,66 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.getchute.com/v2/me
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{}'
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: 200
21
+ message: OK
22
+ headers:
23
+ Cache-Control:
24
+ - must-revalidate, private, max-age=0
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Date:
28
+ - Mon, 08 Apr 2013 22:54:21 GMT
29
+ Etag:
30
+ - ! '"b16f7001f3d9f926f4c01e7206b8c653"'
31
+ Last-Modified:
32
+ - Sat, 15 Sep 2012 10:55:51 GMT
33
+ Server:
34
+ - nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
35
+ Status:
36
+ - '200'
37
+ X-Available-Hourly-Calls:
38
+ - '4999850'
39
+ X-Available-Monthly-Calls:
40
+ - '3719999791'
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
+ - miss
49
+ X-Request-Id:
50
+ - d796aacd2625d845357e9bd9e6210ba6
51
+ X-Runtime:
52
+ - '0.023979'
53
+ X-Ua-Compatible:
54
+ - IE=Edge,chrome=1
55
+ Content-Length:
56
+ - '662'
57
+ Connection:
58
+ - keep-alive
59
+ body:
60
+ encoding: US-ASCII
61
+ string: ! '{"response":{"title":"User Details","version":2,"code":200,"href":"https://api.getchute.com/v2/me?","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999791,"max_hourly_calls":5000000,"available_hourly_calls":4999850}},"data":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
62
+ 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,"email":"darko@getchute.com","oauth_token":"API
63
+ KEY"}}'
64
+ http_version:
65
+ recorded_at: Mon, 08 Apr 2013 22:54:21 GMT
66
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,313 @@
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":"Album for Votes"}}'
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:54:23 GMT
29
+ Etag:
30
+ - ! '"a0e168c2468d985d7968e39c769a326a"'
31
+ Last-Modified:
32
+ - Mon, 08 Apr 2013 22:54:23 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
+ - '4999847'
39
+ X-Available-Monthly-Calls:
40
+ - '3719999788'
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
+ - 0b17f192fffdcb680515f6d2431455bf
51
+ X-Runtime:
52
+ - '0.076759'
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=Album+for+Votes","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999788,"max_hourly_calls":5000000,"available_hourly_calls":4999847}},"data":{"id":2406203,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406203","title":"Album
62
+ Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406203/assets","title":"Asset
63
+ Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406203/parcels","title":"Parcel
64
+ Listing"}},"created_at":"2013-04-08T22:54:23Z","updated_at":"2013-04-08T22:54:23Z","shortcut":"a5XJubto","name":"Album
65
+ for Votes","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:54:23 GMT
69
+ - request:
70
+ method: post
71
+ uri: https://api.getchute.com/v2/albums/2406203/assets/import
72
+ body:
73
+ encoding: UTF-8
74
+ string: ! '{"urls":["http://sphotos-f.ak.fbcdn.net/hphotos-ak-snc6/6393_451942991531262_1464781412_n.jpg"]}'
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:54:23 GMT
95
+ Etag:
96
+ - ! '"d9bdd7ad9e4993a0c72e3aae6d97ad7d"'
97
+ Last-Modified:
98
+ - Wed, 05 Dec 2012 14:19:19 GMT
99
+ Server:
100
+ - nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
101
+ Status:
102
+ - '200'
103
+ X-Available-Hourly-Calls:
104
+ - '4999846'
105
+ X-Available-Monthly-Calls:
106
+ - '3719999787'
107
+ X-Max-Hourly-Calls:
108
+ - '5000000'
109
+ X-Max-Monthly-Calls:
110
+ - '3720000000'
111
+ X-Powered-By:
112
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.18
113
+ X-Rack-Cache:
114
+ - invalidate, pass
115
+ X-Request-Id:
116
+ - 6ab690bbbe574cd15f5e1ebc33b9ac76
117
+ X-Runtime:
118
+ - '0.126584'
119
+ X-Ua-Compatible:
120
+ - IE=Edge,chrome=1
121
+ Transfer-Encoding:
122
+ - chunked
123
+ Connection:
124
+ - keep-alive
125
+ body:
126
+ encoding: US-ASCII
127
+ string: ! '{"response":{"title":"Imported Assets","version":2,"code":200,"href":"https://api.getchute.com/v2/albums/2406203/assets/import?&urls%5B%5D=http%3A%2F%2Fsphotos-f.ak.fbcdn.net%2Fhphotos-ak-snc6%2F6393_451942991531262_1464781412_n.jpg","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999787,"max_hourly_calls":5000000,"available_hourly_calls":4999846}},"data":[{"id":79517672,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406203/assets/79517672","title":"Asset
128
+ Details"},"exif":{"href":"http://api.getchute.com/v2/albums/2406203/assets/79517672/exif","title":"Exif
129
+ Details"},"geo":{"href":"http://api.getchute.com/v2/albums/2406203/assets/79517672/geo","title":"Geo
130
+ Details"},"heart":{"href":"http://api.getchute.com/v2/albums/a5XJubto/assets/5nEb6mbik/hearts","title":"Heart"},"vote":{"href":"http://api.getchute.com/v2/albums/a5XJubto/assets/5nEb6mbik/votes","title":"Vote"}},"created_at":"2012-12-05T14:19:19Z","updated_at":"2012-12-05T14:19:19Z","thumbnail":"http://media.getchute.com/media/5nEb6mbik/75x75","url":"http://media.getchute.com/media/5nEb6mbik","shortcut":"5nEb6mbik","type":"image","caption":null,"dimensions":{"width":null,"height":null},"location":null,"source":{"source":"imported","source_id":null,"source_url":"http://sphotos-f.ak.fbcdn.net/hphotos-ak-snc6/6393_451942991531262_1464781412_n.jpg","service":null,"import_id":null,"import_url":null,"original_url":"http://media.getchute.com/media/5nEb6mbik"},"service":"uploaded"}]}'
131
+ http_version:
132
+ recorded_at: Mon, 08 Apr 2013 22:54:23 GMT
133
+ - request:
134
+ method: post
135
+ uri: https://api.getchute.com/v2/albums/2406203/assets/79517672/votes
136
+ body:
137
+ encoding: UTF-8
138
+ string: ! '{}'
139
+ headers:
140
+ Authorization:
141
+ - OAuth API KEY
142
+ Content-Type:
143
+ - application/json
144
+ Accepts:
145
+ - application/json
146
+ X-Client-Id:
147
+ - 508fc620018d162a070000d6
148
+ response:
149
+ status:
150
+ code: 201
151
+ message: Created
152
+ headers:
153
+ Cache-Control:
154
+ - max-age=0, private, must-revalidate
155
+ Content-Type:
156
+ - application/json; charset=utf-8
157
+ Date:
158
+ - Mon, 08 Apr 2013 22:54:24 GMT
159
+ Etag:
160
+ - ! '"e9dbddf88d30c26fc1909fbf929d154f"'
161
+ Last-Modified:
162
+ - Mon, 08 Apr 2013 22:54:24 GMT
163
+ Server:
164
+ - nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
165
+ Status:
166
+ - '201'
167
+ X-Available-Hourly-Calls:
168
+ - '4999845'
169
+ X-Available-Monthly-Calls:
170
+ - '3719999786'
171
+ X-Max-Hourly-Calls:
172
+ - '5000000'
173
+ X-Max-Monthly-Calls:
174
+ - '3720000000'
175
+ X-Powered-By:
176
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.18
177
+ X-Rack-Cache:
178
+ - invalidate, pass
179
+ X-Request-Id:
180
+ - 93dbe01d0f5909ad3f9f6bfd6d3cb58d
181
+ X-Runtime:
182
+ - '0.051885'
183
+ X-Ua-Compatible:
184
+ - IE=Edge,chrome=1
185
+ Content-Length:
186
+ - '537'
187
+ Connection:
188
+ - keep-alive
189
+ body:
190
+ encoding: US-ASCII
191
+ string: ! '{"response":{"title":"Vote Details","version":2,"code":201,"href":"https://api.getchute.com/v2/albums/2406203/assets/79517672/votes?","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999786,"max_hourly_calls":5000000,"available_hourly_calls":4999845}},"data":{"id":8,"links":{"self":{"href":"http://api.getchute.com/v2/votes/8","title":"Vote
192
+ Details"}},"created_at":"2013-04-08T22:54:24Z","updated_at":"2013-04-08T22:54:24Z","identifier":"eivtuvuddgguymqwslez1365461664","album_id":2406203,"asset_id":79517672}}'
193
+ http_version:
194
+ recorded_at: Mon, 08 Apr 2013 22:54:24 GMT
195
+ - request:
196
+ method: get
197
+ uri: https://api.getchute.com/v2/albums/2406203/assets/79517672/votes
198
+ body:
199
+ encoding: UTF-8
200
+ string: ! '{}'
201
+ headers:
202
+ Authorization:
203
+ - OAuth API KEY
204
+ Content-Type:
205
+ - application/json
206
+ Accepts:
207
+ - application/json
208
+ X-Client-Id:
209
+ - 508fc620018d162a070000d6
210
+ response:
211
+ status:
212
+ code: 201
213
+ message: Created
214
+ headers:
215
+ Cache-Control:
216
+ - must-revalidate, private, max-age=0
217
+ Content-Type:
218
+ - application/json; charset=utf-8
219
+ Date:
220
+ - Mon, 08 Apr 2013 22:54:24 GMT
221
+ Etag:
222
+ - ! '"e9d08298f4f611d336543a2f15e9e238"'
223
+ Server:
224
+ - nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
225
+ Status:
226
+ - '201'
227
+ X-Available-Hourly-Calls:
228
+ - '4999844'
229
+ X-Available-Monthly-Calls:
230
+ - '3719999785'
231
+ X-Max-Hourly-Calls:
232
+ - '5000000'
233
+ X-Max-Monthly-Calls:
234
+ - '3720000000'
235
+ X-Powered-By:
236
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.18
237
+ X-Rack-Cache:
238
+ - miss
239
+ X-Request-Id:
240
+ - 4d6f232870fa20990f917fdcdd012878
241
+ X-Runtime:
242
+ - '0.037590'
243
+ X-Ua-Compatible:
244
+ - IE=Edge,chrome=1
245
+ Content-Length:
246
+ - '295'
247
+ Connection:
248
+ - keep-alive
249
+ body:
250
+ encoding: US-ASCII
251
+ string: ! '{"response":{"title":"Vote Count","version":2,"code":201,"href":"https://api.getchute.com/v2/albums/2406203/assets/79517672/votes?","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999785,"max_hourly_calls":5000000,"available_hourly_calls":4999844}},"data":{"count":1}}'
252
+ http_version:
253
+ recorded_at: Mon, 08 Apr 2013 22:54:24 GMT
254
+ - request:
255
+ method: delete
256
+ uri: https://api.getchute.com/v2/albums/2406203/assets/79517672/votes
257
+ body:
258
+ encoding: UTF-8
259
+ string: ! '{}'
260
+ headers:
261
+ Authorization:
262
+ - OAuth API KEY
263
+ Content-Type:
264
+ - application/json
265
+ Accepts:
266
+ - application/json
267
+ X-Client-Id:
268
+ - 508fc620018d162a070000d6
269
+ response:
270
+ status:
271
+ code: 200
272
+ message: OK
273
+ headers:
274
+ Cache-Control:
275
+ - max-age=0, private, must-revalidate
276
+ Content-Type:
277
+ - application/json; charset=utf-8
278
+ Date:
279
+ - Mon, 08 Apr 2013 22:54:25 GMT
280
+ Etag:
281
+ - ! '"56fe5b2a6ce7708d83c814a90e78cea7"'
282
+ Server:
283
+ - nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
284
+ Status:
285
+ - '200'
286
+ X-Available-Hourly-Calls:
287
+ - '4999843'
288
+ X-Available-Monthly-Calls:
289
+ - '3719999784'
290
+ X-Max-Hourly-Calls:
291
+ - '5000000'
292
+ X-Max-Monthly-Calls:
293
+ - '3720000000'
294
+ X-Powered-By:
295
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.18
296
+ X-Rack-Cache:
297
+ - invalidate, pass
298
+ X-Request-Id:
299
+ - 9d8b6d65bc44030337cc23814fe4fe3b
300
+ X-Runtime:
301
+ - '0.030379'
302
+ X-Ua-Compatible:
303
+ - IE=Edge,chrome=1
304
+ Content-Length:
305
+ - '279'
306
+ Connection:
307
+ - keep-alive
308
+ body:
309
+ encoding: US-ASCII
310
+ string: ! '{"response":{"title":"Heart Deleted","version":2,"code":200,"href":"https://api.getchute.com/v2/albums/2406203/assets/79517672/votes?","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999784,"max_hourly_calls":5000000,"available_hourly_calls":4999843}}}'
311
+ http_version:
312
+ recorded_at: Mon, 08 Apr 2013 22:54:25 GMT
313
+ recorded_with: VCR 2.2.5