Class: MusixMatch::API::Finder

Inherits:
Base
  • Object
show all
Defined in:
lib/musix_match/api/finder.rb

Constant Summary

Constants inherited from Base

Base::API_URL

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#api_key, api_key, api_key=, get, #get, perform_get_request, url_for, url_path_for

Class Method Details

.find_lyrics(track_id) ⇒ Object



14
15
16
# File 'lib/musix_match/api/finder.rb', line 14

def self.find_lyrics(track_id)
  Finder.new.find_lyrics(track_id)
end

.find_track(track_id) ⇒ Object



18
19
20
# File 'lib/musix_match/api/finder.rb', line 18

def self.find_track(track_id)
  Finder.new.find_track(track_id)
end

Instance Method Details

#find_lyrics(track_id) ⇒ Object



4
5
6
7
# File 'lib/musix_match/api/finder.rb', line 4

def find_lyrics(track_id)
  response = get('track.lyrics.get', {:track_id => track_id})
  LyricsFindResult.new(response)
end

#find_track(track_id) ⇒ Object



9
10
11
12
# File 'lib/musix_match/api/finder.rb', line 9

def find_track(track_id)
  response = get('track.get', {:track_id => track_id})        
  TrackFindResult.new(response)
end