red_haze 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
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,55 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.soundcloud.com/groups/83495/contributors?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:43 GMT
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Connection:
24
+ - keep-alive
25
+ X-Runtime:
26
+ - '29'
27
+ Etag:
28
+ - ! '"3620bb319113f7fe7e4f1fc5f7fdee18"'
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
+ - '552'
41
+ X-Varnish:
42
+ - '3032046030'
43
+ Age:
44
+ - '0'
45
+ Via:
46
+ - 1.1 varnish
47
+ X-Cache:
48
+ - MISS
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ! '[{"id":999942,"kind":"user","permalink":"jackca","username":"JackCA","uri":"http://api.soundcloud.com/users/999942","permalink_url":"http://soundcloud.com/jackca","avatar_url":"http://i1.sndcdn.com/avatars-000002957252-ptk617-large.jpg?96679da","country":"United
52
+ States","full_name":"Jack Anderson","city":"San Francisco","description":"","discogs_name":null,"myspace_name":null,"website":"http://janderson.me","website_title":"","online":true,"track_count":1,"playlist_count":1,"public_favorites_count":75,"followers_count":21,"followings_count":112}]'
53
+ http_version:
54
+ recorded_at: Fri, 29 Jun 2012 15:40:46 GMT
55
+ recorded_with: VCR 2.2.0
@@ -0,0 +1,55 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.soundcloud.com/groups/83495/members?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:43 GMT
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Connection:
24
+ - keep-alive
25
+ X-Runtime:
26
+ - '21'
27
+ Etag:
28
+ - ! '"3620bb319113f7fe7e4f1fc5f7fdee18"'
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
+ - '552'
41
+ X-Varnish:
42
+ - '3859835065'
43
+ Age:
44
+ - '0'
45
+ Via:
46
+ - 1.1 varnish
47
+ X-Cache:
48
+ - MISS
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ! '[{"id":999942,"kind":"user","permalink":"jackca","username":"JackCA","uri":"http://api.soundcloud.com/users/999942","permalink_url":"http://soundcloud.com/jackca","avatar_url":"http://i1.sndcdn.com/avatars-000002957252-ptk617-large.jpg?96679da","country":"United
52
+ States","full_name":"Jack Anderson","city":"San Francisco","description":"","discogs_name":null,"myspace_name":null,"website":"http://janderson.me","website_title":"","online":true,"track_count":1,"playlist_count":1,"public_favorites_count":75,"followers_count":21,"followings_count":112}]'
53
+ http_version:
54
+ recorded_at: Fri, 29 Jun 2012 15:40:45 GMT
55
+ recorded_with: VCR 2.2.0
@@ -0,0 +1,55 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.soundcloud.com/groups/83495/moderators?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:43 GMT
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Connection:
24
+ - keep-alive
25
+ X-Runtime:
26
+ - '15'
27
+ Etag:
28
+ - ! '"3620bb319113f7fe7e4f1fc5f7fdee18"'
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
+ - '552'
41
+ X-Varnish:
42
+ - '3859835795'
43
+ Age:
44
+ - '0'
45
+ Via:
46
+ - 1.1 varnish
47
+ X-Cache:
48
+ - MISS
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ! '[{"id":999942,"kind":"user","permalink":"jackca","username":"JackCA","uri":"http://api.soundcloud.com/users/999942","permalink_url":"http://soundcloud.com/jackca","avatar_url":"http://i1.sndcdn.com/avatars-000002957252-ptk617-large.jpg?96679da","country":"United
52
+ States","full_name":"Jack Anderson","city":"San Francisco","description":"","discogs_name":null,"myspace_name":null,"website":"http://janderson.me","website_title":"","online":true,"track_count":1,"playlist_count":1,"public_favorites_count":75,"followers_count":21,"followings_count":112}]'
53
+ http_version:
54
+ recorded_at: Fri, 29 Jun 2012 15:40:46 GMT
55
+ recorded_with: VCR 2.2.0
@@ -0,0 +1,55 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.soundcloud.com/groups/83495?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:42 GMT
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Connection:
24
+ - keep-alive
25
+ X-Runtime:
26
+ - '34'
27
+ Etag:
28
+ - ! '"e98e3275c3804e26e1f3599cfa27fc97"'
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
+ - '602'
41
+ X-Varnish:
42
+ - '3032043544'
43
+ Age:
44
+ - '0'
45
+ Via:
46
+ - 1.1 varnish
47
+ X-Cache:
48
+ - MISS
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ! '{"kind":"group","id":83495,"created_at":"2012/06/21 04:33:50 +0000","permalink":"red_haze","name":"red_haze","short_description":"red_haze
52
+ gem group","description":"","uri":"http://api.soundcloud.com/groups/83495","artwork_url":"http://a1.sndcdn.com/images/default_avatar_large.png?96679da","permalink_url":"http://soundcloud.com/groups/red_haze","creator":{"id":999942,"kind":"user","permalink":"jackca","username":"JackCA","uri":"http://api.soundcloud.com/users/999942","permalink_url":"http://soundcloud.com/jackca","avatar_url":"http://i1.sndcdn.com/avatars-000002957252-ptk617-large.jpg?96679da"}}'
53
+ http_version:
54
+ recorded_at: Fri, 29 Jun 2012 15:40:45 GMT
55
+ recorded_with: VCR 2.2.0
@@ -0,0 +1,55 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.soundcloud.com/groups/83495/users?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:44 GMT
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Connection:
24
+ - keep-alive
25
+ X-Runtime:
26
+ - '48'
27
+ Etag:
28
+ - ! '"3620bb319113f7fe7e4f1fc5f7fdee18"'
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
+ - '552'
41
+ X-Varnish:
42
+ - '3032046787'
43
+ Age:
44
+ - '0'
45
+ Via:
46
+ - 1.1 varnish
47
+ X-Cache:
48
+ - MISS
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ! '[{"id":999942,"kind":"user","permalink":"jackca","username":"JackCA","uri":"http://api.soundcloud.com/users/999942","permalink_url":"http://soundcloud.com/jackca","avatar_url":"http://i1.sndcdn.com/avatars-000002957252-ptk617-large.jpg?96679da","country":"United
52
+ States","full_name":"Jack Anderson","city":"San Francisco","description":"","discogs_name":null,"myspace_name":null,"website":"http://janderson.me","website_title":"","online":true,"track_count":1,"playlist_count":1,"public_favorites_count":75,"followers_count":21,"followings_count":112}]'
53
+ http_version:
54
+ recorded_at: Fri, 29 Jun 2012 15:40:47 GMT
55
+ recorded_with: VCR 2.2.0
@@ -0,0 +1,55 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.soundcloud.com/me?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: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Fri, 29 Jun 2012 15:40:45 GMT
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Connection:
24
+ - keep-alive
25
+ X-Runtime:
26
+ - '19'
27
+ Etag:
28
+ - ! '"d982350c157c3f06fbc2fe85c32c32b9"'
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
+ - '650'
41
+ X-Varnish:
42
+ - '3032048315'
43
+ Age:
44
+ - '0'
45
+ Via:
46
+ - 1.1 varnish
47
+ X-Cache:
48
+ - MISS
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ! '{"id":999942,"kind":"user","permalink":"jackca","username":"JackCA","uri":"https://api.soundcloud.com/users/999942","permalink_url":"http://soundcloud.com/jackca","avatar_url":"https://i1.sndcdn.com/avatars-000002957252-ptk617-large.jpg?96679da","country":"United
52
+ States","full_name":"Jack Anderson","city":"San Francisco","description":"","discogs_name":null,"myspace_name":null,"website":"http://janderson.me","website_title":"","online":true,"track_count":1,"playlist_count":1,"public_favorites_count":75,"followers_count":21,"followings_count":112,"plan":"Free","private_tracks_count":0,"private_playlists_count":0,"primary_email_confirmed":true}'
53
+ http_version:
54
+ recorded_at: Fri, 29 Jun 2012 15:40:47 GMT
55
+ recorded_with: VCR 2.2.0