|
Audio::Scrobbler - Perl interface to audioscrobbler.com/last.fm |
Audio::Scrobbler - Perl interface to audioscrobbler.com/last.fm
use Audio::Scrobbler;
$scrob = new Audio::Scrobbler(cfg => { ... });
$scrob->handshake();
$scrob->submit(artist => "foo", album => "hello", track => "world",
length => 180);
The Audio::Scrobbler module provides a Perl interface to the track
submission API of Last.fm's AudioScrobbler -
http://www.audioscrobbler.com/. So far, only track submissions are
handled; the future plans include access to the various statistics.
The Audio::Scrobbler class defines the following methods:
Audio::Scrobbler object and initialize it with
the provided configuration parameters. The parameters themselves
are discussed in the description of the the handshake manpage and the submit manpage
methods below.
Audio::Scrobbler object.
This method requires that the following configuration parameters be set:
If the handshake is successful, the method returns a true value, and the the submit manpage method may be invoked. Otherwise, an appropriate error message may be retrieved via the the err manpage method.
If the fake configuration parameter is set, the the handshake manpage method does not actually perform the handshake with the AudioScrobbler API, just simulates a successful handshake and returns a true value.
If the verbose configuration parameter is set, the the handshake manpage method reports its progress with diagnostic messages to the standard output.
Also, the the submit manpage method requires that the following configuration
parameters be set for this Audio::Scrobbler object:
If the submission is successful, the method returns a true value. Otherwise, an appropriate error message may be retrieved via the the err manpage method.
If the fake configuration parameter is set, the the submit manpage method does not actually submit the track information to the AudioScrobbler API, just simulates a successful submission and returns a true value.
If the verbose configuration parameter is set, the the submit manpage method reports its progress with diagnostic messages to the standard output.
There are also several methods and functions for the module's internal use:
LWP::UserAgent object used by
the Audio::Scrobbler class for access to the AudioScrobbler API.
Obtained from http://glennf.com/writing/hexadecimal.url.encoding.html
Obtained from http://glennf.com/writing/hexadecimal.url.encoding.html
scrobbler-helper(1)
The home site of the Audio::Scrobbler module is
http://devel.ringlet.net/audio/Audio-Scrobbler/
Peter Pentchev, <roam@ringlet.net>
Copyright (C) 2005, 2006 by Peter Pentchev.
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.7 or, at your option, any later version of Perl 5 you may have available.
$Id: Scrobbler.pm 88 2006-01-02 09:16:32Z roam $
|
Audio::Scrobbler - Perl interface to audioscrobbler.com/last.fm |