rdio 0.0.98 → 0.0.99

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 (4) hide show
  1. data/README +5 -6
  2. data/lib/rdio/base.rb +8 -0
  3. data/lib/rdio/types.rb +7 -0
  4. metadata +4 -4
data/README CHANGED
@@ -35,9 +35,7 @@ variables to the appropriate values:
35
35
  RDIO_KEY
36
36
  RDIO_SECRET
37
37
 
38
- There is a sample .rc file in dot-rdio.
39
-
40
- You must also serialize an authorized access token to the file
38
+ There is a sample .rc file in dot-rdio. You must also serialize an authorized access token to the file
41
39
  .rdio_access_token. This can be done with:
42
40
 
43
41
  make .rdio_access_token
@@ -50,6 +48,7 @@ There is a sample in dot-rdio_access_token.
50
48
 
51
49
  * CONTRIBUTORS
52
50
 
53
- Thanks for contributions to
54
- - judofyr (Magnus Holm)
55
- - rfletcher (Rick Fletcher)
51
+ Thanks for the pull requests that have been merged to the following:
52
+
53
+ - Scott Hyndman ( https://github.com/shyndman )
54
+ - Rick Fletcher ( https://github.com/rfletcher )
data/lib/rdio/base.rb CHANGED
@@ -309,7 +309,15 @@ module Rdio
309
309
  if Rdio::log_posts
310
310
  Rdio::log "Post to url=#{url} method=#{method} args=#{args}"
311
311
  end
312
+ #
313
+ # For backwards compatibility the response may have a 'body'
314
+ # attribute or a tuple could be returned. Handle both cases.
315
+ #
312
316
  resp,data = access_token(requires_auth).post url,new_args
317
+ begin
318
+ return resp.body
319
+ rescue
320
+ end
313
321
  return data
314
322
  end
315
323
 
data/lib/rdio/types.rb CHANGED
@@ -338,6 +338,13 @@ module Rdio
338
338
  api.removeFromPlaylist self,index,count,tracks
339
339
  end
340
340
 
341
+ # Returns an array of tracks
342
+ def tracks
343
+ ids = track_keys
344
+ return [] if not ids
345
+ return ids.map {|id| Track.get id}
346
+ end
347
+
341
348
  # Returns an array of Playlist for the query and other params
342
349
  def self.search(query,never_or=nil,extras=nil,start=nil,count=nil)
343
350
  extras = Rdio::add_to_array extras,'playlists'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdio
3
3
  version: !ruby/object:Gem::Version
4
- hash: 219
4
+ hash: 217
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 98
10
- version: 0.0.98
9
+ - 99
10
+ version: 0.0.99
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeffrey Palm
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-02 00:00:00 Z
18
+ date: 2012-05-07 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: oauth