Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

WebService::Audioscrobbler
An object-oriented interface to the Audioscrobbler WebService API

WebService::Audioscrobbler - An object-oriented interface to the Audioscrobbler WebService API


NAME

WebService::Audioscrobbler - An object-oriented interface to the Audioscrobbler WebService API


SYNOPSIS

This module aims to be a full implementation of a an object-oriented interface to the Audioscrobbler WebService API (as available on http://www.audioscrobbler.net/data/webservices/). Since version 0.04, the module fully supports data caching and, thus, complies to the service's recommended usage guides.


    use WebService::Audioscrobbler;

    my $ws = WebService::Audioscrobbler->new;

    # get an object for artist named 'foo'

    my $artist  = $ws->artist('foo');

    # retrieves tracks from 'foo'

    my @tracks = $artist->tracks;

    # retrieves tags associated with 'foo'

    my @tags = $artist->tags;

    # fetch artists similar to 'foo'

    my @similar = $artist->similar_artists;

    # prints each one of their names

    for my $similar (@similar) {

        print $similar->name . "\n";

    }

    ...

    # get an object for tag 'bar'

    my $tag = $ws->tag('bar');

    # fetch tracks tagged with 'bar'

    my @bar_tracks = $tag->tracks;

    ...

    my $user = $ws->user('baz');

    my @baz_neighbours = $user->neighbours;

Audioscrobbler is a great service for tracking musical data of various sorts, and its integration with the LastFM service (http://www.last.fm) makes it work even better. Audioscrobbler provides data regarding similarity between artists, artists discography, tracks by musical genre (actually, by tags), top artists / tracks / albums / tags and how all of that related to your own musical taste.

Currently, only of subset of these data feeds are implemented, which can be viewed as the core part of the service: artists, tags, tracks and users. Since this module was developed as part of a automatic playlist building application (still in development) these functions were more than enough for its initial purposes but a (nearly) full WebServices API is planned.

In any case, code or documentation patches are welcome.


METHODS

new([$cache_root]

Creates a new WebService::Audioscrobbler object. This object can then be used to retrieve various bits of information from the Audioscrobbler database. If $cache_root is specified, Audioscrobbler data will be cached under this directory, otherwise it will use the Cache::FileCache manpage defaults.

artist($name)

Returns an the WebService::Audioscrobbler::Artist manpage object constructed using the given $name. Note that this call doesn't actually check if the artist exists since no remote calls are dispatched - the object is only constructed.

track($artist, $title)

Returns an the WebService::Audioscrobbler::Track manpage object constructed used the given $artist and $title. The $artist parameter can either be a the WebService::Audioscrobbler::Artist manpage object or a string (in this case, a the WebService::Audioscrobbler::Artist manpage will be created behind the scenes). Note that this call doesn't actually check if the track exists since no remote calls are dispatched - the object is only constructed.

tag($name)

Returns an the WebService::Audioscrobbler::Tag manpage object constructed using the given $name. Note that this call doesn't actually check if the tag exists since no remote calls are dispatched - the object is only constructed.

user($name)

Returns an the WebService::Audioscrobbler::User manpage object constructed using the given $name. Note that this call doesn't actually check if the user exists since no remote calls are dispatched - the object is only constructed.


AUTHOR

Nilson Santos Figueiredo Júnior, <nilsonsfj at cpan.org>


BUGS

Please report any bugs or feature requests to bug-webservice-audioscrobbler at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


SUPPORT

You can find documentation for this module with the perldoc command.


    perldoc WebService::Audioscrobbler

You can also look for information at:


COPYRIGHT & LICENSE

Copyright 2006-2007 Nilson Santos Figueiredo Júnior, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

NOTE: The datafeed from audioscrobbler.net is for non-commercial use only. Please see http://www.audioscrobbler.net/data/webservices/ for more licensing information.


SEE ALSO

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy