lib/rockstar/user.rb in rockstar-0.6.2 vs lib/rockstar/user.rb in rockstar-0.6.3
- old
+ new
@@ -123,11 +123,17 @@
}
@avatar = @images["small"]
end
- def top_artists(force=false)
- get_instance("user.getTopArtists", :top_artists, :artist, {:user => @username, :period => @period}, force)
+ def top_artists(force=false, options = {} )
+ default_options = {
+ :period => self.period
+ }
+ options = default_options.merge(options)
+ options[:user] = @username
+
+ get_instance("user.getTopArtists", :top_artists, :artist, options, force)
end
def top_albums(force=false)
get_instance("user.getTopAlbums", :top_albums, :album, {:user => @username}, force)
end