Module: MusixMatch

Defined in:
lib/musix_match.rb,
lib/musix_match/api/base.rb,
lib/musix_match/api/finder.rb,
lib/musix_match/api/search.rb,
lib/musix_match/api/feedback.rb,
lib/musix_match/models/model.rb,
lib/musix_match/models/track.rb,
lib/musix_match/models/lyrics.rb,
lib/musix_match/instant_lyrics.rb,
lib/musix_match/api/track_chart.rb,
lib/musix_match/feedback_result.rb,
lib/musix_match/track_find_result.rb,
lib/musix_match/lyrics_find_result.rb,
lib/musix_match/track_search_result.rb,
lib/musix_match/lyrics_search_result.rb

Defined Under Namespace

Modules: API, InstantLyrics, Models Classes: FeedbackResult, LyricsFindResult, LyricsSearchResult, TrackFindResult, TrackSearchResult

Class Method Summary collapse

Class Method Details

.get_lyrics(*args) ⇒ Object



31
32
33
# File 'lib/musix_match.rb', line 31

def self.get_lyrics(*args)
  Models::Lyrics.get(*args)
end

.get_track(*args) ⇒ Object



39
40
41
# File 'lib/musix_match.rb', line 39

def self.get_track(*args)
  Models::Track.get(*args)
end

.get_track_chart(*args) ⇒ Object



47
48
49
# File 'lib/musix_match.rb', line 47

def self.get_track_chart(*args)
  Models::Track.get_chart(*args)
end

.i_m_feeling_lucky(q) ⇒ Object



51
52
53
54
# File 'lib/musix_match.rb', line 51

def self.i_m_feeling_lucky(q)
  result = MusixMatch::InstantLyrics::Search.search(q)
  result.found? ? result.lyrics.lyrics_body : 'Lyrics not found'
end

.post_feedback(track_id, lyrics_id, feedback_type) ⇒ Object



56
57
58
# File 'lib/musix_match.rb', line 56

def self.post_feedback(track_id, lyrics_id, feedback_type)
  API::Feedback.post_feedback(track_id, lyrics_id, feedback_type)
end

.search_lyrics(*args) ⇒ Object



35
36
37
# File 'lib/musix_match.rb', line 35

def self.search_lyrics(*args)
  Models::Lyrics.search(*args)
end

.search_track(*args) ⇒ Object



43
44
45
# File 'lib/musix_match.rb', line 43

def self.search_track(*args)
  Models::Track.search(*args)
end