NAME
WWW::ICRT - ICRT agent
SYNOPSIS
my $icrt = new WWW::ICRT;
@log = $icrt->musiclog();
foreach (@log) {
print "$_->{time} => $_->{title} by $_->{artist}\n";
}
$icrt->request_song(
from => 'my.email@domain.org',
to => 'buzzzzzz',
subject => 'Song request',
text => $text,
);
$icrt->rate_current_song(
5
);
DESCRIPTION
This module is an agent for accessing information on ICRT (International Community Radio Taipei, http://www.icrt.com.tw ). You can use module to view the music log, request songs and rate them.
musiclog
It returns the music log up to now today.
See also http://www.icrt.com.tw/en/music_log.php
request_song
You can call this method to request songs from the DJs. It sends emails to the DJs.
You can write the email in place.
$icrt->request_song(
from => 'my@email.org',
to => 'buzzzzzz', # expands to buzzzzzz@icrt.com.tw
subject => 'Song request', # default subject, ignorable
text => <<'REQUEST',
Hi,
I wanna request blah blah song for blah blah man.
Thank you blah blah much.
REQUEST
);
Or, give song's name, artist's name, whom you are dedicating this song to, and a text will be automatically generated for you. The default template is embedded in the module's source, but you can override it in file $ENV{HOME}/.icrt. For the template thing, see also Text::MicroMason
$icrt->request_song(
from => 'my@email.org',
to => 'buzzzzzz',
subject => 'Song request',
my_name => 'my name',
song => 'Song Song Song',
artist => 'anonymous',
dedicated_to => 'the entire human race',
);
It will return 1 if the request is processed.
rate_current_song
You can call this to rate the current song on a scale from 1 to 10. And it returns the current average rating.
See also http://www.icrt.com.tw/en/rate_song.php
COPYRIGHT AND LICENSE
Copyright (C) 2004 by Yung-chung Lin (a.k.a. xern) <xern@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself