Thomas Sibley > Net-iTMS-0.15 > Net::iTMS::Album

Download:
Net-iTMS-0.15.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.15   Source  

NAME ^

Net::iTMS::Album - Represents an album in the iTunes Music Store

SYNOPSIS ^

    use Net::iTMS::Album;

    my $album = Net::iTMS::Album->new($iTMS, $id);
    
    print "Album: ", $album->title, "\n";

    # $track will be a Net::iTMS::Song object
    for my $track ($album->tracks) {    # also $album->songs
        print "\t ", $track->number, ": ", $track->title, "\n";
    }

DESCRIPTION ^

Net::iTMS::Album represents an album in the iTMS and encapsulates the associated data. If a piece of information hasn't been fetched from the iTMS, it will transparently fetch and store it for later use before returning.

If any method, excepting id, record_label, and thumb, is called, the information for the others will be fetched in the same request. This means, for these methods, the first call to one will have a time hit for the HTTP request, but subsequent calls won't.

Methods

new($itms, $albumId)

The first argument must be an instance of Net::iTMS, the second an iTMS album ID.

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

id

Returns the ID of the album (albumId).

title
name

Returns the title of the album.

artist

Returns a Net::iTMS::Artist object for the album's artist.

genre

Returns a Net::iTMS::Genre object for the album's genre.

cover

Returns a hashref with the keys url, width, and height which are for the album's cover.

thumb

Returns a hashref with the keys url, width, and height which are for the thumbnail of the album's cover (if available).

tracks
songs

Returns an array or arrayref (depending on context) of Net::iTMS::Song objects representing the tracklist of the album (in order of track number).

total_songs

Returns the total number of songs on the album available from the iTMS.

released

Returns the release date of the album (if available).

copyright

Returns the copyright information for the album (if available).

path

Returns an arrayref of hashrefs representing the album's "path" in the iTMS. The hashrefs contain the name of the node in the path and the iTMS URL of that node.

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/

SEE ALSO ^

Net::iTMS, Net::iTMS::Song, Net::iTMS::Artist, Net::iTMS::Genre

syntax highlighting: