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,135 @@
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:51 GMT
29
+ Etag:
30
+ - ! '"064d6bed1049626b58ed99ba77d8af92"'
31
+ Last-Modified:
32
+ - Mon, 08 Apr 2013 22:53:51 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
+ - '4999908'
39
+ X-Available-Monthly-Calls:
40
+ - '3719999849'
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
+ - b1cf1ad63daa6a9fae8546d7ae42fa85
51
+ X-Runtime:
52
+ - '0.033060'
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":3719999849,"max_hourly_calls":5000000,"available_hourly_calls":4999908}},"data":{"id":2406193,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406193","title":"Album
62
+ Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406193/assets","title":"Asset
63
+ Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406193/parcels","title":"Parcel
64
+ Listing"}},"created_at":"2013-04-08T22:53:51Z","updated_at":"2013-04-08T22:53:51Z","shortcut":"a5Xzncbm","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:51 GMT
69
+ - request:
70
+ method: get
71
+ uri: https://api.getchute.com/v2/albums/2406193
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
+ - must-revalidate, private, max-age=0
91
+ Content-Type:
92
+ - application/json; charset=utf-8
93
+ Date:
94
+ - Mon, 08 Apr 2013 22:53:51 GMT
95
+ Etag:
96
+ - ! '"064d6bed1049626b58ed99ba77d8af92"'
97
+ Last-Modified:
98
+ - Mon, 08 Apr 2013 22:53:51 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
+ - '4999906'
105
+ X-Available-Monthly-Calls:
106
+ - '3719999847'
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
+ - miss
115
+ X-Request-Id:
116
+ - 93c5959c76de7f0229b8b14860c528ed
117
+ X-Runtime:
118
+ - '0.027734'
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":"Album Details","version":2,"code":200,"href":"https://api.getchute.com/v2/albums/2406193?","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999847,"max_hourly_calls":5000000,"available_hourly_calls":4999906}},"data":{"id":2406193,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406193","title":"Album
128
+ Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406193/assets","title":"Asset
129
+ Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406193/parcels","title":"Parcel
130
+ Listing"}},"created_at":"2013-04-08T22:53:51Z","updated_at":"2013-04-08T22:53:51Z","shortcut":"a5Xzncbm","name":"Created
131
+ Album","description":null,"user":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
132
+ 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}}'
133
+ http_version:
134
+ recorded_at: Mon, 08 Apr 2013 22:53:52 GMT
135
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,89 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.getchute.com/v2/albums
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"page":null,"per_page":null}'
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:53:49 GMT
29
+ Etag:
30
+ - ! '"7d7d97075218818f484ea5f92a9e56d6"'
31
+ Last-Modified:
32
+ - Mon, 08 Apr 2013 22:28:03 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
+ - '4999911'
39
+ X-Available-Monthly-Calls:
40
+ - '3719999852'
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
+ - 4248197f269802ab55c011cab1a11aeb
51
+ X-Runtime:
52
+ - '0.063589'
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 Listing","version":2,"code":200,"href":"https://api.getchute.com/v2/albums?","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999852,"max_hourly_calls":5000000,"available_hourly_calls":4999911}},"data":[{"id":2406176,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406176","title":"Album
62
+ Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406176/assets","title":"Asset
63
+ Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406176/parcels","title":"Parcel
64
+ Listing"}},"created_at":"2013-04-08T22:28:03Z","updated_at":"2013-04-08T22:28:03Z","shortcut":"a5Xigefp","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},{"id":2406175,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406175","title":"Album
67
+ Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406175/assets","title":"Asset
68
+ Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406175/parcels","title":"Parcel
69
+ Listing"}},"created_at":"2013-04-08T22:27:52Z","updated_at":"2013-04-08T22:27:52Z","shortcut":"a5Xhtcza","name":"Album
70
+ for Tags","description":null,"user":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
71
+ 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},{"id":2406174,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406174","title":"Album
72
+ Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406174/assets","title":"Asset
73
+ Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406174/parcels","title":"Parcel
74
+ Listing"}},"created_at":"2013-04-08T22:27:50Z","updated_at":"2013-04-08T22:27:50Z","shortcut":"a5Xgncfp","name":"Album
75
+ for Hearts","description":null,"user":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
76
+ 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},{"id":2406173,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406173","title":"Album
77
+ Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406173/assets","title":"Asset
78
+ Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406173/parcels","title":"Parcel
79
+ Listing"}},"created_at":"2013-04-08T22:27:44Z","updated_at":"2013-04-08T22:27:44Z","shortcut":"a5Xfdxbs","name":"Album
80
+ for Flags","description":null,"user":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
81
+ 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},{"id":2406172,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406172","title":"Album
82
+ Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406172/assets","title":"Asset
83
+ Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406172/parcels","title":"Parcel
84
+ Listing"}},"created_at":"2013-04-08T22:27:42Z","updated_at":"2013-04-08T22:27:42Z","shortcut":"a5Xepfnd","name":"Album
85
+ for Comments","description":null,"user":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
86
+ 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}],"pagination":{"current_page":1,"next_page":"https://api.getchute.com/v2/albums?&page=2","previous_page":null,"first_page":"https://api.getchute.com/v2/albums?","per_page":5}}'
87
+ http_version:
88
+ recorded_at: Mon, 08 Apr 2013 22:53:49 GMT
89
+ 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:54 GMT
29
+ Etag:
30
+ - ! '"0ea45be6ef8566661a68d1aa84bd9f73"'
31
+ Last-Modified:
32
+ - Mon, 08 Apr 2013 22:53:54 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
+ - '4999901'
39
+ X-Available-Monthly-Calls:
40
+ - '3719999842'
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
+ - cd38b79b65ca8f9a5fb91729478aeb87
51
+ X-Runtime:
52
+ - '0.032136'
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":3719999842,"max_hourly_calls":5000000,"available_hourly_calls":4999901}},"data":{"id":2406196,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406196","title":"Album
62
+ Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406196/assets","title":"Asset
63
+ Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406196/parcels","title":"Parcel
64
+ Listing"}},"created_at":"2013-04-08T22:53:54Z","updated_at":"2013-04-08T22:53:54Z","shortcut":"a5XCzqnh","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:54 GMT
69
+ - request:
70
+ method: get
71
+ uri: https://api.getchute.com/v2/albums/2406196/stats
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
+ - must-revalidate, private, max-age=0
91
+ Content-Type:
92
+ - application/json; charset=utf-8
93
+ Date:
94
+ - Mon, 08 Apr 2013 22:53:55 GMT
95
+ Etag:
96
+ - ! '"9c8dba3fdef8910a2b527f34fd9d6b97"'
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
+ - '4999900'
103
+ X-Available-Monthly-Calls:
104
+ - '3719999841'
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
+ - miss
113
+ X-Request-Id:
114
+ - 64361f2523427d738cfaa398ffcaf11e
115
+ X-Runtime:
116
+ - '0.030902'
117
+ X-Ua-Compatible:
118
+ - IE=Edge,chrome=1
119
+ Content-Length:
120
+ - '98'
121
+ Connection:
122
+ - keep-alive
123
+ body:
124
+ encoding: US-ASCII
125
+ string: ! '{"data":{"user_counts":{"via_upload":0,"via_import":0},"source_counts":{"uploads":0,"imports":0}}}'
126
+ http_version:
127
+ recorded_at: Mon, 08 Apr 2013 22:53:55 GMT
128
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,135 @@
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:52 GMT
29
+ Etag:
30
+ - ! '"0b89248480a8f026147466a353617b5c"'
31
+ Last-Modified:
32
+ - Mon, 08 Apr 2013 22:53:52 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
+ - '4999905'
39
+ X-Available-Monthly-Calls:
40
+ - '3719999846'
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
+ - 25d60ed62aa4565856a06e7080ce3ab1
51
+ X-Runtime:
52
+ - '0.034835'
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":3719999846,"max_hourly_calls":5000000,"available_hourly_calls":4999905}},"data":{"id":2406194,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406194","title":"Album
62
+ Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406194/assets","title":"Asset
63
+ Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406194/parcels","title":"Parcel
64
+ Listing"}},"created_at":"2013-04-08T22:53:52Z","updated_at":"2013-04-08T22:53:52Z","shortcut":"a5XAnyec","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:52 GMT
69
+ - request:
70
+ method: put
71
+ uri: https://api.getchute.com/v2/albums/2406194
72
+ body:
73
+ encoding: UTF-8
74
+ string: ! '{"album":{"name":"Updated Album"}}'
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:53 GMT
95
+ Etag:
96
+ - ! '"0b89248480a8f026147466a353617b5c"'
97
+ Last-Modified:
98
+ - Mon, 08 Apr 2013 22:53:53 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
+ - '4999904'
105
+ X-Available-Monthly-Calls:
106
+ - '3719999845'
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
+ - dbea9cf86b3763c2bba8557afce79248
117
+ X-Runtime:
118
+ - '0.053786'
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":"Album Details","version":2,"code":200,"href":"https://api.getchute.com/v2/albums/2406194?album%5Bname%5D=Updated+Album","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999845,"max_hourly_calls":5000000,"available_hourly_calls":4999904}},"data":{"id":2406194,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406194","title":"Album
128
+ Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406194/assets","title":"Asset
129
+ Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406194/parcels","title":"Parcel
130
+ Listing"}},"created_at":"2013-04-08T22:53:52Z","updated_at":"2013-04-08T22:53:53Z","shortcut":"a5XAnyec","name":"Updated
131
+ Album","description":null,"user":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
132
+ 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}}'
133
+ http_version:
134
+ recorded_at: Mon, 08 Apr 2013 22:53:53 GMT
135
+ recorded_with: VCR 2.2.5