red_haze 0.0.1

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 (60) hide show
  1. data/.gitignore +7 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +4 -0
  4. data/Rakefile +1 -0
  5. data/config.template.yml +4 -0
  6. data/lib/red_haze/activity.rb +5 -0
  7. data/lib/red_haze/client.rb +58 -0
  8. data/lib/red_haze/collection.rb +16 -0
  9. data/lib/red_haze/comment.rb +6 -0
  10. data/lib/red_haze/group.rb +28 -0
  11. data/lib/red_haze/helpers/resource.rb +91 -0
  12. data/lib/red_haze/helpers.rb +8 -0
  13. data/lib/red_haze/me.rb +66 -0
  14. data/lib/red_haze/playlist.rb +6 -0
  15. data/lib/red_haze/request.rb +22 -0
  16. data/lib/red_haze/track.rb +23 -0
  17. data/lib/red_haze/user.rb +35 -0
  18. data/lib/red_haze/version.rb +3 -0
  19. data/lib/red_haze.rb +28 -0
  20. data/red_haze.gemspec +28 -0
  21. data/spec/fixtures/vcr_cassettes/collection_next.yml +348 -0
  22. data/spec/fixtures/vcr_cassettes/comment_sync.yml +56 -0
  23. data/spec/fixtures/vcr_cassettes/group_contributors.yml +55 -0
  24. data/spec/fixtures/vcr_cassettes/group_members.yml +55 -0
  25. data/spec/fixtures/vcr_cassettes/group_moderators.yml +55 -0
  26. data/spec/fixtures/vcr_cassettes/group_sync.yml +55 -0
  27. data/spec/fixtures/vcr_cassettes/group_users.yml +55 -0
  28. data/spec/fixtures/vcr_cassettes/me.yml +55 -0
  29. data/spec/fixtures/vcr_cassettes/me_activities.yml +429 -0
  30. data/spec/fixtures/vcr_cassettes/me_activities_limit.yml +127 -0
  31. data/spec/fixtures/vcr_cassettes/playlist.yml +60 -0
  32. data/spec/fixtures/vcr_cassettes/track_comments.yml +79 -0
  33. data/spec/fixtures/vcr_cassettes/track_favorite_get.yml +50 -0
  34. data/spec/fixtures/vcr_cassettes/track_favorite_put.yml +50 -0
  35. data/spec/fixtures/vcr_cassettes/track_favoriters.yml +172 -0
  36. data/spec/fixtures/vcr_cassettes/track_sync.yml +82 -0
  37. data/spec/fixtures/vcr_cassettes/track_unfavorite_put.yml +50 -0
  38. data/spec/fixtures/vcr_cassettes/user_comments.yml +89 -0
  39. data/spec/fixtures/vcr_cassettes/user_favorites.yml +479 -0
  40. data/spec/fixtures/vcr_cassettes/user_follow_put.yml +65 -0
  41. data/spec/fixtures/vcr_cassettes/user_followers.yml +431 -0
  42. data/spec/fixtures/vcr_cassettes/user_follows_.yml +104 -0
  43. data/spec/fixtures/vcr_cassettes/user_follows_get.yml +50 -0
  44. data/spec/fixtures/vcr_cassettes/user_groups.yml +66 -0
  45. data/spec/fixtures/vcr_cassettes/user_playlists.yml +482 -0
  46. data/spec/fixtures/vcr_cassettes/user_sync.yml +57 -0
  47. data/spec/fixtures/vcr_cassettes/user_unfollow_put.yml +54 -0
  48. data/spec/lib/red_haze/activity_spec.rb +18 -0
  49. data/spec/lib/red_haze/client_spec.rb +43 -0
  50. data/spec/lib/red_haze/collection_spec.rb +26 -0
  51. data/spec/lib/red_haze/comment_spec.rb +30 -0
  52. data/spec/lib/red_haze/group_spec.rb +57 -0
  53. data/spec/lib/red_haze/me_spec.rb +117 -0
  54. data/spec/lib/red_haze/playlist_spec.rb +41 -0
  55. data/spec/lib/red_haze/request_spec.rb +17 -0
  56. data/spec/lib/red_haze/track_spec.rb +96 -0
  57. data/spec/lib/red_haze/user_spec.rb +110 -0
  58. data/spec/lib/red_haze_spec.rb +13 -0
  59. data/spec/spec_helper.rb +45 -0
  60. metadata +212 -0
@@ -0,0 +1,104 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.soundcloud.com/me/followings/19813607?oauth_token=<ACCESS_TOKEN>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 303
15
+ message: See Other
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Sat, 14 Jul 2012 02:47:15 GMT
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Connection:
24
+ - keep-alive
25
+ Cache-Control:
26
+ - no-cache
27
+ Location:
28
+ - https://api.soundcloud.com/users/19813607
29
+ X-Runtime:
30
+ - '14'
31
+ Access-Control-Allow-Methods:
32
+ - GET, PUT, POST, DELETE
33
+ Access-Control-Allow-Headers:
34
+ - Accept, Authorization, Content-Type, Origin
35
+ Access-Control-Allow-Origin:
36
+ - ! '*'
37
+ X-Cacheable:
38
+ - NO:Cache-Control=no-cache
39
+ Content-Length:
40
+ - '527'
41
+ X-Varnish:
42
+ - '1235615327'
43
+ Age:
44
+ - '0'
45
+ Via:
46
+ - 1.1 varnish
47
+ X-Cache:
48
+ - MISS
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ! '{"id":19813607,"kind":"user","permalink":"red_haze","username":"red_haze","uri":"https://api.soundcloud.com/users/19813607","permalink_url":"http://soundcloud.com/red_haze","avatar_url":"https://a1.sndcdn.com/images/default_avatar_large.png?62b09b1","country":"United
52
+ States","full_name":"","city":"San Francisco","description":null,"discogs_name":null,"myspace_name":null,"website":null,"website_title":null,"online":false,"track_count":0,"playlist_count":0,"public_favorites_count":0,"followers_count":1,"followings_count":1}'
53
+ http_version:
54
+ recorded_at: Sat, 14 Jul 2012 02:47:25 GMT
55
+ - request:
56
+ method: get
57
+ uri: https://api.soundcloud.com/users/19813607
58
+ body:
59
+ encoding: US-ASCII
60
+ string: ''
61
+ headers:
62
+ Accept:
63
+ - application/json
64
+ response:
65
+ status:
66
+ code: 401
67
+ message: Unauthorized
68
+ headers:
69
+ Server:
70
+ - nginx
71
+ Date:
72
+ - Sat, 14 Jul 2012 02:47:16 GMT
73
+ Content-Type:
74
+ - application/json; charset=utf-8
75
+ Connection:
76
+ - keep-alive
77
+ Cache-Control:
78
+ - no-cache
79
+ X-Runtime:
80
+ - '3'
81
+ Access-Control-Allow-Methods:
82
+ - GET, PUT, POST, DELETE
83
+ Access-Control-Allow-Headers:
84
+ - Accept, Authorization, Content-Type, Origin
85
+ Access-Control-Allow-Origin:
86
+ - ! '*'
87
+ X-Cacheable:
88
+ - NO:Cache-Control=no-cache
89
+ Content-Length:
90
+ - '51'
91
+ X-Varnish:
92
+ - '1235616278'
93
+ Age:
94
+ - '0'
95
+ Via:
96
+ - 1.1 varnish
97
+ X-Cache:
98
+ - MISS
99
+ body:
100
+ encoding: US-ASCII
101
+ string: ! '{"errors":[{"error_message":"401 - Unauthorized"}]}'
102
+ http_version:
103
+ recorded_at: Sat, 14 Jul 2012 02:47:26 GMT
104
+ recorded_with: VCR 2.2.2
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.soundcloud.com/me/followings/19813607?oauth_token=<ACCESS_TOKEN>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 404
15
+ message: Not Found
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Sat, 14 Jul 2012 23:58:43 GMT
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Connection:
24
+ - keep-alive
25
+ Cache-Control:
26
+ - no-cache
27
+ Access-Control-Allow-Methods:
28
+ - GET, PUT, POST, DELETE
29
+ Access-Control-Allow-Headers:
30
+ - Accept, Authorization, Content-Type, Origin
31
+ Access-Control-Allow-Origin:
32
+ - ! '*'
33
+ X-Cacheable:
34
+ - NO:Cache-Control=no-cache
35
+ Content-Length:
36
+ - '48'
37
+ X-Varnish:
38
+ - '1328713531'
39
+ Age:
40
+ - '0'
41
+ Via:
42
+ - 1.1 varnish
43
+ X-Cache:
44
+ - MISS
45
+ body:
46
+ encoding: US-ASCII
47
+ string: ! '{"errors":[{"error_message":"404 - Not Found"}]}'
48
+ http_version:
49
+ recorded_at: Sat, 14 Jul 2012 23:58:46 GMT
50
+ recorded_with: VCR 2.2.2
@@ -0,0 +1,66 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.soundcloud.com/users/2879548/groups?client_id=<CLIENT_ID>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Fri, 29 Jun 2012 15:40:56 GMT
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Connection:
24
+ - keep-alive
25
+ X-Runtime:
26
+ - '26'
27
+ Etag:
28
+ - ! '"d8a947d02bcceeb88b15d68609ad416f"'
29
+ Cache-Control:
30
+ - private, max-age=0, must-revalidate
31
+ Access-Control-Allow-Methods:
32
+ - GET, PUT, POST, DELETE
33
+ Access-Control-Allow-Headers:
34
+ - Accept, Authorization, Content-Type, Origin
35
+ Access-Control-Allow-Origin:
36
+ - ! '*'
37
+ X-Cacheable:
38
+ - NO:Cache-Control=max-age=0
39
+ Content-Length:
40
+ - '3249'
41
+ X-Varnish:
42
+ - '3859855683'
43
+ Age:
44
+ - '0'
45
+ Via:
46
+ - 1.1 varnish
47
+ X-Cache:
48
+ - MISS
49
+ Vary:
50
+ - Accept-Encoding
51
+ body:
52
+ encoding: US-ASCII
53
+ string: ! '[{"kind":"group","id":63665,"created_at":"2012/01/20 07:15:11 +0000","permalink":"storywheel","name":"Story
54
+ Wheel","short_description":"Tell the story behind your pictures","description":"StoryWheel
55
+ let''s you tell the story behind your pictures. To tell your story go to http://storywheel.cc.\r\n","uri":"http://api.soundcloud.com/groups/63665","artwork_url":"http://i1.sndcdn.com/artworks-000017237180-9uzm6k-large.jpg?96679da","permalink_url":"http://soundcloud.com/groups/storywheel","creator":{"id":3207,"kind":"user","permalink":"jwagener","username":"Johannes
56
+ Wagener","uri":"http://api.soundcloud.com/users/3207","permalink_url":"http://soundcloud.com/jwagener","avatar_url":"http://i1.sndcdn.com/avatars-000014428549-3at7qc-large.jpg?96679da"}},{"kind":"group","id":51341,"created_at":"2011/08/31
57
+ 17:05:42 +0000","permalink":"imaschine","name":"iMaschine","short_description":"","description":"","uri":"http://api.soundcloud.com/groups/51341","artwork_url":"http://i1.sndcdn.com/artworks-000011208598-bd6tbg-large.jpg?96679da","permalink_url":"http://soundcloud.com/groups/imaschine","creator":{"id":6450915,"kind":"user","permalink":"imaschine","username":"imaschine","uri":"http://api.soundcloud.com/users/6450915","permalink_url":"http://soundcloud.com/imaschine","avatar_url":"http://i1.sndcdn.com/avatars-000005838621-ld5s4l-large.jpg?96679da"}},{"kind":"group","id":55517,"created_at":"2011/10/22
58
+ 00:14:10 +0000","permalink":"damn-good-coffee","name":"Damn Good Coffee","short_description":"Damn
59
+ Good Coffee ","description":"http://www.youtube.com/watch?v=BP8wJYRFyJI","uri":"http://api.soundcloud.com/groups/55517","artwork_url":"http://i1.sndcdn.com/artworks-000013030698-xqtp0b-large.jpg?96679da","permalink_url":"http://soundcloud.com/groups/damn-good-coffee","creator":{"id":3207,"kind":"user","permalink":"jwagener","username":"Johannes
60
+ Wagener","uri":"http://api.soundcloud.com/users/3207","permalink_url":"http://soundcloud.com/jwagener","avatar_url":"http://i1.sndcdn.com/avatars-000014428549-3at7qc-large.jpg?96679da"}},{"kind":"group","id":55136,"created_at":"2011/10/17
61
+ 22:38:52 +0000","permalink":"test-22","name":"Test","short_description":"test
62
+ test","description":"","uri":"http://api.soundcloud.com/groups/55136","artwork_url":"http://a1.sndcdn.com/images/default_avatar_large.png?96679da","permalink_url":"http://soundcloud.com/groups/test-22","creator":{"id":2879548,"kind":"user","permalink":"jstnw","username":"jstreet","uri":"http://api.soundcloud.com/users/2879548","permalink_url":"http://soundcloud.com/jstnw","avatar_url":"http://i1.sndcdn.com/avatars-000006763043-urg7lt-large.jpg?96679da"}},{"kind":"group","id":54522,"created_at":"2011/10/10
63
+ 19:17:24 +0000","permalink":"jstreets-group","name":"jstreet''s group","short_description":"funk","description":"","uri":"http://api.soundcloud.com/groups/54522","artwork_url":"http://i1.sndcdn.com/artworks-000012577005-59nslh-large.jpg?96679da","permalink_url":"http://soundcloud.com/groups/jstreets-group","creator":{"id":2879548,"kind":"user","permalink":"jstnw","username":"jstreet","uri":"http://api.soundcloud.com/users/2879548","permalink_url":"http://soundcloud.com/jstnw","avatar_url":"http://i1.sndcdn.com/avatars-000006763043-urg7lt-large.jpg?96679da"}}]'
64
+ http_version:
65
+ recorded_at: Fri, 29 Jun 2012 15:40:58 GMT
66
+ recorded_with: VCR 2.2.0