lastfm 0.3.0 → 0.4.0

This diff has not been reviewed by any users.
Sign up to get free protection for your applications and to get access to all the features.
@@ -51,6 +51,7 @@ It supports methods which require {authentication}[http://www.last.fm/api/authen
51
51
  * user.getInfo
52
52
  * user.getFriends
53
53
  * user.getRecentTracks
54
+ * user.getNeighbours
54
55
 
55
56
  == Installation
56
57
 
@@ -72,6 +73,7 @@ It supports methods which require {authentication}[http://www.last.fm/api/authen
72
73
  * mattfawcett <https://github.com/mattfawcett>
73
74
  * peplin <https://github.com/peplin>
74
75
  * liff <https://github.com/liff>
76
+ * pipedreambomb <https://github.com/pipedreambomb>
75
77
 
76
78
  == Note on Patches/Pull Requests
77
79
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
@@ -8,6 +8,13 @@ class Lastfm
8
8
  regular_method :get_friends, [:user], [[:recenttracks, nil], [:limit, nil], [:page, nil]] do |response|
9
9
  response.xml['friends']['user']
10
10
  end
11
+
12
+ regular_method :get_neighbours, [:user], [[:recenttracks, nil], [:limit, nil], [:page, nil]] do |response|
13
+ neighbours = response.xml['neighbours']['user']
14
+ #ignore first "user" as this is an attribute, not an object
15
+ neighbours.delete_at(0) if neighbours[0].is_a? String
16
+ neighbours
17
+ end
11
18
 
12
19
  regular_method :get_recent_tracks, [:user], [[:limit, nil], [:page, nil], [:to, nil], [:from, nil]] do |response|
13
20
  response.xml['recenttracks']['track']
@@ -1,4 +1,3 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
1
  <lfm status="ok">
3
2
  <user>
4
3
  <id>1000002</id>
@@ -0,0 +1,503 @@
1
+ <lfm status="ok">
2
+ <neighbours user="RJ">
3
+ <user>
4
+ <name>willywongi</name>
5
+ <realname>Pongi</realname>
6
+ <url>http://www.last.fm/user/willywongi</url>
7
+ <image size="small">http://userserve-ak.last.fm/serve/34/11889165.png</image>
8
+ <image size="medium">http://userserve-ak.last.fm/serve/64/11889165.png</image>
9
+ <image size="large">http://userserve-ak.last.fm/serve/126/11889165.png</image>
10
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/11889165.png</image>
11
+ <match>0.99741923809052</match>
12
+ </user>
13
+ <user>
14
+ <name>Auron55</name>
15
+ <realname>Yoshi Tacke</realname>
16
+ <url>http://www.last.fm/user/Auron55</url>
17
+ <image size="small">http://userserve-ak.last.fm/serve/34/1390737.jpg</image>
18
+ <image size="medium">http://userserve-ak.last.fm/serve/64/1390737.jpg</image>
19
+ <image size="large">http://userserve-ak.last.fm/serve/126/1390737.jpg</image>
20
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/1390737.jpg</image>
21
+ <match>0.99741286039352</match>
22
+ </user>
23
+ <user>
24
+ <name>Dead_Man_Rollin</name>
25
+ <realname>Ishtiaque</realname>
26
+ <url>http://www.last.fm/user/Dead_Man_Rollin</url>
27
+ <image size="small">http://userserve-ak.last.fm/serve/34/22128011.jpg</image>
28
+ <image size="medium">http://userserve-ak.last.fm/serve/64/22128011.jpg</image>
29
+ <image size="large">http://userserve-ak.last.fm/serve/126/22128011.jpg</image>
30
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/22128011.jpg</image>
31
+ <match>0.99728548526764</match>
32
+ </user>
33
+ <user>
34
+ <name>elbryanlos</name>
35
+ <realname>Fabiano</realname>
36
+ <url>http://www.last.fm/user/elbryanlos</url>
37
+ <image size="small">http://userserve-ak.last.fm/serve/34/6331893.jpg</image>
38
+ <image size="medium">http://userserve-ak.last.fm/serve/64/6331893.jpg</image>
39
+ <image size="large">http://userserve-ak.last.fm/serve/126/6331893.jpg</image>
40
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/6331893.jpg</image>
41
+ <match>0.99721282720566</match>
42
+ </user>
43
+ <user>
44
+ <name>SoundOfMyLife</name>
45
+ <realname>Katharina</realname>
46
+ <url>http://www.last.fm/user/SoundOfMyLife</url>
47
+ <image size="small">http://userserve-ak.last.fm/serve/34/38937397.jpg</image>
48
+ <image size="medium">http://userserve-ak.last.fm/serve/64/38937397.jpg</image>
49
+ <image size="large">http://userserve-ak.last.fm/serve/126/38937397.jpg</image>
50
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/38937397.jpg</image>
51
+ <match>0.99704891443253</match>
52
+ </user>
53
+ <user>
54
+ <name>SRVOLLAN75</name>
55
+ <realname>Stale Vollan</realname>
56
+ <url>http://www.last.fm/user/SRVOLLAN75</url>
57
+ <image size="small">http://userserve-ak.last.fm/serve/34/38560379.jpg</image>
58
+ <image size="medium">http://userserve-ak.last.fm/serve/64/38560379.jpg</image>
59
+ <image size="large">http://userserve-ak.last.fm/serve/126/38560379.jpg</image>
60
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/38560379.jpg</image>
61
+ <match>0.99693632125854</match>
62
+ </user>
63
+ <user>
64
+ <name>Henil</name>
65
+ <realname>Henrik Nilsson</realname>
66
+ <url>http://www.last.fm/user/Henil</url>
67
+ <image size="small">http://userserve-ak.last.fm/serve/34/1122086.jpg</image>
68
+ <image size="medium">http://userserve-ak.last.fm/serve/64/1122086.jpg</image>
69
+ <image size="large">http://userserve-ak.last.fm/serve/126/1122086.jpg</image>
70
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/1122086.jpg</image>
71
+ <match>0.99687933921814</match>
72
+ </user>
73
+ <user>
74
+ <name>gresco</name>
75
+ <realname>Gerónimo Poppino</realname>
76
+ <url>http://www.last.fm/user/gresco</url>
77
+ <image size="small">http://userserve-ak.last.fm/serve/34/1790196.png</image>
78
+ <image size="medium">http://userserve-ak.last.fm/serve/64/1790196.png</image>
79
+ <image size="large">http://userserve-ak.last.fm/serve/126/1790196.png</image>
80
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/1790196.png</image>
81
+ <match>0.99673479795456</match>
82
+ </user>
83
+ <user>
84
+ <name>ivan_markovic</name>
85
+ <realname>Ivan Markovic</realname>
86
+ <url>http://www.last.fm/user/ivan_markovic</url>
87
+ <image size="small"/>
88
+ <image size="medium"/>
89
+ <image size="large"/>
90
+ <image size="extralarge"/>
91
+ <match>0.99658328294754</match>
92
+ </user>
93
+ <user>
94
+ <name>RePreGid</name>
95
+ <realname>Sergey</realname>
96
+ <url>http://www.last.fm/user/RePreGid</url>
97
+ <image size="small">http://userserve-ak.last.fm/serve/34/43782949.jpg</image>
98
+ <image size="medium">http://userserve-ak.last.fm/serve/64/43782949.jpg</image>
99
+ <image size="large">http://userserve-ak.last.fm/serve/126/43782949.jpg</image>
100
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/43782949.jpg</image>
101
+ <match>0.99652206897736</match>
102
+ </user>
103
+ <user>
104
+ <name>axetickle</name>
105
+ <realname/>
106
+ <url>http://www.last.fm/user/axetickle</url>
107
+ <image size="small">http://userserve-ak.last.fm/serve/34/1461925.jpg</image>
108
+ <image size="medium">http://userserve-ak.last.fm/serve/64/1461925.jpg</image>
109
+ <image size="large">http://userserve-ak.last.fm/serve/126/1461925.jpg</image>
110
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/1461925.jpg</image>
111
+ <match>0.99643456935883</match>
112
+ </user>
113
+ <user>
114
+ <name>Overburn</name>
115
+ <realname>Stefan Voesch</realname>
116
+ <url>http://www.last.fm/user/Overburn</url>
117
+ <image size="small">http://userserve-ak.last.fm/serve/34/25648771.jpg</image>
118
+ <image size="medium">http://userserve-ak.last.fm/serve/64/25648771.jpg</image>
119
+ <image size="large">http://userserve-ak.last.fm/serve/126/25648771.jpg</image>
120
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/25648771.jpg</image>
121
+ <match>0.99637347459793</match>
122
+ </user>
123
+ <user>
124
+ <name>smffofts</name>
125
+ <realname/>
126
+ <url>http://www.last.fm/user/smffofts</url>
127
+ <image size="small">http://userserve-ak.last.fm/serve/34/47696709.jpg</image>
128
+ <image size="medium">http://userserve-ak.last.fm/serve/64/47696709.jpg</image>
129
+ <image size="large">http://userserve-ak.last.fm/serve/126/47696709.jpg</image>
130
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/47696709.jpg</image>
131
+ <match>0.99636721611023</match>
132
+ </user>
133
+ <user>
134
+ <name>rimkin</name>
135
+ <realname/>
136
+ <url>http://www.last.fm/user/rimkin</url>
137
+ <image size="small"/>
138
+ <image size="medium"/>
139
+ <image size="large"/>
140
+ <image size="extralarge"/>
141
+ <match>0.99628508090973</match>
142
+ </user>
143
+ <user>
144
+ <name>Cheekychappo</name>
145
+ <realname>Mark</realname>
146
+ <url>http://www.last.fm/user/Cheekychappo</url>
147
+ <image size="small">http://userserve-ak.last.fm/serve/34/4686588.jpg</image>
148
+ <image size="medium">http://userserve-ak.last.fm/serve/64/4686588.jpg</image>
149
+ <image size="large">http://userserve-ak.last.fm/serve/126/4686588.jpg</image>
150
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/4686588.jpg</image>
151
+ <match>0.99626511335373</match>
152
+ </user>
153
+ <user>
154
+ <name>SolidClownfish</name>
155
+ <realname/>
156
+ <url>http://www.last.fm/user/SolidClownfish</url>
157
+ <image size="small">http://userserve-ak.last.fm/serve/34/48846125.jpg</image>
158
+ <image size="medium">http://userserve-ak.last.fm/serve/64/48846125.jpg</image>
159
+ <image size="large">http://userserve-ak.last.fm/serve/126/48846125.jpg</image>
160
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/48846125.jpg</image>
161
+ <match>0.99625200033188</match>
162
+ </user>
163
+ <user>
164
+ <name>2stein</name>
165
+ <realname>Rich</realname>
166
+ <url>http://www.last.fm/user/2stein</url>
167
+ <image size="small">http://userserve-ak.last.fm/serve/34/691008.png</image>
168
+ <image size="medium">http://userserve-ak.last.fm/serve/64/691008.png</image>
169
+ <image size="large">http://userserve-ak.last.fm/serve/126/691008.png</image>
170
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/691008.png</image>
171
+ <match>0.99624156951904</match>
172
+ </user>
173
+ <user>
174
+ <name>freakitchen</name>
175
+ <realname>Jez Clifton</realname>
176
+ <url>http://www.last.fm/user/freakitchen</url>
177
+ <image size="small">http://userserve-ak.last.fm/serve/34/1671016.jpg</image>
178
+ <image size="medium">http://userserve-ak.last.fm/serve/64/1671016.jpg</image>
179
+ <image size="large">http://userserve-ak.last.fm/serve/126/1671016.jpg</image>
180
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/1671016.jpg</image>
181
+ <match>0.99622488021851</match>
182
+ </user>
183
+ <user>
184
+ <name>Hokeyrocks</name>
185
+ <realname>Hokey</realname>
186
+ <url>http://www.last.fm/user/Hokeyrocks</url>
187
+ <image size="small">http://userserve-ak.last.fm/serve/34/1519352.gif</image>
188
+ <image size="medium">http://userserve-ak.last.fm/serve/64/1519352.gif</image>
189
+ <image size="large">http://userserve-ak.last.fm/serve/126/1519352.gif</image>
190
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/1519352.gif</image>
191
+ <match>0.99617779254913</match>
192
+ </user>
193
+ <user>
194
+ <name>kirk444</name>
195
+ <realname>Scott</realname>
196
+ <url>http://www.last.fm/user/kirk444</url>
197
+ <image size="small">http://userserve-ak.last.fm/serve/34/2849160.jpg</image>
198
+ <image size="medium">http://userserve-ak.last.fm/serve/64/2849160.jpg</image>
199
+ <image size="large">http://userserve-ak.last.fm/serve/126/2849160.jpg</image>
200
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/2849160.jpg</image>
201
+ <match>0.99616688489914</match>
202
+ </user>
203
+ <user>
204
+ <name>DeaconEsq</name>
205
+ <realname>Jay</realname>
206
+ <url>http://www.last.fm/user/DeaconEsq</url>
207
+ <image size="small">http://userserve-ak.last.fm/serve/34/984434.jpg</image>
208
+ <image size="medium">http://userserve-ak.last.fm/serve/64/984434.jpg</image>
209
+ <image size="large">http://userserve-ak.last.fm/serve/126/984434.jpg</image>
210
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/984434.jpg</image>
211
+ <match>0.99615001678467</match>
212
+ </user>
213
+ <user>
214
+ <name>jackpaice</name>
215
+ <realname>jorge</realname>
216
+ <url>http://www.last.fm/user/jackpaice</url>
217
+ <image size="small">http://userserve-ak.last.fm/serve/34/39832299.jpg</image>
218
+ <image size="medium">http://userserve-ak.last.fm/serve/64/39832299.jpg</image>
219
+ <image size="large">http://userserve-ak.last.fm/serve/126/39832299.jpg</image>
220
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/39832299.jpg</image>
221
+ <match>0.99614703655243</match>
222
+ </user>
223
+ <user>
224
+ <name>MadeOutOfCats</name>
225
+ <realname/>
226
+ <url>http://www.last.fm/user/MadeOutOfCats</url>
227
+ <image size="small">http://userserve-ak.last.fm/serve/34/8342525.jpg</image>
228
+ <image size="medium">http://userserve-ak.last.fm/serve/64/8342525.jpg</image>
229
+ <image size="large">http://userserve-ak.last.fm/serve/126/8342525.jpg</image>
230
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/8342525.jpg</image>
231
+ <match>0.99611926078796</match>
232
+ </user>
233
+ <user>
234
+ <name>Matt1610</name>
235
+ <realname>Matt</realname>
236
+ <url>http://www.last.fm/user/Matt1610</url>
237
+ <image size="small">http://userserve-ak.last.fm/serve/34/22096459.jpg</image>
238
+ <image size="medium">http://userserve-ak.last.fm/serve/64/22096459.jpg</image>
239
+ <image size="large">http://userserve-ak.last.fm/serve/126/22096459.jpg</image>
240
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/22096459.jpg</image>
241
+ <match>0.99610882997513</match>
242
+ </user>
243
+ <user>
244
+ <name>cyclodude</name>
245
+ <realname>Ivo te Kiefte</realname>
246
+ <url>http://www.last.fm/user/cyclodude</url>
247
+ <image size="small">http://userserve-ak.last.fm/serve/34/35302681.gif</image>
248
+ <image size="medium">http://userserve-ak.last.fm/serve/64/35302681.gif</image>
249
+ <image size="large">http://userserve-ak.last.fm/serve/126/35302681.gif</image>
250
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/35302681.gif</image>
251
+ <match>0.99603706598282</match>
252
+ </user>
253
+ <user>
254
+ <name>keebsmp3s</name>
255
+ <realname>Eric Kleiber</realname>
256
+ <url>http://www.last.fm/user/keebsmp3s</url>
257
+ <image size="small">http://userserve-ak.last.fm/serve/34/44048441.jpg</image>
258
+ <image size="medium">http://userserve-ak.last.fm/serve/64/44048441.jpg</image>
259
+ <image size="large">http://userserve-ak.last.fm/serve/126/44048441.jpg</image>
260
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/44048441.jpg</image>
261
+ <match>0.99603098630905</match>
262
+ </user>
263
+ <user>
264
+ <name>fabfelipe</name>
265
+ <realname>Felipe Arriagada</realname>
266
+ <url>http://www.last.fm/user/fabfelipe</url>
267
+ <image size="small">http://userserve-ak.last.fm/serve/34/61896217.jpg</image>
268
+ <image size="medium">http://userserve-ak.last.fm/serve/64/61896217.jpg</image>
269
+ <image size="large">http://userserve-ak.last.fm/serve/126/61896217.jpg</image>
270
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/61896217.jpg</image>
271
+ <match>0.99599373340607</match>
272
+ </user>
273
+ <user>
274
+ <name>Dyard1</name>
275
+ <realname/>
276
+ <url>http://www.last.fm/user/Dyard1</url>
277
+ <image size="small"/>
278
+ <image size="medium"/>
279
+ <image size="large"/>
280
+ <image size="extralarge"/>
281
+ <match>0.99591690301895</match>
282
+ </user>
283
+ <user>
284
+ <name>stevechr</name>
285
+ <realname/>
286
+ <url>http://www.last.fm/user/stevechr</url>
287
+ <image size="small">http://userserve-ak.last.fm/serve/34/52249297.jpg</image>
288
+ <image size="medium">http://userserve-ak.last.fm/serve/64/52249297.jpg</image>
289
+ <image size="large">http://userserve-ak.last.fm/serve/126/52249297.jpg</image>
290
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/52249297.jpg</image>
291
+ <match>0.99589598178864</match>
292
+ </user>
293
+ <user>
294
+ <name>Unicorno</name>
295
+ <realname/>
296
+ <url>http://www.last.fm/user/Unicorno</url>
297
+ <image size="small"/>
298
+ <image size="medium"/>
299
+ <image size="large"/>
300
+ <image size="extralarge"/>
301
+ <match>0.99587386846542</match>
302
+ </user>
303
+ <user>
304
+ <name>rberaldo</name>
305
+ <realname>Roberto Beraldo Chaiben</realname>
306
+ <url>http://www.last.fm/user/rberaldo</url>
307
+ <image size="small">http://userserve-ak.last.fm/serve/34/29627237.jpg</image>
308
+ <image size="medium">http://userserve-ak.last.fm/serve/64/29627237.jpg</image>
309
+ <image size="large">http://userserve-ak.last.fm/serve/126/29627237.jpg</image>
310
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/29627237.jpg</image>
311
+ <match>0.99587172269821</match>
312
+ </user>
313
+ <user>
314
+ <name>buzyuka</name>
315
+ <realname>Kirill Tsybriy</realname>
316
+ <url>http://www.last.fm/user/buzyuka</url>
317
+ <image size="small"/>
318
+ <image size="medium"/>
319
+ <image size="large"/>
320
+ <image size="extralarge"/>
321
+ <match>0.99587112665176</match>
322
+ </user>
323
+ <user>
324
+ <name>dcchut</name>
325
+ <realname>robbo</realname>
326
+ <url>http://www.last.fm/user/dcchut</url>
327
+ <image size="small"/>
328
+ <image size="medium"/>
329
+ <image size="large"/>
330
+ <image size="extralarge"/>
331
+ <match>0.99584645032883</match>
332
+ </user>
333
+ <user>
334
+ <name>rhythmthing</name>
335
+ <realname>Josh Dick</realname>
336
+ <url>http://www.last.fm/user/rhythmthing</url>
337
+ <image size="small">http://userserve-ak.last.fm/serve/34/59599377.png</image>
338
+ <image size="medium">http://userserve-ak.last.fm/serve/64/59599377.png</image>
339
+ <image size="large">http://userserve-ak.last.fm/serve/126/59599377.png</image>
340
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/59599377.png</image>
341
+ <match>0.9958433508873</match>
342
+ </user>
343
+ <user>
344
+ <name>KB1OAO</name>
345
+ <realname>Daniel</realname>
346
+ <url>http://www.last.fm/user/KB1OAO</url>
347
+ <image size="small">http://userserve-ak.last.fm/serve/34/3459355.jpg</image>
348
+ <image size="medium">http://userserve-ak.last.fm/serve/64/3459355.jpg</image>
349
+ <image size="large">http://userserve-ak.last.fm/serve/126/3459355.jpg</image>
350
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/3459355.jpg</image>
351
+ <match>0.99583840370178</match>
352
+ </user>
353
+ <user>
354
+ <name>Wilq59r</name>
355
+ <realname/>
356
+ <url>http://www.last.fm/user/Wilq59r</url>
357
+ <image size="small">http://userserve-ak.last.fm/serve/34/57661211.jpg</image>
358
+ <image size="medium">http://userserve-ak.last.fm/serve/64/57661211.jpg</image>
359
+ <image size="large">http://userserve-ak.last.fm/serve/126/57661211.jpg</image>
360
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/57661211.jpg</image>
361
+ <match>0.99583721160889</match>
362
+ </user>
363
+ <user>
364
+ <name>lrpires</name>
365
+ <realname>Luís Roma Pires</realname>
366
+ <url>http://www.last.fm/user/lrpires</url>
367
+ <image size="small">http://userserve-ak.last.fm/serve/34/52142451.jpg</image>
368
+ <image size="medium">http://userserve-ak.last.fm/serve/64/52142451.jpg</image>
369
+ <image size="large">http://userserve-ak.last.fm/serve/126/52142451.jpg</image>
370
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/52142451.jpg</image>
371
+ <match>0.99583518505096</match>
372
+ </user>
373
+ <user>
374
+ <name>blady_pirat</name>
375
+ <realname/>
376
+ <url>http://www.last.fm/user/blady_pirat</url>
377
+ <image size="small">http://userserve-ak.last.fm/serve/34/887573.jpg</image>
378
+ <image size="medium">http://userserve-ak.last.fm/serve/64/887573.jpg</image>
379
+ <image size="large">http://userserve-ak.last.fm/serve/126/887573.jpg</image>
380
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/887573.jpg</image>
381
+ <match>0.99580824375153</match>
382
+ </user>
383
+ <user>
384
+ <name>Don_Keno</name>
385
+ <realname/>
386
+ <url>http://www.last.fm/user/Don_Keno</url>
387
+ <image size="small">http://userserve-ak.last.fm/serve/34/41773789.jpg</image>
388
+ <image size="medium">http://userserve-ak.last.fm/serve/64/41773789.jpg</image>
389
+ <image size="large">http://userserve-ak.last.fm/serve/126/41773789.jpg</image>
390
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/41773789.jpg</image>
391
+ <match>0.9958011507988</match>
392
+ </user>
393
+ <user>
394
+ <name>Entrepreneur</name>
395
+ <realname>Mike</realname>
396
+ <url>http://www.last.fm/user/Entrepreneur</url>
397
+ <image size="small">http://userserve-ak.last.fm/serve/34/2302858.gif</image>
398
+ <image size="medium">http://userserve-ak.last.fm/serve/64/2302858.gif</image>
399
+ <image size="large">http://userserve-ak.last.fm/serve/126/2302858.gif</image>
400
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/2302858.gif</image>
401
+ <match>0.99578410387039</match>
402
+ </user>
403
+ <user>
404
+ <name>drinciteiro</name>
405
+ <realname>Saul Verez Fernandez</realname>
406
+ <url>http://www.last.fm/user/drinciteiro</url>
407
+ <image size="small">http://userserve-ak.last.fm/serve/34/44645041.jpg</image>
408
+ <image size="medium">http://userserve-ak.last.fm/serve/64/44645041.jpg</image>
409
+ <image size="large">http://userserve-ak.last.fm/serve/126/44645041.jpg</image>
410
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/44645041.jpg</image>
411
+ <match>0.99571818113327</match>
412
+ </user>
413
+ <user>
414
+ <name>ledzep71</name>
415
+ <realname/>
416
+ <url>http://www.last.fm/user/ledzep71</url>
417
+ <image size="small"/>
418
+ <image size="medium"/>
419
+ <image size="large"/>
420
+ <image size="extralarge"/>
421
+ <match>0.99569821357727</match>
422
+ </user>
423
+ <user>
424
+ <name>quinn1489</name>
425
+ <realname>Mike</realname>
426
+ <url>http://www.last.fm/user/quinn1489</url>
427
+ <image size="small">http://userserve-ak.last.fm/serve/34/1713237.jpg</image>
428
+ <image size="medium">http://userserve-ak.last.fm/serve/64/1713237.jpg</image>
429
+ <image size="large">http://userserve-ak.last.fm/serve/126/1713237.jpg</image>
430
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/1713237.jpg</image>
431
+ <match>0.99563783407211</match>
432
+ </user>
433
+ <user>
434
+ <name>linkz0r</name>
435
+ <realname/>
436
+ <url>http://www.last.fm/user/linkz0r</url>
437
+ <image size="small">http://userserve-ak.last.fm/serve/34/4958711.jpg</image>
438
+ <image size="medium">http://userserve-ak.last.fm/serve/64/4958711.jpg</image>
439
+ <image size="large">http://userserve-ak.last.fm/serve/126/4958711.jpg</image>
440
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/4958711.jpg</image>
441
+ <match>0.99563282728195</match>
442
+ </user>
443
+ <user>
444
+ <name>nigelrob</name>
445
+ <realname/>
446
+ <url>http://www.last.fm/user/nigelrob</url>
447
+ <image size="small"/>
448
+ <image size="medium"/>
449
+ <image size="large"/>
450
+ <image size="extralarge"/>
451
+ <match>0.99562728404999</match>
452
+ </user>
453
+ <user>
454
+ <name>Bulco1967</name>
455
+ <realname/>
456
+ <url>http://www.last.fm/user/Bulco1967</url>
457
+ <image size="small"/>
458
+ <image size="medium"/>
459
+ <image size="large"/>
460
+ <image size="extralarge"/>
461
+ <match>0.99561995267868</match>
462
+ </user>
463
+ <user>
464
+ <name>shousewright</name>
465
+ <realname>Steve Housewright</realname>
466
+ <url>http://www.last.fm/user/shousewright</url>
467
+ <image size="small"/>
468
+ <image size="medium"/>
469
+ <image size="large"/>
470
+ <image size="extralarge"/>
471
+ <match>0.99561125040054</match>
472
+ </user>
473
+ <user>
474
+ <name>greg0101</name>
475
+ <realname/>
476
+ <url>http://www.last.fm/user/greg0101</url>
477
+ <image size="small"/>
478
+ <image size="medium"/>
479
+ <image size="large"/>
480
+ <image size="extralarge"/>
481
+ <match>0.99559170007706</match>
482
+ </user>
483
+ <user>
484
+ <name>salicek</name>
485
+ <realname>Martin</realname>
486
+ <url>http://www.last.fm/user/salicek</url>
487
+ <image size="small">http://userserve-ak.last.fm/serve/34/24573513.jpg</image>
488
+ <image size="medium">http://userserve-ak.last.fm/serve/64/24573513.jpg</image>
489
+ <image size="large">http://userserve-ak.last.fm/serve/126/24573513.jpg</image>
490
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/24573513.jpg</image>
491
+ <match>0.99558782577515</match>
492
+ </user>
493
+ <user>
494
+ <name>larsolae</name>
495
+ <realname/>
496
+ <url>http://www.last.fm/user/larsolae</url>
497
+ <image size="small">http://userserve-ak.last.fm/serve/34/1685783.jpg</image>
498
+ <image size="medium">http://userserve-ak.last.fm/serve/64/1685783.jpg</image>
499
+ <image size="large">http://userserve-ak.last.fm/serve/126/1685783.jpg</image>
500
+ <image size="extralarge">http://userserve-ak.last.fm/serve/252/1685783.jpg</image>
501
+ <match>0.99543362855911</match>
502
+ </user>
503
+ </neighbours></lfm>
@@ -371,6 +371,20 @@ XML
371
371
  friends[0]['name'].should eql('polaroide')
372
372
  end
373
373
  end
374
+
375
+ describe '#get_neighbours' do
376
+ it 'should get user\'s neighbours' do
377
+ @lastfm.should_receive(:request).with('user.getNeighbours', {
378
+ :user => 'rj',
379
+ :recenttracks => nil,
380
+ :page => nil,
381
+ :limit => nil
382
+ }).and_return(make_response('user_get_neighbours'))
383
+ neighbours = @lastfm.user.get_neighbours('rj')
384
+ neighbours.size.should == 50
385
+ neighbours[0]['name'].should eql('willywongi')
386
+ end
387
+ end
374
388
 
375
389
  describe '#get_recent_tracks' do
376
390
  it 'should get user\'s recent tracks' do
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: 19
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 3
8
+ - 4
9
9
  - 0
10
- version: 0.3.0
10
+ version: 0.4.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-03-13 00:00:00 +09:00
18
+ date: 2011-05-06 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -115,6 +115,7 @@ files:
115
115
  - spec/fixtures/track_search.xml
116
116
  - spec/fixtures/user_get_friends.xml
117
117
  - spec/fixtures/user_get_info.xml
118
+ - spec/fixtures/user_get_neighbours.xml
118
119
  - spec/fixtures/user_get_recent_tracks.xml
119
120
  - spec/lastfm_spec.rb
120
121
  - spec/method_category_spec.rb