Retrive episode links by type and some more docs
[cascardo/www-eztv.git] / lib / WWW / EZTV.pm
index 6166418..2bf91dc 100644 (file)
@@ -32,41 +32,68 @@ sub _build_shows {
     });
 }
 
-=head1 SYNOPSIS
+1;
 
-First create a WWW::EZTV object to navigate.
+=head1 SYNOPSIS
 
     use WWW::EZTV;
+    use v5.10;
 
     my $eztv = WWW::EZTV->new;
 
+    # Find one show
     my $show = $eztv->find_show(sub{ $_->name =~ /Walking dead/i });
 
+    # Find one episode
     my $episode = $show->find_episode(sub{ 
         $_->season == 3 && 
         $_->number == 8 && 
         $_->quality eq 'standard' 
     });
 
+    # Get first torrent url for this episode
+    say $episode->find_link(sub{ $_->type eq 'torrent' })->url;
+
 =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
+
+=head1 BUGS
+
+This is an early release, so probable there are plenty of bugs around.
+If you found one, please report it on RT or at the github repo:
+
+L<https://github.com/diegok/www-eztv>
+
+Pull requests are also very welcomed, but please include tests demostrating
+what you've fixed.
+
 =cut
 
-1;