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

This module implements an object oriented abstraction of an artist within the Audioscrobbler database.
use WebService::Audioscrobbler;
my $ws = WebService::Audioscrobbler->new;
# get an object for artist named 'foo'
my $artist = $ws->artist('foo');
# fetch artists similar to 'foo'
my @similar = $artist->similar_artists;
print "Artists similar to: " . $artist->name . "\n";
# prints each one of their names
for my $similar (@similar) {
print $similar->name . "\n";
}
# retrieves tracks from 'foo'
my @tracks = $artist->tracks;
# retrieves tags associated with 'foo'
my @tags = $artist->tags;
This module inherits from WebService::Audioscrobbler::Base.

nameThe name of a given artist as provided when constructing the object.
mbidMusicBrainz ID as provided by the Audioscrobbler database.
picture_urlURI object pointing to the location of the artist's picture, if available.
streamableFlag indicating whether the artist has streamable content available.

new($artist_name, $data_fetcher)new(\%fields)Creates a new object using either the given $artist_name or the \%fields hashref. The data fetcher object is a mandatory parameter and must be provided either as the second parameter or inside the \%fields hashref.
similar_artists([$filter])related_artists([$filter])artists([$filter])Retrieves similar artists from the Audioscrobbler database. $filter can be used to limit artist with a low similarity index (ie. artists which have a similarity index lower than $filter won't be returned).
Returns either a list of artists or a reference to an array of artists when called in list context or scalar context, respectively. The artists are returned as WebService::Audioscrobbler::SimilarArtist objects by default.
tracksRetrieves the artist's top tracks as available on Audioscrobbler's database.
Returns either a list of tracks or a reference to an array of tracks when called in list context or scalar context, respectively. The tracks are returned as WebService::Audioscrobbler::Track objects by default.
tagsRetrieves the artist's top tags as available on Audioscrobbler's database.
Returns either a list of tags or a reference to an array of tags when called in list context or scalar context, respectively. The tags are returned as WebService::Audioscrobbler::Tag objects by default.
load_fields(\%data)Loads artist fields from the hashref \%data.
resource_pathReturns the URL from which other URLs used for fetching artist info will be derived from.

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

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.