The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::iTMS::Search - Represents a simple search of the iTunes Music Store

SYNOPSIS

    use Net::iTMS::Search;

    my $search = Net::iTMS::Search->new($iTMS, $query);
    
    for my $album ($search->albums) {
        print $album->title, " by ", $album->artist->name, "\n";
    }

DESCRIPTION

Net::iTMS::Search represents a search of the iTMS and encapsulates the associated data.

Methods

new($itms, $query)

The first argument must be an instance of Net::iTMS, the second a query string.

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

query

Returns the query string the search is for.

songs

Returns an array or arrayref (depending on context) of Net::iTMS::Song objects for the songs found.

albums

Returns an array or arrayref (depending on context) of Net::iTMS::Album objects for the albums found.

NB: Due to an apparent limitation of the simple search in the iTMS, the maximum number of albums returned will be four.

LICENSE

Copyright 2004, Thomas R. Sibley.

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License revision 2.0. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/2.0/ or send a letter to:

    Creative Commons
    559 Nathan Abbott Way
    Stanford, California 94305, USA.

AUTHOR

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

SEE ALSO

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