NAME
WWW::Discogs
DESCRIPTION
Interface with discogs.com api
SYNOPSIS use WWW:Discogs;
my $client = WWW::Discogs->new(apikey => 1234567);
# Print all artist images from a search
#
my $results = $client->search("Ween");
for my $result (@$results) {
if ($result->{type} eq 'artist') {
my $artist = $client->artist( $result->{title} );
print "$_\n" for @{ $artist->images };
}
}
# Print all the album covers for an artist
#
my $artist = $client->artist("Ween");
for my $releaseid (@{ $artist->releases }) {
my $release = $client->release($releaseid);
print "$_\n" for @{ $release->images };
}
METHODS
new( %params )
Create a new instance. Takes a hash which must contain an 'apikey' item. You may also provide an 'apiurl' item to change the url that is queried (default is www.discogs.com).
search( $searchstring )
Returns a Discogs::Search object.
release( $release_id )
Returns a Discogs::Release object. You can get a $release_id from a search, artist, or label.
artist( $artist_name )
Returns a Discogs::Artist object. You can get the exact name of an artist from a search result's title.
label( $label_name )
Returns a Discogs::Label object. You can get the exact name of a label from a search result's title.
AUTHOR
Lee Aylward <lee@laylward.com>
LICENSE
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.