lastfm 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,43 +23,44 @@ It supports methods which require {authentication}[http://www.last.fm/api/authen
23
23
 
24
24
  === Auth
25
25
 
26
- * auth.getToken
27
- * auth.getSession
26
+ * {auth.getToken}[http://www.lastfm.jp/api/show?service=265]
27
+ * {auth.getSession}[http://www.lastfm.jp/api/show?service=125]
28
28
 
29
29
  === Track
30
30
 
31
- * track.addTags
32
- * track.ban
33
- * track.getInfo
34
- * track.getSimilar
35
- * track.getTags
36
- * track.getTopFans
37
- * track.getTopTags
38
- * track.love
39
- * track.removeTag
40
- * track.scrobble
41
- * track.search
42
- * track.share
43
- * track.updateNowPlaying
31
+ * {track.addTags}[http://www.lastfm.jp/api/show?service=304]
32
+ * {track.ban}[http://www.lastfm.jp/api/show?service=261]
33
+ * {track.getCorrection}[http://www.lastfm.jp/api/show?service=447]
34
+ * {track.getInfo}[http://www.lastfm.jp/api/show?service=356]
35
+ * {track.getSimilar}[http://www.lastfm.jp/api/show?service=319]
36
+ * {track.getTags}[http://www.lastfm.jp/api/show?service=320]
37
+ * {track.getTopFans}[http://www.lastfm.jp/api/show?service=312]
38
+ * {track.getTopTags}[http://www.lastfm.jp/api/show?service=289]
39
+ * {track.love}[http://www.lastfm.jp/api/show?service=260]
40
+ * {track.removeTag}[http://www.lastfm.jp/api/show?service=316]
41
+ * {track.scrobble}[http://www.lastfm.jp/api/show?service=443]
42
+ * {track.search}[http://www.lastfm.jp/api/show?service=286]
43
+ * {track.share}[http://www.lastfm.jp/api/show?service=305]
44
+ * {track.updateNowPlaying}[http://www.lastfm.jp/api/show?service=454]
44
45
 
45
46
  === Artist
46
47
 
47
- * artist.getEvents
48
+ * {artist.getEvents}[http://www.lastfm.jp/api/show?service=117]
48
49
 
49
50
  === User
50
51
 
51
- * user.getInfo
52
- * user.getFriends
53
- * user.getRecentTracks
54
- * user.getNeighbours
52
+ * {user.getInfo}[http://www.lastfm.jp/api/show?service=344]
53
+ * {user.getFriends}[http://www.lastfm.jp/api/show?service=263]
54
+ * {user.getRecentTracks}[http://www.lastfm.jp/api/show?service=278]
55
+ * {user.getNeighbours}[http://www.lastfm.jp/api/show?service=264]
55
56
 
56
57
  === Geo
57
58
 
58
- * geo.getEvents
59
+ * {geo.getEvents}[http://www.lastfm.jp/api/show?service=270]
59
60
 
60
61
  === Library
61
62
 
62
- * library.getArtists
63
+ * {library.getArtists}[http://www.lastfm.jp/api/show?service=322]
63
64
 
64
65
  == Installation
65
66
 
@@ -76,12 +77,14 @@ It supports methods which require {authentication}[http://www.last.fm/api/authen
76
77
 
77
78
  == Features/Problems
78
79
 
79
- == Commiters
80
+ == Comitters
80
81
 
81
- * mattfawcett <https://github.com/mattfawcett>
82
- * peplin <https://github.com/peplin>
83
- * liff <https://github.com/liff>
84
- * pipedreambomb <https://github.com/pipedreambomb>
82
+ * {mattfawcett}[https://github.com/mattfawcett]
83
+ * {peplin}[https://github.com/peplin]
84
+ * {liff}[https://github.com/liff]
85
+ * {pipedreambomb}[https://github.com/pipedreambomb]
86
+ * {dbolson}[https://github.com/dbolson]
87
+ * {webs}[https://github.com/webs]
85
88
 
86
89
  == Note on Patches/Pull Requests
87
90
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.6.0
@@ -12,6 +12,9 @@ class Lastfm
12
12
  regular_method :get_info, [:artist, :track], [[:username, nil]] do |response|
13
13
  response.xml['track']
14
14
  end
15
+ regular_method :get_correction, [:artist, :track], [[:username, nil]] do |response|
16
+ response.xml['correction']
17
+ end
15
18
  regular_method :get_top_fans, [:artist, :track], [] do |response|
16
19
  response.xml['topfans']['user']
17
20
  end
@@ -0,0 +1,14 @@
1
+ <corrections>
2
+ <correction index="0" artistcorrected="1" trackcorrected="1">
3
+ <track>
4
+ <name>One More Cup of Coffee</name>
5
+ <mbid/>
6
+ <url>www.last.fm/music/The+White+Stripes/_/One+More+Cup+of+Coffee</url>
7
+ <artist>
8
+ <name>The White Stripes</name>
9
+ <mbid>eeb1195b-f213-4ce1-b28c-8565211f8e43</mbid>
10
+ <url>http://www.last.fm/music/The+White+Stripes</url>
11
+ </artist>
12
+ </track>
13
+ </correction>
14
+ </corrections>
@@ -185,6 +185,19 @@ XML
185
185
  track['toptags']['tag'].first['name'].should eql('pop')
186
186
  end
187
187
 
188
+ it 'should get correction' do
189
+ @lastfm.should_receive(:request).with('track.getCorrection', {
190
+ :artist => 'White Stripes',
191
+ :track => 'One More Cup of Coffee',
192
+ :username => 'wainekerr',
193
+ }).and_return(make_response('track_get_correction'))
194
+
195
+ correction = @lastfm.track.get_correction('White Stripes', 'One More Cup of Coffee', 'wainekerr')
196
+ correction['track']['name'].should eql('One More Cup of Coffee')
197
+ correction['track']['artist']['name'].should eql('The White Stripes')
198
+ correction['track']['url'].should eql('www.last.fm/music/The+White+Stripes/_/One+More+Cup+of+Coffee')
199
+ end
200
+
188
201
  it 'should get xml with force array option' do
189
202
  @lastfm.should_receive(:request).with('track.getInfo', {
190
203
  :artist => 'Cher',
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lastfm
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 5
8
+ - 6
9
9
  - 0
10
- version: 0.5.0
10
+ version: 0.6.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - youpy
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-13 00:00:00 +09:00
18
+ date: 2011-06-27 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -110,6 +110,7 @@ files:
110
110
  - spec/fixtures/library_get_artists.xml
111
111
  - spec/fixtures/ng.xml
112
112
  - spec/fixtures/ok.xml
113
+ - spec/fixtures/track_get_correction.xml
113
114
  - spec/fixtures/track_get_info.xml
114
115
  - spec/fixtures/track_get_info_force_array.xml
115
116
  - spec/fixtures/track_get_similar.xml