Some ultra minimal docs
authordiegok <diego@freekeylabs.com>
Tue, 25 Dec 2012 22:41:31 +0000 (23:41 +0100)
committerdiegok <diego@freekeylabs.com>
Tue, 25 Dec 2012 22:41:31 +0000 (23:41 +0100)
dist.ini
lib/WWW/EZTV.pm

index d608452..7ea623f 100644 (file)
--- a/dist.ini
+++ b/dist.ini
@@ -1,4 +1,4 @@
-name    = WWW::EZTV
+name    = WWW-EZTV
 author  = Diego Kuperman <diego@freekeylabs.com>
 license = Perl_5
 copyright_holder = Diego Kuperman
index 67debca..98ed361 100644 (file)
@@ -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<Mojo::Collection> of L<WWW::EZTV::Show> objects.
+=cut
+
+=attr has_shows
+How many shows exists.
+=cut
+
+=method find_show
+Find first L<WWW::EZTV::Show> object matching the given criteria. 
+This method accept an anon function.
+=cut
+
 1;