officialfm 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,22 +0,0 @@
1
- [
2
- {
3
- "birthdate":"1982-01-01",
4
- "city":"Geneva",
5
- "comments_count":0,
6
- "country_id":"CH",
7
- "created_at":"2008-08-04 16:57:02 UTC",
8
- "dropbox":true,
9
- "gender":"male",
10
- "id":8735,
11
- "name":"Chab",
12
- "picture_absolute_url":"http://cdn.official.fm/user_avatars/8/8735_small.jpg",
13
- "playlist_votes_count":1,
14
- "playlists_count":3,
15
- "pro":true,
16
- "profile":"",
17
- "status":"artist",
18
- "tracks_count":5,
19
- "url":"http://www.myspace.com/chabmusic",
20
- "votes_count":80
21
- }
22
- ]
@@ -1,40 +0,0 @@
1
- [
2
- {
3
- "birthdate":null,
4
- "city":"Geneva",
5
- "comments_count":126,
6
- "country_id":"CH",
7
- "created_at":"2007-02-15 14:55:11 UTC",
8
- "dropbox":false,
9
- "gender":"male",
10
- "id":33,
11
- "name":"Mental Groove Records",
12
- "picture_absolute_url":"http://cdn.official.fm/user_avatars/0/33_small.jpg",
13
- "playlist_votes_count":90,
14
- "playlists_count":42,
15
- "pro":true,
16
- "profile":"est. 1989, from Miss Kittin to Imperial Tiger Orchestra, we got them all!",
17
- "status":"label",
18
- "tracks_count":104,
19
- "url":"http://www.mentalgroove.ch",
20
- "votes_count":2681 },
21
- {
22
- "birthdate":null,
23
- "city":"Montreal",
24
- "comments_count":1,
25
- "country_id":"CA",
26
- "created_at":"2008-10-09 21:41:29 UTC",
27
- "dropbox":true,
28
- "gender":"none",
29
- "id":11774,
30
- "name":"Peters",
31
- "picture_absolute_url":"http://cdn.official.fm/user_avatars/11/11774_small.jpg",
32
- "playlist_votes_count":1,
33
- "playlists_count":0,
34
- "pro":false,
35
- "profile":"We are quite aware that it sounds like the classical band story, but ours is true. Peters started when four lads (The Netherlands, Venezuela, France and Switzerland) decided to form a band to avoid being dead bored at school. It was a bit like at three everyone grabs an instrument and rock! Kind of funny considering that none of us knew how to play. But who needs that to play indie tunes anyway?\n\nThree months later, we were on stage for our first gig and, ever since that night, it has been quite hard to loose this addiction to sweat, pleasure and final satisfaction (hey, don\'t get confused! We are still talking about performing music on stage)\n\nWe have done numerous gigs in clubs and festivals, in Switzerland and abroad, for one person (yes, indeed) or for a few thousands and issued, as of today, two EP and two albums.\n\nHaving a band and being on the road is cool, you should try too. It has led us to discover places we would never have known and share the stage with bands such as Suede (UK), Ghinzu (Belgium), Dover (Spain), Liquido (Germany), The Godfathers (UK), Poni Hoax (France), Shed Seven (UK), A.S.Dragon (France), Salad (UK), Lovebugs (CH), The Sheer (NL) and many others.",
36
- "status":"artist",
37
- "tracks_count":0,
38
- "url":"http://www.peters-theband.com",
39
- "votes_count":10 }
40
- ]
@@ -1,38 +0,0 @@
1
- [
2
- {
3
- "comments_count":0,
4
- "created_at":"2009-09-15 22:41:48 UTC",
5
- "description":"dd",
6
- "id":20828,
7
- "large_embed_code":"<iframe name=\"fairplayer\" width=\"220\" height=\"350\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/20828?fairplayer=large\"></iframe>",
8
- "length":9575,
9
- "mini_embed_code":"<iframe name=\"fairplayer\" width=\"34\" height=\"18\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/20828?fairplayer=mini\"></iframe>",
10
- "name":"I like",
11
- "picture_absolute_url":"http://cdn.official.fm/playlist_pictures/20/20828_small.jpg",
12
- "plays_count":61,
13
- "shuffle":false,
14
- "small_embed_code":"<iframe name=\"fairplayer\" width=\"100%\" height=\"40\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/20828?fairplayer=small\"></iframe>",
15
- "standard_embed_code":"<iframe name=\"fairplayer\" width=\"160\" height=\"240\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/20828?fairplayer=standard\"></iframe>",
16
- "tracks_count":32,
17
- "tracks_list":"220813,137550,164700,5291,110978,97012,95959,111033,78490,94884,80096,62578,111082,79428,77445,69845,56600,4683,27023,18098,38493,33206,58267,63088,10643,20376,51111,33624,7470,4806,24907,2853",
18
- "user_id":8735,
19
- "votes_count":0 },
20
- {
21
- "comments_count":0,
22
- "created_at":"2009-12-20 17:17:21 UTC",
23
- "description":null,
24
- "id":25263,
25
- "large_embed_code":"<iframe name=\"fairplayer\" width=\"220\" height=\"350\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/25263?fairplayer=large\"></iframe>",
26
- "length":9655,
27
- "mini_embed_code":"<iframe name=\"fairplayer\" width=\"34\" height=\"18\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/25263?fairplayer=mini\"></iframe>",
28
- "name":"deep mixes",
29
- "picture_absolute_url":"http://cdn.official.fm/playlist_pictures/25/25263_small.jpg",
30
- "plays_count":16,
31
- "shuffle":false,
32
- "small_embed_code":"<iframe name=\"fairplayer\" width=\"100%\" height=\"40\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/25263?fairplayer=small\"></iframe>",
33
- "standard_embed_code":"<iframe name=\"fairplayer\" width=\"160\" height=\"240\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/25263?fairplayer=standard\"></iframe>",
34
- "tracks_count":2,
35
- "tracks_list":"14570,33029",
36
- "user_id":8735,
37
- "votes_count":1 }
38
- ]
@@ -1,40 +0,0 @@
1
- [
2
- {
3
- "birthdate":null,
4
- "city":"Grenoble, france",
5
- "comments_count":55,
6
- "country_id":"FR",
7
- "created_at":"2007-06-12 19:38:17 UTC",
8
- "dropbox":true,
9
- "gender":"male",
10
- "id":394,
11
- "name":"DJ INBEATWIN",
12
- "picture_absolute_url":"http://cdn.official.fm/user_avatars/0/394_small.jpg",
13
- "playlist_votes_count":60,
14
- "playlists_count":4,
15
- "pro":false,
16
- "profile":"Formerly a US and Detroit Techno DJ now moving to play whatever catches his hear and moves his heart. Expect to hear all kinds of musics here ! \n\nParticular interest on Tropicalia, Disco, Psyche Rock, Electro, Dub, Cold Wave, Punk Funk etc etc........................\n\nRunning a weekly show on Radio Campus Grenoble each thursday 8:30pm to 9:30pm.",
17
- "status":"artist",
18
- "tracks_count":44,
19
- "url":"http://contortyourself.free.fr",
20
- "votes_count":568 },
21
- {
22
- "birthdate":null,
23
- "city":"Geneva",
24
- "comments_count":0,
25
- "country_id":"CH",
26
- "created_at":"2007-07-09 08:38:51 UTC",
27
- "dropbox":false,
28
- "gender":"female",
29
- "id":1132,
30
- "name":"jenny",
31
- "picture_absolute_url":"http://cdn.official.fm/user_avatars/1/1132_small.jpg",
32
- "playlist_votes_count":0,
33
- "playlists_count":5,
34
- "pro":false,
35
- "profile":"",
36
- "status":"member",
37
- "tracks_count":0,
38
- "url":"",
39
- "votes_count":1 }
40
- ]
@@ -1,40 +0,0 @@
1
- [
2
- {
3
- "birthdate":"1968-08-28",
4
- "city":"Geneva",
5
- "comments_count":20,
6
- "country_id":"CH",
7
- "created_at":"2007-02-16 18:22:10 UTC",
8
- "dropbox":false,
9
- "gender":"male",
10
- "id":38,
11
- "name":"JFG",
12
- "picture_absolute_url":"http://cdn.official.fm/user_avatars/0/38_small.jpg",
13
- "playlist_votes_count":8,
14
- "playlists_count":20,
15
- "pro":false,
16
- "profile":"Freelance CTO, Junior tastemaker!",
17
- "status":"member",
18
- "tracks_count":0,
19
- "url":"",
20
- "votes_count":440 },
21
- {
22
- "birthdate":null,
23
- "city":null,
24
- "comments_count":0,
25
- "country_id":"CH",
26
- "created_at":"2007-07-03 05:06:26 UTC",
27
- "dropbox":false,
28
- "gender":null,
29
- "id":964,
30
- "name":"Sumo",
31
- "picture_absolute_url":"http://cdn.official.fm/user_avatars/0/964_small.jpg",
32
- "playlist_votes_count":0,
33
- "playlists_count":0,
34
- "pro":false,
35
- "profile":"",
36
- "status":"member",
37
- "tracks_count":0,
38
- "url":"http://www.myspace.com/sumomusic",
39
- "votes_count":0 }
40
- ]
@@ -1,66 +0,0 @@
1
- [
2
- {
3
- "artist_string":"Hercules and Love Affair",
4
- "buy_url":"",
5
- "comments_count":0,
6
- "concatinated_genres":"Electronic,House",
7
- "concatinated_tags":null,
8
- "country_id":"US",
9
- "created_at":"2008-08-08 17:13:58 UTC",
10
- "derived_type":"original",
11
- "description":"Remixed by Chab (http://www.myspace.com/chabmusic)",
12
- "downloadable":true,
13
- "downloads_count":232,
14
- "id":11204,
15
- "large_embed_code":"<iframe name=\"fairplayer\" width=\"220\" height=\"350\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/11204?fairplayer=large\">iframe>",
16
- "length":461,
17
- "mini_embed_code":"<iframe name=\"fairplayer\" width=\"34\" height=\"18\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/11204?fairplayer=mini\">iframe>",
18
- "original_track_id":null,
19
- "picture_absolute_url":"http://cdn.official.fm/track_pictures/11/11204_small.jpg",
20
- "playlists_count":9,
21
- "plays_count":252,
22
- "pr_url":"http://www.dfarecords.com",
23
- "small_embed_code":"<iframe name=\"fairplayer\" width=\"100%\" height=\"40\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/11204?fairplayer=small\">iframe>",
24
- "standard_embed_code":"<iframe name=\"fairplayer\" width=\"160\" height=\"240\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/11204?fairplayer=standard\">iframe>",
25
- "title":"Blind (Chab Remix)",
26
- "url_1":"",
27
- "url_1_name":"",
28
- "url_2":"",
29
- "url_2_name":"",
30
- "user_id":8735,
31
- "votes_count":12,
32
- "web_url":"http://herculesandloveaffair.com"
33
- },
34
- {
35
- "artist_string":"The Cure",
36
- "buy_url":"",
37
- "comments_count":0,
38
- "concatinated_genres":"Pop",
39
- "concatinated_tags":null,
40
- "country_id":"UK",
41
- "created_at":"2010-04-30 20:48:56 UTC",
42
- "derived_type":"original",
43
- "description":"",
44
- "downloadable":false,
45
- "downloads_count":0,
46
- "id":106832,
47
- "large_embed_code":"<iframe name=\"fairplayer\" width=\"220\" height=\"350\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/106832?fairplayer=large\">iframe>",
48
- "length":411,
49
- "mini_embed_code":"<iframe name=\"fairplayer\" width=\"34\" height=\"18\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/106832?fairplayer=mini\">iframe>",
50
- "original_track_id":null,
51
- "picture_absolute_url":"http://cdn.official.fm/track_pictures/106/106832_small.jpg",
52
- "playlists_count":1,
53
- "plays_count":46,
54
- "pr_url":"",
55
- "small_embed_code":"<iframe name=\"fairplayer\" width=\"100%\" height=\"40\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/106832?fairplayer=small\">iframe>",
56
- "standard_embed_code":"<iframe name=\"fairplayer\" width=\"160\" height=\"240\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/106832?fairplayer=standard\">iframe>",
57
- "title":"The top",
58
- "url_1":"",
59
- "url_1_name":"",
60
- "url_2":"",
61
- "url_2_name":"",
62
- "user_id":8735,
63
- "votes_count":1,
64
- "web_url":""
65
- }
66
- ]
@@ -1,50 +0,0 @@
1
- [
2
- {
3
- "artwork_embed_code":"<iframe name=\"fairplayer\" width=\"220\" height=\"220\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/50786?fairplayer=artwork\"></iframe>",
4
- "comments_count":0,
5
- "created_at":"2011-01-02 17:24:34 UTC",
6
- "description":"",
7
- "id":50786,
8
- "large_embed_code":"<iframe name=\"fairplayer\" width=\"220\" height=\"350\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/50786?fairplayer=large\"></iframe>",
9
- "length":3757,
10
- "mini_embed_code":"<iframe name=\"fairplayer\" width=\"34\" height=\"18\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/50786?fairplayer=mini\"></iframe>",
11
- "name":"Top 20 (Most played) cover songs in 2010 ",
12
- "password":null,
13
- "picture_absolute_url":"http://cdn.official.fm/playlist_pictures/50/50786_small.jpg",
14
- "plays_count":43,
15
- "private":false,
16
- "shuffle":false,
17
- "small_embed_code":"<iframe name=\"fairplayer\" width=\"100%\" height=\"40\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/50786?fairplayer=small\"></iframe>",
18
- "standard_embed_code":"<iframe name=\"fairplayer\" width=\"160\" height=\"240\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/50786?fairplayer=standard\"></iframe>",
19
- "tracks":[1155,11519,64985,81107,19550,35878,70976,2408,12349,67940,12093,4149,67938,12645,78956,8277,15914],
20
- "tracks_count":17,
21
- "tracks_list":"1155,11519,64985,81107,19550,35878,70976,2408,12349,67940,12093,4149,67938,12645,78956,8277,15914",
22
- "user_id":152,
23
- "votes_count":7
24
- }
25
- ,
26
- {
27
- "artwork_embed_code":"<iframe name=\"fairplayer\" width=\"220\" height=\"220\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/50195?fairplayer=artwork\"></iframe>",
28
- "comments_count":0,
29
- "created_at":"2010-12-23 18:17:14 UTC",
30
- "description":null,
31
- "id":50195,
32
- "large_embed_code":"<iframe name=\"fairplayer\" width=\"220\" height=\"350\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/50195?fairplayer=large\"></iframe>",
33
- "length":1322,
34
- "mini_embed_code":"<iframe name=\"fairplayer\" width=\"34\" height=\"18\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/50195?fairplayer=mini\"></iframe>",
35
- "name":"top 5 2010",
36
- "password":null,
37
- "picture_absolute_url":"http://cdn.official.fm/track_pictures/175/175408_small.jpg",
38
- "plays_count":9,
39
- "private":false,
40
- "shuffle":false,
41
- "small_embed_code":"<iframe name=\"fairplayer\" width=\"100%\" height=\"40\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/50195?fairplayer=small\"></iframe>",
42
- "standard_embed_code":"<iframe name=\"fairplayer\" width=\"160\" height=\"240\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/playlist/50195?fairplayer=standard\"></iframe>",
43
- "tracks":[175408,143269,139463,184871,184620],
44
- "tracks_count":5,
45
- "tracks_list":"175408,143269,139463,184871,184620",
46
- "user_id":39714,
47
- "votes_count":3
48
- }
49
-
50
- ]
@@ -1,96 +0,0 @@
1
- [
2
- {
3
- "artist_string":"Various Artist",
4
- "artwork_embed_code":"<iframe name=\"fairplayer\" width=\"220\" height=\"220\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/60526?fairplayer=artwork\"></iframe>",
5
- "buy_url":"",
6
- "comments_count":3,
7
- "concatinated_genres":"Electronic",
8
- "concatinated_tags":null,
9
- "country_id":"FR",
10
- "created_at":"2009-11-01 01:07:10 UTC",
11
- "derived_by":null,
12
- "derived_type":"original",
13
- "description":"",
14
- "downloadable":true,
15
- "downloads_count":276,
16
- "genres":["Electronic"],
17
- "id":60526,
18
- "isrc":null,
19
- "label":"No Label",
20
- "label_none":false,
21
- "large_embed_code":"<iframe name=\"fairplayer\" width=\"220\" height=\"350\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/60526?fairplayer=large\"></iframe>",
22
- "length":2694,
23
- "license_type":1,
24
- "lyrics":null,
25
- "mini_embed_code":"<iframe name=\"fairplayer\" width=\"34\" height=\"18\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/60526?fairplayer=mini\"></iframe>",
26
- "original_track_id":null,
27
- "original_track_string":null,
28
- "password":null,
29
- "picture_absolute_url":"http://cdn.official.fm/track_pictures/60/60526_small.jpg",
30
- "playlists_count":3,
31
- "plays_count":716,
32
- "pr_url":"",
33
- "private":false,
34
- "require_valid_email":false,
35
- "small_embed_code":"<iframe name=\"fairplayer\" width=\"100%\" height=\"40\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/60526?fairplayer=small\"></iframe>",
36
- "standard_embed_code":"<iframe name=\"fairplayer\" width=\"160\" height=\"240\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/60526?fairplayer=standard\"></iframe>",
37
- "status":"Complete",
38
- "tags":[],
39
- "title":"QuelqueChosed'HasBeen",
40
- "url_1":"",
41
- "url_1_name":"",
42
- "url_2":"",
43
- "url_2_name":"",
44
- "user_id":35966,
45
- "votes_count":18,
46
- "web_url":""
47
- }
48
- ,
49
- {
50
- "artist_string":"Various Artist",
51
- "artwork_embed_code":"<iframe name=\"fairplayer\" width=\"220\" height=\"220\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/48163?fairplayer=artwork\"></iframe>",
52
- "buy_url":"",
53
- "comments_count":2,
54
- "concatinated_genres":"Electronic,Mixtape,Pop",
55
- "concatinated_tags":null,
56
- "country_id":"FR",
57
- "created_at":"2009-08-08 16:12:33 UTC",
58
- "derived_by":null,
59
- "derived_type":"original",
60
- "description":"",
61
- "downloadable":true,
62
- "downloads_count":591,
63
- "genres":["Electronic","Mixtape","Pop"],
64
- "id":48163,
65
- "isrc":null,
66
- "label":null,
67
- "label_none":true,
68
- "large_embed_code":"<iframe name=\"fairplayer\" width=\"220\" height=\"350\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/48163?fairplayer=large\"></iframe>",
69
- "length":3482,
70
- "license_type":1,
71
- "lyrics":null,
72
- "mini_embed_code":"<iframe name=\"fairplayer\" width=\"34\" height=\"18\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/48163?fairplayer=mini\"></iframe>",
73
- "original_track_id":null,
74
- "original_track_string":null,
75
- "password":null,
76
- "picture_absolute_url":"http://cdn.official.fm/track_pictures/48/48163_small.jpg",
77
- "playlists_count":10,
78
- "plays_count":896,
79
- "pr_url":"",
80
- "private":false,
81
- "require_valid_email":false,
82
- "small_embed_code":"<iframe name=\"fairplayer\" width=\"100%\" height=\"40\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/48163?fairplayer=small\"></iframe>",
83
- "standard_embed_code":"<iframe name=\"fairplayer\" width=\"160\" height=\"240\" scrolling=\"no\" frameborder=\"0\" src=\"http://official.fm/track/48163?fairplayer=standard\"></iframe>",
84
- "status":"Complete",
85
- "tags":[],
86
- "title":"SummerALaMode Mix by SALM",
87
- "url_1":"",
88
- "url_1_name":"",
89
- "url_2":"",
90
- "url_2_name":"",
91
- "user_id":35966,
92
- "votes_count":18,
93
- "web_url":""
94
- }
95
-
96
- ]
@@ -1,32 +0,0 @@
1
- require 'helper'
2
-
3
- class PlaylistsTests < Test::Unit::TestCase
4
-
5
- context "When using the official.fm API and working with Playlists" do
6
- setup do
7
- @client = officialfm_test_client
8
- end
9
-
10
- should "search for 5 playlists with the 'R&B Mixtape' search term" do
11
- stub_get('http://api.official.fm/search/playlists/R%26B+Mixtape?key=GNXbH3zYb25F1I7KVEEN&format=json&api_max_responses=5', 'playlists.json')
12
- tracks = @client.playlists('R&B Mixtape', :limit => 5)
13
- tracks.length.should == 5
14
- tracks[0].running_time.should == 4167
15
- tracks[4].tracks[3].should == 12818
16
- end
17
-
18
- should "get info on HLSTRS Timeless mixtape" do
19
- stub_get('http://api.official.fm/playlist/55569?key=GNXbH3zYb25F1I7KVEEN&format=json&api_embed_codes=', 'playlist.json')
20
- playlist = @client.playlist(55569)
21
- playlist.shuffle.should == false
22
- playlist.user_id.should == 46269
23
- end
24
-
25
- should "get playlist votes on HLSTRS Timeless mixtape" do
26
- stub_get('http://api.official.fm/playlist/55569/votes?key=GNXbH3zYb25F1I7KVEEN&format=json&api_max_responses=', 'playlist_votes.json')
27
- votes = @client.playlist_votes(55569)
28
- votes[0].name.should == 'VALERIAN'
29
- end
30
- end
31
-
32
- end
data/test/users_test.rb DELETED
@@ -1,87 +0,0 @@
1
- require 'helper'
2
-
3
- class UsersTest < Test::Unit::TestCase
4
-
5
- context "When using the official.fm API and working with Users" do
6
- setup do
7
- @client = officialfm_test_client
8
- end
9
-
10
- should "retrieve information about a specific user" do
11
- stub_get('http://api.official.fm/user/chab?key=GNXbH3zYb25F1I7KVEEN&format=json', 'user.json')
12
- user = @client.user('chab')
13
- user.name.should == 'Chab'
14
- # let's hope he doesn't change sex
15
- user.gender.should == 'male'
16
- user.status.should == 'artist'
17
- user.country_id.should == 'CH'
18
- end
19
-
20
- should "retrieve information about a specific user as well" do
21
- stub_get('http://api.official.fm/search/users/chab?key=GNXbH3zYb25F1I7KVEEN&format=json&api_max_responses=1', 'user.json')
22
- # this should work as well, 'chab' is an exact match so the first result oughta be correct
23
- user = @client.users('chab', :limit => 1)[0]
24
- user.name.should == 'Chab'
25
- user.gender.should == 'male'
26
- user.status.should == 'artist'
27
- # let's hope he doesn't move away
28
- user.country_id.should == 'CH'
29
- end
30
-
31
- should "retrieve the first two tracks of chab" do
32
- stub_get('http://api.official.fm/user/chab/tracks?key=GNXbH3zYb25F1I7KVEEN&format=json&api_embed_codes=&api_max_responses=2', 'user_tracks.json')
33
- tracks = @client.user_tracks('chab', :limit => 2)
34
- tracks.size.should == 2
35
- tracks[0].title.should == 'Blind (Chab Remix)'
36
- tracks[0].artist_string.should == 'Hercules and Love Affair'
37
- end
38
-
39
- should "retrieve the first two tracks nddrylliog has voted for" do
40
- stub_get('http://api.official.fm/user/nddrylliog/voted_tracks?key=GNXbH3zYb25F1I7KVEEN&format=json&api_embed_codes=&api_max_responses=2', 'voted_tracks.json')
41
- tracks = @client.voted_tracks('nddrylliog', :limit => 2)
42
- tracks.size.should == 2
43
- tracks[0].title.should == "QuelqueChosed'HasBeen"
44
- end
45
-
46
- should "retrieve the first two playlists of chab" do
47
- stub_get('http://api.official.fm/user/chab/playlists?key=GNXbH3zYb25F1I7KVEEN&format=json&api_embed_codes=&api_max_responses=2', 'user_playlists.json')
48
- playlists = @client.user_playlists('chab', :limit => 2)
49
- playlists.size.should == 2
50
- playlists[0].name.should == 'I like'
51
- playlists[1].user_id.should == 8735 # chab's user id
52
- end
53
-
54
- should "retrieve the first two playlists bencolon has voted for" do
55
- stub_get('http://api.official.fm/user/bencolon/voted_playlists?key=GNXbH3zYb25F1I7KVEEN&format=json&api_embed_codes=&api_max_responses=2', 'voted_playlists.json')
56
- playlists = @client.voted_playlists('bencolon', :limit => 2)
57
- playlists.size.should == 2
58
- playlists[1].id.should == 50195
59
- end
60
-
61
- should "retrieve the first two contacts of chab" do
62
- stub_get('http://api.official.fm/user/chab/contacts?key=GNXbH3zYb25F1I7KVEEN&format=json&api_max_responses=2', 'user_contacts.json')
63
- contacts = @client.user_contacts('chab', :limit => 2)
64
- contacts.size.should == 2
65
- contacts[0].name.should == 'Mental Groove Records'
66
- contacts[1].status.should == 'artist'
67
- end
68
-
69
- should "retrieve the first two subscribers of chab" do
70
- stub_get('http://api.official.fm/user/chab/subscribers?key=GNXbH3zYb25F1I7KVEEN&format=json&api_max_responses=2', 'user_subscribers.json')
71
- subscribers = @client.user_subscribers('chab', :limit => 2)
72
- subscribers.size.should == 2
73
- subscribers[0].id.should == 394
74
- subscribers[1].name.should == 'jenny'
75
- end
76
-
77
- should "retrieve the first two subscriptions of chab" do
78
- stub_get('http://api.official.fm/user/chab/subscriptions?key=GNXbH3zYb25F1I7KVEEN&format=json&api_max_responses=2', 'user_subscriptions.json')
79
- subscriptions = @client.user_subscriptions('chab', :limit => 2)
80
- subscriptions.size.should == 2
81
- subscriptions[0].profile.should == 'Freelance CTO, Junior tastemaker!'
82
- subscriptions[1].url.should == 'http://www.myspace.com/sumomusic'
83
- end
84
-
85
- end
86
-
87
- end