lastfm 1.19.1 → 1.20.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -0
- data/lastfm.gemspec +1 -1
- data/lib/lastfm/method_category/user.rb +6 -0
- data/spec/fixtures/user_get_recommended_artists.xml +23 -0
- data/spec/method_specs/user_spec.rb +11 -0
- metadata +6 -4
data/README.rdoc
CHANGED
@@ -90,6 +90,7 @@ It supports methods which require {authentication}[http://www.last.fm/api/authen
|
|
90
90
|
* {user.getPersonalTags}[http://www.lastfm.jp/api/show/user.getPersonalTags]
|
91
91
|
* {user.getRecentTracks}[http://www.lastfm.jp/api/show?service=278]
|
92
92
|
* {user.getRecommendedEvents}[http://www.last.fm/api/show/user.getRecommendedEvents]
|
93
|
+
* {user.getRecommendedArtists}[http://www.last.fm/api/show/user.getRecommendedArtists]
|
93
94
|
* {user.getTopArtists}[http://www.lastfm.jp/api/show/user.getTopArtists]
|
94
95
|
* {user.getTopAlbums}[http://www.lastfm.jp/api/show/user.getTopAlbums]
|
95
96
|
* {user.getTopTags}[http://www.lastfm.jp/api/show/user.getTopTags]
|
data/lastfm.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
|
|
12
12
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
13
13
|
gem.name = %q{lastfm}
|
14
14
|
gem.require_paths = ["lib"]
|
15
|
-
gem.version = "1.
|
15
|
+
gem.version = "1.20.1"
|
16
16
|
|
17
17
|
gem.add_dependency "xml-simple"
|
18
18
|
gem.add_dependency "httparty"
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<lfm status="ok">
|
3
|
+
<recommendations user="joanofarctan" page="4" perPage="50" totalPages="6" total="276">
|
4
|
+
<artist>
|
5
|
+
<name>Quest.Room.Project</name>
|
6
|
+
<mbid/>
|
7
|
+
<url>http://www.last.fm/music/Quest.Room.Project</url>
|
8
|
+
<streamable>1</streamable>
|
9
|
+
<image size="small">http://userserve-ak.last.fm/serve/34/53572699.png</image>
|
10
|
+
<image size="medium">http://userserve-ak.last.fm/serve/34/53572699.png</image>
|
11
|
+
<image size="large">http://userserve-ak.last.fm/serve/34/53572699.png</image>
|
12
|
+
</artist>
|
13
|
+
<artist>
|
14
|
+
<name>Senior Soul</name>
|
15
|
+
<mbid>a25cebd7-679f-40c5-b451-7f40c1f25c5b</mbid>
|
16
|
+
<url>http://www.last.fm/music/Senior+Soul</url>
|
17
|
+
<streamable>0</streamable>
|
18
|
+
<image size="small">http://userserve-ak.last.fm/serve/34/53572699.png</image>
|
19
|
+
<image size="medium">http://userserve-ak.last.fm/serve/34/53572699.png</image>
|
20
|
+
<image size="large">http://userserve-ak.last.fm/serve/34/53572699.png</image>
|
21
|
+
</artist>
|
22
|
+
</recommendations>
|
23
|
+
</lfm>
|
@@ -319,4 +319,15 @@ describe '#user' do
|
|
319
319
|
recommended_events[1]['artists']['headliner'].should == 'Reel Big Fish'
|
320
320
|
end
|
321
321
|
end
|
322
|
+
|
323
|
+
describe '#get_recommended_artists' do
|
324
|
+
it 'shoud get user\'s recommended artists' do
|
325
|
+
@lastfm.should_receive(:request).with('user.getRecommendedArtists', {}, :get, true, true) {
|
326
|
+
make_response('user_get_recommended_artists') }
|
327
|
+
|
328
|
+
recommended_artists = @lastfm.user.get_recommended_artists
|
329
|
+
recommended_artists[0]['name'].should == 'Quest.Room.Project'
|
330
|
+
recommended_artists[1]['name'].should == 'Senior Soul'
|
331
|
+
end
|
332
|
+
end
|
322
333
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lastfm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.20.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: xml-simple
|
@@ -171,6 +171,7 @@ files:
|
|
171
171
|
- spec/fixtures/user_get_personal_tags_tracks.xml
|
172
172
|
- spec/fixtures/user_get_recent_tracks.xml
|
173
173
|
- spec/fixtures/user_get_recent_tracks_malformed.xml
|
174
|
+
- spec/fixtures/user_get_recommended_artists.xml
|
174
175
|
- spec/fixtures/user_get_recommended_events.xml
|
175
176
|
- spec/fixtures/user_get_top_albums.xml
|
176
177
|
- spec/fixtures/user_get_top_artists.xml
|
@@ -210,7 +211,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
210
211
|
version: '0'
|
211
212
|
segments:
|
212
213
|
- 0
|
213
|
-
hash:
|
214
|
+
hash: -490009280925894529
|
214
215
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
215
216
|
none: false
|
216
217
|
requirements:
|
@@ -219,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
220
|
version: '0'
|
220
221
|
segments:
|
221
222
|
- 0
|
222
|
-
hash:
|
223
|
+
hash: -490009280925894529
|
223
224
|
requirements: []
|
224
225
|
rubyforge_project:
|
225
226
|
rubygems_version: 1.8.24
|
@@ -274,6 +275,7 @@ test_files:
|
|
274
275
|
- spec/fixtures/user_get_personal_tags_tracks.xml
|
275
276
|
- spec/fixtures/user_get_recent_tracks.xml
|
276
277
|
- spec/fixtures/user_get_recent_tracks_malformed.xml
|
278
|
+
- spec/fixtures/user_get_recommended_artists.xml
|
277
279
|
- spec/fixtures/user_get_recommended_events.xml
|
278
280
|
- spec/fixtures/user_get_top_albums.xml
|
279
281
|
- spec/fixtures/user_get_top_artists.xml
|