X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fwww-eztv.git;a=blobdiff_plain;f=lib%2FWWW%2FEZTV.pm;fp=lib%2FWWW%2FEZTV.pm;h=98ed361af9d26845ed1fe9dcd37eca1ed9885499;hp=67debcaded45fa9a96d20fe2bb67ca02692d3a9a;hb=377beead8952c1e815cbc9f47ba5d0bf09c9693c;hpb=70a4c8fadae7e062e72a9ed4c19c3a2f6dac4cc8 diff --git a/lib/WWW/EZTV.pm b/lib/WWW/EZTV.pm index 67debca..98ed361 100644 --- a/lib/WWW/EZTV.pm +++ b/lib/WWW/EZTV.pm @@ -3,8 +3,11 @@ use Moose; with 'WWW::EZTV::UA'; use WWW::EZTV::Show; +# ABSTRACT: EZTV scrapper + has url => ( is => 'ro', lazy => 1, default => sub { Mojo::URL->new('http://eztv.it/') } ); has url_shows => ( is => 'ro', lazy => 1, default => sub { shift->url->clone->path('/showlist/') } ); + has shows => is => 'ro', lazy => 1, @@ -29,4 +32,41 @@ sub build_shows { }); } +=head1 SYNOPSIS + +First create a WWW::EZTV object to navigate. + + use WWW::EZTV; + + my $eztv = WWW::EZTV->new; + + my $show = $eztv->find_show(sub{ $_->name =~ /Walking dead/i }); + + my $episode = $show->find_episode(sub{ + $_->season == 3 && + $_->number == 8 && + $_->quality eq 'standard' + }); + +=attr url +EZTV URL. +=cut + +=attr url_shows +EZTV shows URL. +=cut + +=attr shows +L of L objects. +=cut + +=attr has_shows +How many shows exists. +=cut + +=method find_show +Find first L object matching the given criteria. +This method accept an anon function. +=cut + 1;