WWW::TinySong - Get free music links using TinySong
use WWW::TinySong; my $ts = WWW::TinySong->new; $ts->timeout(10); $ts->env_proxy; for($ts->song_search("Never Gonna Give You Up")) { printf("%s", $_->{song}); printf(" by %s", $_->{artist}) if $_->{artist}; printf(" on %s", $_->{album}) if $_->{album}; printf(" <%s>\n", $_->{url}); }
TinySong is a web app that can be queried for a song and returns a tiny URL, allowing you to listen to the song for free online and share it with friends. WWW::TinySong is a Perl interface to this service, allowing you to programmatically search its underlying database.
WWW::TinySong subclasses LWP::UserAgent, so you can use the same constructors. If you're lazy, just play with the example given in the SYNOPSIS: that should be sufficient to get started with this module.
WWW::TinySong implements one more method in addition to the ones supported by LWP::UserAgent.
Searches the TinySong database for QUERY_STRING, giving up to LIMIT results. LIMIT defaults to 10 if unspecified. Method returns an array or arrayref, depending on context.
http://tinysong.com/, LWP::UserAgent
Please report them.
Miorel-Lucian Palii, <mlpalii@gmail.com>
Copyright (C) 2009 by Miorel-Lucian Palii
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install WWW::TinySong, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::TinySong
CPAN shell
perl -MCPAN -e shell install WWW::TinySong
For more information on module installation, please visit the detailed CPAN module installation guide.