Created
April 8, 2012 13:44
-
-
Save larsen/2337396 to your computer and use it in GitHub Desktop.
a snippet from Net::MusixMatch implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sub get_track { | |
| my $self = shift; | |
| my %params = @_; | |
| return unless $params{ track_id } | |
| || $params{ track_mbid } | |
| || $params{ track_echonest_id }; | |
| my $result = $self->_call_api( 'track.get', %params ); | |
| my $track = Net::MusixMatch::Track->new( | |
| $result->{ message }->{ body }->{ track } | |
| ); | |
| return $track; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment