lib/meta-spotify/artist.rb in meta-spotify-0.2.0 vs lib/meta-spotify/artist.rb in meta-spotify-0.3.0
- old
+ new
@@ -1,9 +1,11 @@
module MetaSpotify
class Artist < MetaSpotify::Base
- URI_REGEX = /^spotify:artist:[A-Za-z0-9]+$/
+ def self.uri_regex
+ /^spotify:artist:([A-Za-z0-9]+)$/
+ end
attr_reader :albums
def initialize(hash)
@name = hash['name']
@@ -16,7 +18,12 @@
else
@albums << Album.new(hash['albums']['album'])
end
end
end
+
+ def http_uri
+ "http://open.spotify.com/artist/#{spotify_id}"
+ end
+
end
end
\ No newline at end of file