rdio 0.0.3 → 0.0.4

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 (3) hide show
  1. data/lib/rdio.rb +0 -5
  2. data/lib/rdio/types.rb +10 -0
  3. metadata +3 -3
data/lib/rdio.rb CHANGED
@@ -50,11 +50,6 @@ module Rdio
50
50
  @api = Api.new key,secret
51
51
  end
52
52
 
53
- # Resets -- mainly for oauth
54
- def self.reset
55
- @api = nil
56
- end
57
-
58
53
  # Returns the shared Rdio::Api instance. If it hasn't been set, we
59
54
  # try to construct it from thte environment
60
55
  def self.api
data/lib/rdio/types.rb CHANGED
@@ -31,6 +31,11 @@ module Rdio
31
31
  def tracks(appears_on=nil,start=nil,count=nil,extras=nil)
32
32
  api.getTracksForArtist self,appears_on,start,count,extras
33
33
  end
34
+
35
+ # Get all the albums by this artist
36
+ def albums(featuring=nil,extras=nil,start=nil,count=nil)
37
+ api.getAlbumsForArtist self,featuring,extras,start,count
38
+ end
34
39
 
35
40
  # Which tracks from the given artist are in the user's collection.
36
41
  def tracks_in_collection(user=nil,extras=nil)
@@ -306,6 +311,11 @@ module Rdio
306
311
  Rdio::api.findUserByVanityName name
307
312
  end
308
313
 
314
+ # Finds the user by email or vanity name
315
+ def self.find(s)
316
+ s =~ /@/ ? find_by_email(s) : find_by_vanity_name(s)
317
+ end
318
+
309
319
  # Fetch one or more objects from Rdio of type User.
310
320
  def self.all(keys)
311
321
  Rdio::api.get keys,User
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: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeffrey Palm