Class: Musixmatch
- Inherits:
-
Object
- Object
- Musixmatch
- Defined in:
- lib/musixmatch.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#url ⇒ Object
Returns the value of attribute url.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(api_key = ENV['MUSIXMATCH_API_KEY']) ⇒ Musixmatch
constructor
A new instance of Musixmatch.
Methods included from APIMethod
#album_get, #album_tracks_get, #artist_albums_get, #artist_get, #artist_related_get, #artist_search, #catalogue_dump_get, #chart_artists_get, #chart_tracks_get, #matcher_lyrics_get, #matcher_subtitle_get, #matcher_track_get, #music_genres_get, #track_get, #track_lyrics_get, #track_lyrics_translation_get, #track_richsync_get, #track_search, #track_snippet_get, #track_subtitle_get, #track_subtitle_translation_get, #tracking_url_get
Methods included from Request
Methods included from Version
Constructor Details
#initialize(api_key = ENV['MUSIXMATCH_API_KEY']) ⇒ Musixmatch
Returns a new instance of Musixmatch.
13 14 15 16 17 18 19 20 |
# File 'lib/musixmatch.rb', line 13 def initialize(api_key = ENV['MUSIXMATCH_API_KEY']) raise 'API key is required' unless api_key @version = Version.version @api_version = Version.api_version @api_key = api_key @url = Request.base_url end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
11 12 13 |
# File 'lib/musixmatch.rb', line 11 def api_key @api_key end |
#api_version ⇒ Object
Returns the value of attribute api_version.
11 12 13 |
# File 'lib/musixmatch.rb', line 11 def api_version @api_version end |
#url ⇒ Object
Returns the value of attribute url.
11 12 13 |
# File 'lib/musixmatch.rb', line 11 def url @url end |
#version ⇒ Object
Returns the value of attribute version.
11 12 13 |
# File 'lib/musixmatch.rb', line 11 def version @version end |