rdio_api 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. data/.gitignore +11 -0
  2. data/Gemfile +4 -0
  3. data/Guardfile +20 -0
  4. data/README.md +115 -0
  5. data/Rakefile +10 -0
  6. data/lib/rdio_api/api.rb +81 -0
  7. data/lib/rdio_api/client.rb +48 -0
  8. data/lib/rdio_api/version.rb +3 -0
  9. data/lib/rdio_api.rb +14 -0
  10. data/rdio_api.gemspec +30 -0
  11. data/spec/fixtures/addFriend.json +4 -0
  12. data/spec/fixtures/addToCollection.json +4 -0
  13. data/spec/fixtures/addToPlaylist.json +4 -0
  14. data/spec/fixtures/createPlaylist.json +19 -0
  15. data/spec/fixtures/currentUser.json +14 -0
  16. data/spec/fixtures/deletePlaylist.json +4 -0
  17. data/spec/fixtures/findUser.json +14 -0
  18. data/spec/fixtures/get.json +16 -0
  19. data/spec/fixtures/getActivityStream.json +18 -0
  20. data/spec/fixtures/getAlbumsForArtist.json +917 -0
  21. data/spec/fixtures/getAlbumsForArtistInCollection.json +82 -0
  22. data/spec/fixtures/getAlbumsInCollection.json +1184 -0
  23. data/spec/fixtures/getArtistsInCollection.json +37 -0
  24. data/spec/fixtures/getHeavyRotation.json +394 -0
  25. data/spec/fixtures/getNewReleases.json +796 -0
  26. data/spec/fixtures/getObjectFromShortCode.json +33 -0
  27. data/spec/fixtures/getObjectFromUrl.json +16 -0
  28. data/spec/fixtures/getPlaybackToken.json +4 -0
  29. data/spec/fixtures/getPlaylists.json +25 -0
  30. data/spec/fixtures/getTopCharts.json +181 -0
  31. data/spec/fixtures/getTracksForAlbumInCollection.json +440 -0
  32. data/spec/fixtures/getTracksForArtist.json +295 -0
  33. data/spec/fixtures/getTracksForArtistInCollection.json +34 -0
  34. data/spec/fixtures/getTracksInCollection.json +121 -0
  35. data/spec/fixtures/removeFriend.json +4 -0
  36. data/spec/fixtures/removeFromCollection.json +4 -0
  37. data/spec/fixtures/removeFromPlaylist.json +4 -0
  38. data/spec/fixtures/search.json +523 -0
  39. data/spec/fixtures/searchSuggestions.json +117 -0
  40. data/spec/fixtures/setAvailableOffline.json +4 -0
  41. data/spec/fixtures/setPlaylistCollaborating.json +4 -0
  42. data/spec/fixtures/setPlaylistCollaborationMode.json +4 -0
  43. data/spec/fixtures/setPlaylistFields.json +4 -0
  44. data/spec/fixtures/setPlaylistOrder.json +4 -0
  45. data/spec/fixtures/userFollowers.json +27 -0
  46. data/spec/fixtures/userFollowing.json +27 -0
  47. data/spec/helper.rb +26 -0
  48. data/spec/rdio_api/activity_spec.rb +59 -0
  49. data/spec/rdio_api/catalog_spec.rb +77 -0
  50. data/spec/rdio_api/client_spec.rb +18 -0
  51. data/spec/rdio_api/collection_spec.rb +127 -0
  52. data/spec/rdio_api/core_spec.rb +59 -0
  53. data/spec/rdio_api/playback_spec.rb +22 -0
  54. data/spec/rdio_api/playlists_spec.rb +122 -0
  55. data/spec/rdio_api/social_spec.rb +92 -0
  56. metadata +273 -0
@@ -0,0 +1,440 @@
1
+ {
2
+ "status" :"ok",
3
+ "result" : [
4
+ {
5
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
6
+ "canDownloadAlbumOnly": true,
7
+ "artistUrl": "/artist/The_Black_Keys/",
8
+ "duration": 203,
9
+ "album": "Brothers",
10
+ "isClean": false,
11
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
12
+ "shortUrl": "http://rd.io/x/QDaXK2t_gQ",
13
+ "albumArtist": "The Black Keys",
14
+ "canStream": false,
15
+ "embedUrl": "http://rd.io/e/QDaXK2t_gQ",
16
+ "type": "t",
17
+ "price": "1.29",
18
+ "trackNum": 1,
19
+ "albumArtistKey": "r140592",
20
+ "key": "t2629843",
21
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
22
+ "canSample": true,
23
+ "name": "Everlasting Light",
24
+ "isExplicit": false,
25
+ "artist": "The Black Keys",
26
+ "url": "/artist/The_Black_Keys/album/Brothers/track/Everlasting_Light/",
27
+ "albumKey": "a216556",
28
+ "artistKey": "r140592",
29
+ "canDownload": true,
30
+ "length": 1,
31
+ "canTether": false
32
+ },
33
+ {
34
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
35
+ "canDownloadAlbumOnly": true,
36
+ "artistUrl": "/artist/The_Black_Keys/",
37
+ "duration": 198,
38
+ "album": "Brothers",
39
+ "isClean": false,
40
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
41
+ "shortUrl": "http://rd.io/x/QDaXK2t_hw",
42
+ "albumArtist": "The Black Keys",
43
+ "canStream": false,
44
+ "embedUrl": "http://rd.io/e/QDaXK2t_hw",
45
+ "type": "t",
46
+ "price": "1.29",
47
+ "trackNum": 2,
48
+ "albumArtistKey": "r140592",
49
+ "key": "t2629845",
50
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
51
+ "canSample": true,
52
+ "name": "Next Girl",
53
+ "isExplicit": false,
54
+ "artist": "The Black Keys",
55
+ "url": "/artist/The_Black_Keys/album/Brothers/track/Next_Girl/",
56
+ "albumKey": "a216556",
57
+ "artistKey": "r140592",
58
+ "canDownload": true,
59
+ "length": 1,
60
+ "canTether": false
61
+ },
62
+ {
63
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
64
+ "canDownloadAlbumOnly": true,
65
+ "artistUrl": "/artist/The_Black_Keys/",
66
+ "duration": 211,
67
+ "album": "Brothers",
68
+ "isClean": false,
69
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
70
+ "shortUrl": "http://rd.io/x/QDaXK2t_hQ",
71
+ "albumArtist": "The Black Keys",
72
+ "canStream": false,
73
+ "embedUrl": "http://rd.io/e/QDaXK2t_hQ",
74
+ "type": "t",
75
+ "price": "1.29",
76
+ "trackNum": 3,
77
+ "albumArtistKey": "r140592",
78
+ "key": "t2629847",
79
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
80
+ "canSample": true,
81
+ "name": "Tighten Up",
82
+ "isExplicit": false,
83
+ "artist": "The Black Keys",
84
+ "url": "/artist/The_Black_Keys/album/Brothers/track/Tighten_Up/",
85
+ "albumKey": "a216556",
86
+ "artistKey": "r140592",
87
+ "canDownload": true,
88
+ "length": 1,
89
+ "canTether": false
90
+ },
91
+ {
92
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
93
+ "canDownloadAlbumOnly": true,
94
+ "artistUrl": "/artist/The_Black_Keys/",
95
+ "duration": 191,
96
+ "album": "Brothers",
97
+ "isClean": false,
98
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
99
+ "shortUrl": "http://rd.io/x/QDaXK2t_iA",
100
+ "albumArtist": "The Black Keys",
101
+ "canStream": false,
102
+ "embedUrl": "http://rd.io/e/QDaXK2t_iA",
103
+ "type": "t",
104
+ "price": "1.29",
105
+ "trackNum": 4,
106
+ "albumArtistKey": "r140592",
107
+ "key": "t2629850",
108
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
109
+ "canSample": true,
110
+ "name": "Howlin' For You",
111
+ "isExplicit": false,
112
+ "artist": "The Black Keys",
113
+ "url": "/artist/The_Black_Keys/album/Brothers/track/Howlin%27_For_You/",
114
+ "albumKey": "a216556",
115
+ "artistKey": "r140592",
116
+ "canDownload": true,
117
+ "length": 1,
118
+ "canTether": false
119
+ },
120
+ {
121
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
122
+ "canDownloadAlbumOnly": true,
123
+ "artistUrl": "/artist/The_Black_Keys/",
124
+ "duration": 186,
125
+ "album": "Brothers",
126
+ "isClean": false,
127
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
128
+ "shortUrl": "http://rd.io/x/QDaXK2t_jw",
129
+ "albumArtist": "The Black Keys",
130
+ "canStream": false,
131
+ "embedUrl": "http://rd.io/e/QDaXK2t_jw",
132
+ "type": "t",
133
+ "price": "1.29",
134
+ "trackNum": 5,
135
+ "albumArtistKey": "r140592",
136
+ "key": "t2629853",
137
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
138
+ "canSample": true,
139
+ "name": "She's Long Gone",
140
+ "isExplicit": false,
141
+ "artist": "The Black Keys",
142
+ "url": "/artist/The_Black_Keys/album/Brothers/track/She%27s_Long_Gone/",
143
+ "albumKey": "a216556",
144
+ "artistKey": "r140592",
145
+ "canDownload": true,
146
+ "length": 1,
147
+ "canTether": false
148
+ },
149
+ {
150
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
151
+ "canDownloadAlbumOnly": true,
152
+ "artistUrl": "/artist/The_Black_Keys/",
153
+ "duration": 129,
154
+ "album": "Brothers",
155
+ "isClean": false,
156
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
157
+ "shortUrl": "http://rd.io/x/QDaXK2t_sg",
158
+ "albumArtist": "The Black Keys",
159
+ "canStream": false,
160
+ "embedUrl": "http://rd.io/e/QDaXK2t_sg",
161
+ "type": "t",
162
+ "price": "1.29",
163
+ "trackNum": 6,
164
+ "albumArtistKey": "r140592",
165
+ "key": "t2629856",
166
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
167
+ "canSample": true,
168
+ "name": "Black Mud",
169
+ "isExplicit": false,
170
+ "artist": "The Black Keys",
171
+ "url": "/artist/The_Black_Keys/album/Brothers/track/Black_Mud/",
172
+ "albumKey": "a216556",
173
+ "artistKey": "r140592",
174
+ "canDownload": true,
175
+ "length": 1,
176
+ "canTether": false
177
+ },
178
+ {
179
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
180
+ "canDownloadAlbumOnly": true,
181
+ "artistUrl": "/artist/The_Black_Keys/",
182
+ "duration": 300,
183
+ "album": "Brothers",
184
+ "isClean": false,
185
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
186
+ "shortUrl": "http://rd.io/x/QDaXK2t_sA",
187
+ "albumArtist": "The Black Keys",
188
+ "canStream": false,
189
+ "embedUrl": "http://rd.io/e/QDaXK2t_sA",
190
+ "type": "t",
191
+ "price": "1.29",
192
+ "trackNum": 7,
193
+ "albumArtistKey": "r140592",
194
+ "key": "t2629858",
195
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
196
+ "canSample": true,
197
+ "name": "The Only One",
198
+ "isExplicit": false,
199
+ "artist": "The Black Keys",
200
+ "url": "/artist/The_Black_Keys/album/Brothers/track/The_Only_One/",
201
+ "albumKey": "a216556",
202
+ "artistKey": "r140592",
203
+ "canDownload": true,
204
+ "length": 1,
205
+ "canTether": false
206
+ },
207
+ {
208
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
209
+ "canDownloadAlbumOnly": true,
210
+ "artistUrl": "/artist/The_Black_Keys/",
211
+ "duration": 204,
212
+ "album": "Brothers",
213
+ "isClean": false,
214
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
215
+ "shortUrl": "http://rd.io/x/QDaXK2t_tw",
216
+ "albumArtist": "The Black Keys",
217
+ "canStream": false,
218
+ "embedUrl": "http://rd.io/e/QDaXK2t_tw",
219
+ "type": "t",
220
+ "price": "1.29",
221
+ "trackNum": 8,
222
+ "albumArtistKey": "r140592",
223
+ "key": "t2629861",
224
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
225
+ "canSample": true,
226
+ "name": "Too Afraid To Love You",
227
+ "isExplicit": false,
228
+ "artist": "The Black Keys",
229
+ "url": "/artist/The_Black_Keys/album/Brothers/track/Too_Afraid_To_Love_You/",
230
+ "albumKey": "a216556",
231
+ "artistKey": "r140592",
232
+ "canDownload": true,
233
+ "length": 1,
234
+ "canTether": false
235
+ },
236
+ {
237
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
238
+ "canDownloadAlbumOnly": true,
239
+ "artistUrl": "/artist/The_Black_Keys/",
240
+ "duration": 269,
241
+ "album": "Brothers",
242
+ "isClean": false,
243
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
244
+ "shortUrl": "http://rd.io/x/QDaXK2t_tQ",
245
+ "albumArtist": "The Black Keys",
246
+ "canStream": false,
247
+ "embedUrl": "http://rd.io/e/QDaXK2t_tQ",
248
+ "type": "t",
249
+ "price": "1.29",
250
+ "trackNum": 9,
251
+ "albumArtistKey": "r140592",
252
+ "key": "t2629863",
253
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
254
+ "canSample": true,
255
+ "name": "Ten Cent Pistol",
256
+ "isExplicit": false,
257
+ "artist": "The Black Keys",
258
+ "url": "/artist/The_Black_Keys/album/Brothers/track/Ten_Cent_Pistol/",
259
+ "albumKey": "a216556",
260
+ "artistKey": "r140592",
261
+ "canDownload": true,
262
+ "length": 1,
263
+ "canTether": false
264
+ },
265
+ {
266
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
267
+ "canDownloadAlbumOnly": true,
268
+ "artistUrl": "/artist/The_Black_Keys/",
269
+ "duration": 224,
270
+ "album": "Brothers",
271
+ "isClean": false,
272
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
273
+ "shortUrl": "http://rd.io/x/QDaXK2t_uw",
274
+ "albumArtist": "The Black Keys",
275
+ "canStream": false,
276
+ "embedUrl": "http://rd.io/e/QDaXK2t_uw",
277
+ "type": "t",
278
+ "price": "1.29",
279
+ "trackNum": 10,
280
+ "albumArtistKey": "r140592",
281
+ "key": "t2629865",
282
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
283
+ "canSample": true,
284
+ "name": "Sinister Kid",
285
+ "isExplicit": false,
286
+ "artist": "The Black Keys",
287
+ "url": "/artist/The_Black_Keys/album/Brothers/track/Sinister_Kid/",
288
+ "albumKey": "a216556",
289
+ "artistKey": "r140592",
290
+ "canDownload": true,
291
+ "length": 1,
292
+ "canTether": false
293
+ },
294
+ {
295
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
296
+ "canDownloadAlbumOnly": true,
297
+ "artistUrl": "/artist/The_Black_Keys/",
298
+ "duration": 216,
299
+ "album": "Brothers",
300
+ "isClean": false,
301
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
302
+ "shortUrl": "http://rd.io/x/QDaXK2t_vg",
303
+ "albumArtist": "The Black Keys",
304
+ "canStream": false,
305
+ "embedUrl": "http://rd.io/e/QDaXK2t_vg",
306
+ "type": "t",
307
+ "price": "1.29",
308
+ "trackNum": 11,
309
+ "albumArtistKey": "r140592",
310
+ "key": "t2629868",
311
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
312
+ "canSample": true,
313
+ "name": "The Go Getter",
314
+ "isExplicit": false,
315
+ "artist": "The Black Keys",
316
+ "url": "/artist/The_Black_Keys/album/Brothers/track/The_Go_Getter/",
317
+ "albumKey": "a216556",
318
+ "artistKey": "r140592",
319
+ "canDownload": true,
320
+ "length": 1,
321
+ "canTether": false
322
+ },
323
+ {
324
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
325
+ "canDownloadAlbumOnly": true,
326
+ "artistUrl": "/artist/The_Black_Keys/",
327
+ "duration": 229,
328
+ "album": "Brothers",
329
+ "isClean": false,
330
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
331
+ "shortUrl": "http://rd.io/x/QDaXK2t_vQ",
332
+ "albumArtist": "The Black Keys",
333
+ "canStream": false,
334
+ "embedUrl": "http://rd.io/e/QDaXK2t_vQ",
335
+ "type": "t",
336
+ "price": "1.29",
337
+ "trackNum": 12,
338
+ "albumArtistKey": "r140592",
339
+ "key": "t2629871",
340
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
341
+ "canSample": true,
342
+ "name": "I'm Not The One",
343
+ "isExplicit": false,
344
+ "artist": "The Black Keys",
345
+ "url": "/artist/The_Black_Keys/album/Brothers/track/I%27m_Not_The_One/",
346
+ "albumKey": "a216556",
347
+ "artistKey": "r140592",
348
+ "canDownload": true,
349
+ "length": 1,
350
+ "canTether": false
351
+ },
352
+ {
353
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
354
+ "canDownloadAlbumOnly": true,
355
+ "artistUrl": "/artist/The_Black_Keys/",
356
+ "duration": 239,
357
+ "album": "Brothers",
358
+ "isClean": false,
359
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
360
+ "shortUrl": "http://rd.io/x/QDaXK2t_ow",
361
+ "albumArtist": "The Black Keys",
362
+ "canStream": false,
363
+ "embedUrl": "http://rd.io/e/QDaXK2t_ow",
364
+ "type": "t",
365
+ "price": "1.29",
366
+ "trackNum": 13,
367
+ "albumArtistKey": "r140592",
368
+ "key": "t2629873",
369
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
370
+ "canSample": true,
371
+ "name": "Unknown Brother",
372
+ "isExplicit": false,
373
+ "artist": "The Black Keys",
374
+ "url": "/artist/The_Black_Keys/album/Brothers/track/Unknown_Brother/",
375
+ "albumKey": "a216556",
376
+ "artistKey": "r140592",
377
+ "canDownload": true,
378
+ "length": 1,
379
+ "canTether": false
380
+ },
381
+ {
382
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
383
+ "canDownloadAlbumOnly": true,
384
+ "artistUrl": "/artist/The_Black_Keys/",
385
+ "duration": 218,
386
+ "album": "Brothers",
387
+ "isClean": false,
388
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
389
+ "shortUrl": "http://rd.io/x/QDaXK2t_pg",
390
+ "albumArtist": "The Black Keys",
391
+ "canStream": false,
392
+ "embedUrl": "http://rd.io/e/QDaXK2t_pg",
393
+ "type": "t",
394
+ "price": "1.29",
395
+ "trackNum": 14,
396
+ "albumArtistKey": "r140592",
397
+ "key": "t2629876",
398
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
399
+ "canSample": true,
400
+ "name": "Never Gonna Give You Up",
401
+ "isExplicit": false,
402
+ "artist": "The Black Keys",
403
+ "url": "/artist/The_Black_Keys/album/Brothers/track/Never_Gonna_Give_You_Up/",
404
+ "albumKey": "a216556",
405
+ "artistKey": "r140592",
406
+ "canDownload": true,
407
+ "length": 1,
408
+ "canTether": false
409
+ },
410
+ {
411
+ "baseIcon": "album/c/e/d/0000000000034dec/square-200.jpg",
412
+ "canDownloadAlbumOnly": true,
413
+ "artistUrl": "/artist/The_Black_Keys/",
414
+ "duration": 311,
415
+ "album": "Brothers",
416
+ "isClean": false,
417
+ "albumUrl": "/artist/The_Black_Keys/album/Brothers/",
418
+ "shortUrl": "http://rd.io/x/QDaXK2t_pA",
419
+ "albumArtist": "The Black Keys",
420
+ "canStream": false,
421
+ "embedUrl": "http://rd.io/e/QDaXK2t_pA",
422
+ "type": "t",
423
+ "price": "1.29",
424
+ "trackNum": 15,
425
+ "albumArtistKey": "r140592",
426
+ "key": "t2629878",
427
+ "icon": "http://media.rd.io/album/c/e/d/0000000000034dec/square-200.jpg",
428
+ "canSample": true,
429
+ "name": "These Days",
430
+ "isExplicit": false,
431
+ "artist": "The Black Keys",
432
+ "url": "/artist/The_Black_Keys/album/Brothers/track/These_Days/",
433
+ "albumKey": "a216556",
434
+ "artistKey": "r140592",
435
+ "canDownload": true,
436
+ "length": 1,
437
+ "canTether": false
438
+ }
439
+ ]
440
+ }