WebService::Audioscrobbler::Artist(3)

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

SYNOPSIS
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.

FIELDS

  "name"
The name of a given artist as provided when constructing the object.

  "mbid"
MusicBrainz ID as provided by the Audioscrobbler database.

  "picture_url"
URI object pointing to the location of the artist's picture, if available.

  "streamable"
Flag indicating whether the artist has streamable content available.

METHODS

  "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.

  "tracks"
Retrieves 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.

  "tags"
Retrieves 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_path"
Returns the URL from which other URLs used for fetching artist info will be derived from.

AUTHOR
Nilson Santos Figueiredo Junior, "<nilsonsfj at cpan.org>"

COPYRIGHT & LICENSE
Copyright 2006-2007 Nilson Santos Figueiredo Junior, all rights reserved.

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