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,76 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.getchute.com/v2/assets/import
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"urls":["http://www.wix.com/blog/wp-content/uploads/2012/08/HowToGoBeyondStockPhotoCliches.jpg","http://static.guim.co.uk/sys-images/Guardian/Pix/pictures/2012/11/27/1354010019306/Brad-Pitt-010.jpg","http://datastore01.rediff.com/h1500-w1500/thumb/52605E5F6D6C65665C60665C696C7371/fuugfaw7icy0hq4j.D.0.Richa-Gangopadhyay-Latest-Hot-Photo.jpg"]}'
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
+ - max-age=0, private, must-revalidate
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Date:
28
+ - Mon, 08 Apr 2013 22:53:58 GMT
29
+ Etag:
30
+ - ! '"638e131880d8730e0c13e2a49e710c1c"'
31
+ Last-Modified:
32
+ - Mon, 08 Apr 2013 22:27:36 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
+ - '4999893'
39
+ X-Available-Monthly-Calls:
40
+ - '3719999834'
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
+ - 589191d22214427b834ae8a3c463688e
51
+ X-Runtime:
52
+ - '0.062099'
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":"Imported Assets","warning":"Deprecated route:
62
+ This will be disabled soon. Please include an album in the route to access
63
+ an asset.","version":2,"code":200,"href":"https://api.getchute.com/v2/assets/import?&urls%5B%5D=http%3A%2F%2Fwww.wix.com%2Fblog%2Fwp-content%2Fuploads%2F2012%2F08%2FHowToGoBeyondStockPhotoCliches.jpg&urls%5B%5D=http%3A%2F%2Fstatic.guim.co.uk%2Fsys-images%2FGuardian%2FPix%2Fpictures%2F2012%2F11%2F27%2F1354010019306%2FBrad-Pitt-010.jpg&urls%5B%5D=http%3A%2F%2Fdatastore01.rediff.com%2Fh1500-w1500%2Fthumb%2F52605E5F6D6C65665C60665C696C7371%2Ffuugfaw7icy0hq4j.D.0.Richa-Gangopadhyay-Latest-Hot-Photo.jpg","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999834,"max_hourly_calls":5000000,"available_hourly_calls":4999893}},"data":[{"id":71907823,"links":{"self":{"href":"http://api.getchute.com/v2/assets/71907823","title":"Asset
64
+ Details"},"exif":{"href":"http://api.getchute.com/v2/assets/71907823/exif","title":"Exif
65
+ Details"},"geo":{"href":"http://api.getchute.com/v2/assets/71907823/geo","title":"Geo
66
+ Details"}},"created_at":"2012-11-28T11:12:02Z","updated_at":"2013-04-08T22:27:36Z","thumbnail":"http://media.getchute.com/media/4RIvBzgbp/75x75","url":"http://media.getchute.com/media/4RIvBzgbp","shortcut":"4RIvBzgbp","type":"image","caption":"New
67
+ Asset Title","dimensions":{"width":null,"height":null},"location":null,"source":{"source":"imported","source_id":null,"source_url":"http://www.wix.com/blog/wp-content/uploads/2012/08/HowToGoBeyondStockPhotoCliches.jpg","service":null,"import_id":null,"import_url":null,"original_url":"http://media.getchute.com/media/4RIvBzgbp"},"service":"uploaded"},{"id":336387456,"links":{"self":{"href":"http://api.getchute.com/v2/assets/336387456","title":"Asset
68
+ Details"},"exif":{"href":"http://api.getchute.com/v2/assets/336387456/exif","title":"Exif
69
+ Details"},"geo":{"href":"http://api.getchute.com/v2/assets/336387456/geo","title":"Geo
70
+ Details"}},"created_at":"2013-03-25T18:27:00Z","updated_at":"2013-03-25T18:27:00Z","thumbnail":"http://media.getchute.com/media/mLrK8hvfb/75x75","url":"http://media.getchute.com/media/mLrK8hvfb","shortcut":"mLrK8hvfb","type":"image","caption":null,"dimensions":{"width":null,"height":null},"location":null,"source":{"source":"import","source_id":null,"source_url":"http://static.guim.co.uk/sys-images/Guardian/Pix/pictures/2012/11/27/1354010019306/Brad-Pitt-010.jpg","service":null,"import_id":null,"import_url":null,"original_url":"http://media.getchute.com/media/mLrK8hvfb"},"service":"uploaded"},{"id":336387457,"links":{"self":{"href":"http://api.getchute.com/v2/assets/336387457","title":"Asset
71
+ Details"},"exif":{"href":"http://api.getchute.com/v2/assets/336387457/exif","title":"Exif
72
+ Details"},"geo":{"href":"http://api.getchute.com/v2/assets/336387457/geo","title":"Geo
73
+ Details"}},"created_at":"2013-03-25T18:27:00Z","updated_at":"2013-03-25T18:27:00Z","thumbnail":"http://media.getchute.com/media/mLrK9uvyh/75x75","url":"http://media.getchute.com/media/mLrK9uvyh","shortcut":"mLrK9uvyh","type":"image","caption":null,"dimensions":{"width":null,"height":null},"location":null,"source":{"source":"import","source_id":null,"source_url":"http://datastore01.rediff.com/h1500-w1500/thumb/52605E5F6D6C65665C60665C696C7371/fuugfaw7icy0hq4j.D.0.Richa-Gangopadhyay-Latest-Hot-Photo.jpg","service":null,"import_id":null,"import_url":null,"original_url":"http://media.getchute.com/media/mLrK9uvyh"},"service":"uploaded"}]}'
74
+ http_version:
75
+ recorded_at: Mon, 08 Apr 2013 22:53:58 GMT
76
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,77 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.getchute.com/v2/albums/2327121/assets
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
+ - text/html; charset=utf-8
27
+ Date:
28
+ - Mon, 08 Apr 2013 22:53:57 GMT
29
+ Etag:
30
+ - ! '"0331a052c993f5b3b558f3180d48d85b"'
31
+ Last-Modified:
32
+ - Mon, 08 Apr 2013 22:27:36 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
+ - '4999894'
39
+ X-Available-Monthly-Calls:
40
+ - '3719999835'
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
+ - 4ea0bc04c23fb6ff302ec59080b21ca1
51
+ X-Runtime:
52
+ - '0.042289'
53
+ X-Ua-Compatible:
54
+ - IE=Edge,chrome=1
55
+ Content-Length:
56
+ - '4837'
57
+ Connection:
58
+ - keep-alive
59
+ body:
60
+ encoding: US-ASCII
61
+ string: ! '{"response":{"title":"Asset Listing","version":2,"code":200,"href":"https://api.getchute.com/v2/albums/2327121/assets?","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999835,"max_hourly_calls":5000000,"available_hourly_calls":4999894}},"data":[{"id":336387457,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2327121/assets/336387457","title":"Asset
62
+ Details"},"exif":{"href":"http://api.getchute.com/v2/albums/2327121/assets/336387457/exif","title":"Exif
63
+ Details"},"geo":{"href":"http://api.getchute.com/v2/albums/2327121/assets/336387457/geo","title":"Geo
64
+ Details"},"heart":{"href":"http://api.getchute.com/v2/albums/9Lodbnip/assets/mLrK9uvyh/hearts","title":"Heart"},"vote":{"href":"http://api.getchute.com/v2/albums/9Lodbnip/assets/mLrK9uvyh/votes","title":"Vote"}},"created_at":"2013-03-25T18:27:00Z","updated_at":"2013-03-25T18:27:00Z","thumbnail":"http://media.getchute.com/m/mLrK9uvyh/c/2327121/75x75","url":"http://media.getchute.com/m/mLrK9uvyh/c/2327121","shortcut":"mLrK9uvyh","type":"image","caption":null,"dimensions":{"width":null,"height":null},"location":null,"source":{"source":"import","source_id":null,"source_url":"http://datastore01.rediff.com/h1500-w1500/thumb/52605E5F6D6C65665C60665C696C7371/fuugfaw7icy0hq4j.D.0.Richa-Gangopadhyay-Latest-Hot-Photo.jpg","service":null,"import_id":null,"import_url":null,"original_url":"http://media.getchute.com/m/mLrK9uvyh/c/2327121"},"service":"uploaded","user":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
65
+ 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},"votes":0,"hearts":0,"tags":[],"chute_asset_id":"541316993"},{"id":336387456,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2327121/assets/336387456","title":"Asset
66
+ Details"},"exif":{"href":"http://api.getchute.com/v2/albums/2327121/assets/336387456/exif","title":"Exif
67
+ Details"},"geo":{"href":"http://api.getchute.com/v2/albums/2327121/assets/336387456/geo","title":"Geo
68
+ Details"},"heart":{"href":"http://api.getchute.com/v2/albums/9Lodbnip/assets/mLrK8hvfb/hearts","title":"Heart"},"vote":{"href":"http://api.getchute.com/v2/albums/9Lodbnip/assets/mLrK8hvfb/votes","title":"Vote"}},"created_at":"2013-03-25T18:27:00Z","updated_at":"2013-03-25T18:27:00Z","thumbnail":"http://media.getchute.com/m/mLrK8hvfb/c/2327121/75x75","url":"http://media.getchute.com/m/mLrK8hvfb/c/2327121","shortcut":"mLrK8hvfb","type":"image","caption":null,"dimensions":{"width":null,"height":null},"location":null,"source":{"source":"import","source_id":null,"source_url":"http://static.guim.co.uk/sys-images/Guardian/Pix/pictures/2012/11/27/1354010019306/Brad-Pitt-010.jpg","service":null,"import_id":null,"import_url":null,"original_url":"http://media.getchute.com/m/mLrK8hvfb/c/2327121"},"service":"uploaded","user":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
69
+ 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},"votes":0,"hearts":0,"tags":[],"chute_asset_id":"541316992"},{"id":71907823,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2327121/assets/71907823","title":"Asset
70
+ Details"},"exif":{"href":"http://api.getchute.com/v2/albums/2327121/assets/71907823/exif","title":"Exif
71
+ Details"},"geo":{"href":"http://api.getchute.com/v2/albums/2327121/assets/71907823/geo","title":"Geo
72
+ Details"},"heart":{"href":"http://api.getchute.com/v2/albums/9Lodbnip/assets/4RIvBzgbp/hearts","title":"Heart"},"vote":{"href":"http://api.getchute.com/v2/albums/9Lodbnip/assets/4RIvBzgbp/votes","title":"Vote"}},"created_at":"2012-11-28T11:12:02Z","updated_at":"2013-04-08T22:27:36Z","thumbnail":"http://media.getchute.com/m/4RIvBzgbp/c/2327121/75x75","url":"http://media.getchute.com/m/4RIvBzgbp/c/2327121","shortcut":"4RIvBzgbp","type":"image","caption":"New
73
+ Asset Title","dimensions":{"width":null,"height":null},"location":null,"source":{"source":"imported","source_id":null,"source_url":"http://www.wix.com/blog/wp-content/uploads/2012/08/HowToGoBeyondStockPhotoCliches.jpg","service":null,"import_id":null,"import_url":null,"original_url":"http://media.getchute.com/m/4RIvBzgbp/c/2327121"},"service":"uploaded","user":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
74
+ 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},"votes":0,"hearts":0,"tags":[],"chute_asset_id":"541316991"}]}'
75
+ http_version:
76
+ recorded_at: Mon, 08 Apr 2013 22:53:57 GMT
77
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,138 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.getchute.com/v2/assets/import
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"urls":"http://www.wix.com/blog/wp-content/uploads/2012/08/HowToGoBeyondStockPhotoCliches.jpg"}'
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
+ - max-age=0, private, must-revalidate
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Date:
28
+ - Mon, 08 Apr 2013 22:53:59 GMT
29
+ Etag:
30
+ - ! '"c9ca3f955bdf76e7d7643d1e2bd29108"'
31
+ Last-Modified:
32
+ - Mon, 08 Apr 2013 22:27:36 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
+ - '4999890'
39
+ X-Available-Monthly-Calls:
40
+ - '3719999831'
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
+ - cda98bd25bbfa5ef1f97e2505b93c6f0
51
+ X-Runtime:
52
+ - '0.103295'
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":"Imported Assets","warning":"Deprecated route:
62
+ This will be disabled soon. Please include an album in the route to access
63
+ an asset.","version":2,"code":200,"href":"https://api.getchute.com/v2/assets/import?&urls=http%3A%2F%2Fwww.wix.com%2Fblog%2Fwp-content%2Fuploads%2F2012%2F08%2FHowToGoBeyondStockPhotoCliches.jpg","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999831,"max_hourly_calls":5000000,"available_hourly_calls":4999890}},"data":[{"id":71907823,"links":{"self":{"href":"http://api.getchute.com/v2/assets/71907823","title":"Asset
64
+ Details"},"exif":{"href":"http://api.getchute.com/v2/assets/71907823/exif","title":"Exif
65
+ Details"},"geo":{"href":"http://api.getchute.com/v2/assets/71907823/geo","title":"Geo
66
+ Details"}},"created_at":"2012-11-28T11:12:02Z","updated_at":"2013-04-08T22:27:36Z","thumbnail":"http://media.getchute.com/media/4RIvBzgbp/75x75","url":"http://media.getchute.com/media/4RIvBzgbp","shortcut":"4RIvBzgbp","type":"image","caption":"New
67
+ Asset Title","dimensions":{"width":null,"height":null},"location":null,"source":{"source":"imported","source_id":null,"source_url":"http://www.wix.com/blog/wp-content/uploads/2012/08/HowToGoBeyondStockPhotoCliches.jpg","service":null,"import_id":null,"import_url":null,"original_url":"http://media.getchute.com/media/4RIvBzgbp"},"service":"uploaded"}]}'
68
+ http_version:
69
+ recorded_at: Mon, 08 Apr 2013 22:53:59 GMT
70
+ - request:
71
+ method: put
72
+ uri: https://api.getchute.com/v2/assets/71907823
73
+ body:
74
+ encoding: UTF-8
75
+ string: ! '{"caption":"New Asset Title"}'
76
+ headers:
77
+ Authorization:
78
+ - OAuth API KEY
79
+ Content-Type:
80
+ - application/json
81
+ Accepts:
82
+ - application/json
83
+ X-Client-Id:
84
+ - 508fc620018d162a070000d6
85
+ response:
86
+ status:
87
+ code: 200
88
+ message: OK
89
+ headers:
90
+ Cache-Control:
91
+ - max-age=0, private, must-revalidate
92
+ Content-Type:
93
+ - application/json; charset=utf-8
94
+ Date:
95
+ - Mon, 08 Apr 2013 22:54:00 GMT
96
+ Etag:
97
+ - ! '"c9ca3f955bdf76e7d7643d1e2bd29108"'
98
+ Last-Modified:
99
+ - Mon, 08 Apr 2013 22:54:00 GMT
100
+ Server:
101
+ - nginx/1.2.7 + Phusion Passenger 3.0.18 (mod_rails/mod_rack)
102
+ Status:
103
+ - '200'
104
+ X-Available-Hourly-Calls:
105
+ - '4999889'
106
+ X-Available-Monthly-Calls:
107
+ - '3719999830'
108
+ X-Max-Hourly-Calls:
109
+ - '5000000'
110
+ X-Max-Monthly-Calls:
111
+ - '3720000000'
112
+ X-Powered-By:
113
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.18
114
+ X-Rack-Cache:
115
+ - invalidate, pass
116
+ X-Request-Id:
117
+ - 34472eead622c9ab294a19fdbf7759c2
118
+ X-Runtime:
119
+ - '0.033433'
120
+ X-Ua-Compatible:
121
+ - IE=Edge,chrome=1
122
+ Transfer-Encoding:
123
+ - chunked
124
+ Connection:
125
+ - keep-alive
126
+ body:
127
+ encoding: US-ASCII
128
+ string: ! '{"response":{"title":"Asset Details","warning":"Deprecated route:
129
+ This will be disabled soon. Please include an album in the route to access
130
+ an asset.","version":2,"code":200,"href":"https://api.getchute.com/v2/assets/71907823?asset%5Bcaption%5D=New+Asset+Title&caption=New+Asset+Title","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999830,"max_hourly_calls":5000000,"available_hourly_calls":4999889}},"data":{"id":71907823,"links":{"self":{"href":"http://api.getchute.com/v2/assets/71907823","title":"Asset
131
+ Details"},"exif":{"href":"http://api.getchute.com/v2/assets/71907823/exif","title":"Exif
132
+ Details"},"geo":{"href":"http://api.getchute.com/v2/assets/71907823/geo","title":"Geo
133
+ Details"}},"created_at":"2012-11-28T11:12:02Z","updated_at":"2013-04-08T22:54:00Z","thumbnail":"http://media.getchute.com/media/4RIvBzgbp/75x75","url":"http://media.getchute.com/media/4RIvBzgbp","shortcut":"4RIvBzgbp","type":"image","caption":"New
134
+ Asset Title","dimensions":{"width":null,"height":null},"location":null,"source":{"source":"imported","source_id":null,"source_url":"http://www.wix.com/blog/wp-content/uploads/2012/08/HowToGoBeyondStockPhotoCliches.jpg","service":null,"import_id":null,"import_url":null,"original_url":"http://media.getchute.com/media/4RIvBzgbp"},"service":"uploaded","user":{"id":545,"links":{"self":{"href":"http://api.getchute.com/v2/users/545","title":"User
135
+ 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}}}'
136
+ http_version:
137
+ recorded_at: Mon, 08 Apr 2013 22:54:00 GMT
138
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,196 @@
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 Comments"}}'
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:03 GMT
29
+ Etag:
30
+ - ! '"ad62ede2eed4b42524e206a84e5a9688"'
31
+ Last-Modified:
32
+ - Mon, 08 Apr 2013 22:54:03 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
+ - '4999883'
39
+ X-Available-Monthly-Calls:
40
+ - '3719999824'
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
+ - 60e7c072cdbf2aae1010caefce018458
51
+ X-Runtime:
52
+ - '0.043499'
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+Comments","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999824,"max_hourly_calls":5000000,"available_hourly_calls":4999883}},"data":{"id":2406198,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406198","title":"Album
62
+ Details"},"assets":{"href":"http://api.getchute.com/v2/albums/2406198/assets","title":"Asset
63
+ Listing"},"parcels":{"href":"http://api.getchute.com/v2/albums/2406198/parcels","title":"Parcel
64
+ Listing"}},"created_at":"2013-04-08T22:54:03Z","updated_at":"2013-04-08T22:54:03Z","shortcut":"a5XEeqmc","name":"Album
65
+ for Comments","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:04 GMT
69
+ - request:
70
+ method: post
71
+ uri: https://api.getchute.com/v2/albums/2406198/assets/import
72
+ body:
73
+ encoding: UTF-8
74
+ string: ! '{"urls":["http://farm9.staticflickr.com/8194/8141607138_bfaea3afd9.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:04 GMT
95
+ Etag:
96
+ - ! '"e109632f58397e26b953c827c1486da8"'
97
+ Last-Modified:
98
+ - Thu, 29 Nov 2012 13:55:20 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
+ - '4999882'
105
+ X-Available-Monthly-Calls:
106
+ - '3719999823'
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
+ - d6590eb3e44eb0c9a04292d139200c0d
117
+ X-Runtime:
118
+ - '0.141879'
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/2406198/assets/import?&urls%5B%5D=http%3A%2F%2Ffarm9.staticflickr.com%2F8194%2F8141607138_bfaea3afd9.jpg","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999823,"max_hourly_calls":5000000,"available_hourly_calls":4999882}},"data":[{"id":72569916,"links":{"self":{"href":"http://api.getchute.com/v2/albums/2406198/assets/72569916","title":"Asset
128
+ Details"},"exif":{"href":"http://api.getchute.com/v2/albums/2406198/assets/72569916/exif","title":"Exif
129
+ Details"},"geo":{"href":"http://api.getchute.com/v2/albums/2406198/assets/72569916/geo","title":"Geo
130
+ Details"},"heart":{"href":"http://api.getchute.com/v2/albums/a5XEeqmc/assets/4UuKweohy/hearts","title":"Heart"},"vote":{"href":"http://api.getchute.com/v2/albums/a5XEeqmc/assets/4UuKweohy/votes","title":"Vote"}},"created_at":"2012-11-29T13:55:20Z","updated_at":"2012-11-29T13:55:20Z","thumbnail":"http://media.getchute.com/media/4UuKweohy/75x75","url":"http://media.getchute.com/media/4UuKweohy","shortcut":"4UuKweohy","type":"image","caption":null,"dimensions":{"width":null,"height":null},"location":null,"source":{"source":"imported","source_id":null,"source_url":"http://farm9.staticflickr.com/8194/8141607138_bfaea3afd9.jpg","service":null,"import_id":null,"import_url":null,"original_url":"http://media.getchute.com/media/4UuKweohy"},"service":"uploaded"}]}'
131
+ http_version:
132
+ recorded_at: Mon, 08 Apr 2013 22:54:04 GMT
133
+ - request:
134
+ method: post
135
+ uri: https://api.getchute.com/v2/albums/2406198/assets/72569916/comments
136
+ body:
137
+ encoding: UTF-8
138
+ string: ! '{"comment_text":"Some random comment","name":"Darko","email":"random@someemail.com"}'
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:05 GMT
159
+ Etag:
160
+ - ! '"4283dafb1ba2a333e9a85d0c192effb7"'
161
+ Last-Modified:
162
+ - Mon, 08 Apr 2013 22:54:05 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
+ - '4999881'
169
+ X-Available-Monthly-Calls:
170
+ - '3719999822'
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
+ - 617925c78f1a817fe4fc8c410d82724a
181
+ X-Runtime:
182
+ - '0.063030'
183
+ X-Ua-Compatible:
184
+ - IE=Edge,chrome=1
185
+ Transfer-Encoding:
186
+ - chunked
187
+ Connection:
188
+ - keep-alive
189
+ body:
190
+ encoding: US-ASCII
191
+ string: ! '{"response":{"title":"Comment Details","version":2,"code":201,"href":"https://api.getchute.com/v2/albums/2406198/assets/72569916/comments?comment%5Bcomment_text%5D=Some+random+comment&comment%5Bemail%5D=random%40someemail.com&comment%5Bname%5D=Darko&comment_text=Some+random+comment&email=random%40someemail.com&name=Darko","api_limits":{"max_monthly_calls":3720000000,"available_monthly_calls":3719999822,"max_hourly_calls":5000000,"available_hourly_calls":4999881}},"data":{"id":687,"links":{"self":{"href":"http://api.getchute.com/v2/comments/687","title":"Comment
192
+ Details"}},"created_at":"2013-04-08T22:54:05Z","updated_at":"2013-04-08T22:54:05Z","comment_text":"Some
193
+ random comment","name":"Darko","email":"random@someemail.com"}}'
194
+ http_version:
195
+ recorded_at: Mon, 08 Apr 2013 22:54:05 GMT
196
+ recorded_with: VCR 2.2.5