Class: Muzooka
- Inherits:
-
Object
- Object
- Muzooka
- Defined in:
- lib/muzooka.rb
Constant Summary collapse
- URL =
'https://devapi.muzooka.com/v2/artists'.freeze
- BIO =
'bio'.freeze
- IMAGE =
'image'.freeze
- SOCIAL_LINKS =
'socialLinks'.freeze
- DATA =
'data'.freeze
Instance Method Summary collapse
- #bio ⇒ Object
- #images ⇒ Object
-
#initialize(muzooka_api_key:, artist_name:) ⇒ Muzooka
constructor
A new instance of Muzooka.
- #social_links ⇒ Object
Constructor Details
#initialize(muzooka_api_key:, artist_name:) ⇒ Muzooka
Returns a new instance of Muzooka.
12 13 14 15 |
# File 'lib/muzooka.rb', line 12 def initialize(muzooka_api_key:, artist_name:) @artist_name = artist_name.strip @muzooka_api_key = muzooka_api_key end |
Instance Method Details
#bio ⇒ Object
17 18 19 |
# File 'lib/muzooka.rb', line 17 def bio response_body&.fetch(BIO, nil) end |
#images ⇒ Object
21 22 23 |
# File 'lib/muzooka.rb', line 21 def images response_body&.fetch(IMAGE, nil) end |
#social_links ⇒ Object
25 26 27 |
# File 'lib/muzooka.rb', line 25 def response_body&.fetch(SOCIAL_LINKS, nil) end |