= Musix Match
_ _
| | _ _ | |
| | | | | | | |
| | _ _ | | | | _ _ | |
| || || || | MusixMatch is a wrapper for the musixmatch.com API's. | || || || |
| || || || | With this library you can search for lyrics and tracks | || || || |
| | || || | using the http://musixmatch.com service. | | || || |
| | | |
| | | |
\ / \ /
---------- ----------
== Installation
gem install musix_match
== Usage
require 'musix_match'
MusixMatch::API::Base.api_key = 'YOUR_API_KEY'
=== Track search
response = MusixMatch.search_track(:q_artist => 'Pantera') if response.status_code == 200 response.each do |track| puts "#{track.track_id}: #{track.track_name} (#{track.artist_name})" end end
Available options for the search_track methods are:
=== Getting lyrics
response = MusixMatch.get_lyrics(track_id) if response.status_code == 200 && lyrics = response.lyrics puts lyrics.lyrics_body end
=== Getting track
response = MusixMatch.get_track(track_id) if response.status_code == 200 && track = response.track puts "#{track.track_name} (#{track.artist_name})" puts "Lyrics id: #{track.lyrics_id}" end
=== Are you feeling lucky?
puts MusixMatch.i_m_feeling_lucky("Guns'n'Roses - Welcome to the jungle")
== Lyrics
The Lyrics object has the following attributes:
== Track
The track object has the following attributes:
== Sending Feedback
MusixMatch.post_feedback(track_id, lyrics_id, feedback_type)
Feedback type should be one of the following:
== Links
== Author
Andrea Franz - {http://gravityblast.com}[http://gravityblast.com]