NAME

WWW::TV::Series - Parse TV.com for TV Series information.

SYNOPSIS

use WWW::TV::Series qw();
my $series = WWW::TV::Series->new(name => 'Prison Break');

my @episodes = $series->episodes;
print $series->summary;

DESCRIPTION

The WWW::TV::Series module parses TV.com series information using LWP::UserAgent.

METHODS

new

The new() method is the constructor. It takes the id of the show if
you have previously looked that up, or the name of the show which
will be used to perform a search and the id will be taken from the
first result.

Optional parameters let you set the season number or LWP user agent.

    # default usage
    my $series = WWW::TV::Series->new(name => 'Prison Break');
    my $series = WWW::TV::Series->new(id => 31635);

    # change user-agent from the default of "libwww-perl/#.##"
    my $series = WWW::TV::Series->new(id => 31635, agent => 'WWW::TV');

It is recommended that you lookup the show first and use the ID,
otherwise you just don't know what will be returned.

The constructor also takes a single scalar as an argument and does
it's best to figure out what you want. But due to some shows being
all digits as a name (e.g. "24"), use of this is not recommended
(and in future may be deprecated).

summary

Returns a string containing basic information about this series.

genres

Returns a list of all the genres that TV.com have categorised this series as.

# in scalar context, returns a comma-delimited string
my $genres = $series->genres;

# in array context, returns an array
my @genres = $series->genres;

cast

Returns a list of the cast members. The order is the same as they
appear on TV.com, which is most likely nothing to go by, but
in most cases is the main cast order.

# in scalar context, returns a comma-delimited string
my $cast = $series->cast;

# in array context, returns an array
my @cast = $series->cast;

name

Returns a string containing the name of the series.

image

Returns the url of an image that can be used to identify this series.

episodes

Returns an array of L<WWW::TV::Episode> objects in order.

# All episodes
my @episodes = $series->episodes;

# Episodes for season 2 only
my @episodes = $series->episodes( season => 2 );

id

The ID of this series, according to TV.com

agent ($value)

Returns the current user agent setting, and sets to $value if provided.

site ($value)

Returns the current mirror site setting, and sets to $value if provided.

Default site is "www"; other options include: us, uk, au

url

Returns the url that was used to create this object.

episode_url ($season)

Returns the url that is used to get the episode listings for this
series.

$season is optional ; defaults to "all"

SEE ALSO

WWW::TV::Episode

KNOWN ISSUES

There isn't yet any caching support. I don't see a need for it, but if you feel the need to implement it then don't let me stop you.

There also isn't support for proxy servers yet. LWP should use it from your environment if you really need it, but who still uses them anyway? Isn't it all done transparently these days.

BUGS

Please report any bugs or feature requests through the web interface at http://rt.cpan.org/Dist/Display.html?Queue=WWW-TV.

AUTHORS

Danial Pearce cpan@tigris.id.au

Stephen Steneker stennie@cpan.org

LICENCE AND COPYRIGHT

Copyright (c) 2006-2008 Danial Pearce cpan@tigris.id.au. All rights reserved.

Some parts copyright 2007-2008 Stephen Steneker stennie@cpan.org.