Class: ItunesApi::Music::Artist
- Inherits:
-
Object
- Object
- ItunesApi::Music::Artist
- Defined in:
- lib/itunes_api/music/artist.rb
Overview
Artist or Band from the Apple catalog
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.find_by_apple_id(apple_id, store) ⇒ Object
16 17 18 19 20 |
# File 'lib/itunes_api/music/artist.rb', line 16 def find_by_apple_id(apple_id, store) result = artists(apple_id, store).first new(*result.attributes) if result end |
Instance Method Details
#albums ⇒ Object
29 30 31 |
# File 'lib/itunes_api/music/artist.rb', line 29 def albums @albums ||= Album.find_by_apple_id(apple_id, store) end |
#to_hash ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/itunes_api/music/artist.rb', line 33 def to_hash { amg_id: amg_id, apple_id: apple_id, genre: genre, link: link, name: name, store: store } end |