Class: MTV::Music::Artist
- Defined in:
- lib/mtv-music/base.rb,
lib/mtv-music/artist.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
api_path, attribute, attributes, fetch_and_parse, #initialize, #initialize_with_polymorphism, name_with_demodulization, search
Constructor Details
This class inherits a constructor from MTV::Music::Base
Instance Method Details
#related ⇒ Object
12 13 14 15 |
# File 'lib/mtv-music/artist.rb', line 12 def xml = Artist.fetch_and_parse(self.class.api_path(:related, self.id)) return xml.search("entry/id").collect{|elem| Artist.new(Artist.fetch_and_parse(elem.inner_text))} end |
#videos ⇒ Object
7 8 9 10 |
# File 'lib/mtv-music/artist.rb', line 7 def videos xml = Video.fetch_and_parse(self.class.api_path(:videos, self.id)) return xml.search("entry/id").collect{|elem| Video.new(Video.fetch_and_parse(elem.inner_text))} end |