NAME

Net::iTMS - Interface to the information within the iTunes Music Store (iTMS)

SYNOPSIS

my $iTMS = Net::iTMS->new;

my $artist = $iTMS->get_artist(2893902);
print "Artist: ", $artist->name, "\n";

for my $album ($artist->discography) {
    print $album->title, "\n";

    for my $track ($album->tracks) {
        print "\t ", $track->number, ": ", $track->title, "\n";
    }
}

DESCRIPTION

Net::iTMS is the main class (that is, the one you should be using) for interacting with Apple's iTunes Music Store (http://apple.com/itunes/store/).

Currently, it provides means to access individual artist, album, and song information in the iTMS.

Methods

All methods return undef on error and (should) set an error message, which is available through the error method.

new(debug => 1, ...)

Takes an argument list of optional key = value> pairs. The options available are:

tmpdir => '/some/path'

Used to specify the path to the directory where temporary files should be created. Defaults to File::Temp's default.

debug => 0 or 1

If set to a true value, debug messages to be printed to STDERR.

show_xml => 0 or 1

If set to a true value, Net::iTMS::Request will print to STDERR the XML fetched during each request. The debug option must also be set to true for the XML to print.

Returns a blessed hashref (object) for Net::iTMS.

get_artist($artistId)

Takes an artistId and returns a Net::iTMS::Artist object.

get_genre($genreId)

Takes a genreId and returns a Net::iTMS::Genre object.

get_album($albumId)

Takes an albumId and returns a Net::iTMS::Album object.

get_song($songId)

Takes a songId and returns a Net::iTMS::Song object.

search_for($query)

If $query is a hashref, this method executes an advanced search using the hashref and returns a Net::iTMS::Search::Advanced object.

Otherwise, this method assumes $query to be a string and executes a simple search using the string and returns a Net::iTMS::Search object.

TODO

Net::iTMS::Artist
    * biography
    * influencers

Net::iTMS::Genre
    * browse, etc

Net::iTMS::Album
    * browseAlbum URL... see what information
    
Net::iTMS::Song
    * songMetaData... how to use this?  keep getting server errors

Programmatic tests, instead of hand testing by me.

Better caching (more selective updates)

Redo SYNOPSISes

BUGS

None known at the current time, but there are bound to be some.

Please report all bugs via RT at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-iTMS.

LICENSE

Copyright 2004, Thomas R. Sibley.

You may use, modify, and distribute this package under the same terms as Perl itself.

AUTHOR

Thomas R. Sibley, http://zulutango.org:82/