Class: Lastrb::Artist
Instance Attribute Summary collapse
-
#artist ⇒ Object
Returns the value of attribute artist.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #get_info(query = {}, options = {}) ⇒ Object
-
#initialize(name) ⇒ Artist
constructor
A new instance of Artist.
- #search(query = {}, options = {}) ⇒ Object
Constructor Details
#initialize(name) ⇒ Artist
Returns a new instance of Artist.
7 8 9 10 |
# File 'lib/lastrb/artist.rb', line 7 def initialize(name) self.artist = name super end |
Instance Attribute Details
#artist ⇒ Object
Returns the value of attribute artist.
3 4 5 |
# File 'lib/lastrb/artist.rb', line 3 def artist @artist end |
#username ⇒ Object
Returns the value of attribute username.
4 5 6 |
# File 'lib/lastrb/artist.rb', line 4 def username @username end |
Instance Method Details
#get_info(query = {}, options = {}) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/lastrb/artist.rb', line 12 def get_info(query = {}, ={}) query.merge!({ :method => 'artist.getinfo', :artist => self.artist }) .merge!({ :query => query}) self.class.get('/', ) end |
#search(query = {}, options = {}) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/lastrb/artist.rb', line 19 def search(query = {}, ={}) query.merge!({ :method => 'artist.search', :artist => self.artist }) .merge!({ :query => query}) self.class.get('/', ) end |