NAME
WebService::TVDB - Interface to http://thetvdb.com/
VERSION
version 1.122800
SYNOPSIS
my $tvdb = WebService::TVDB->new(api_key => 'ABC123', language => 'English', max_retries => 10);
my $series_list = $tvdb->search('men behaving badly');
my $series = @{$series_list}[0];
# $series is a WebService::TVDB::Series
say $series->SeriesName;
say $series->overview;
# fetches full series data
$series->fetch();
say $series->Rating;
say $series->Status;
for my $episode (@{ $series->episodes }){
# $episode is a WebService::TVDB::Episode
say $episode->Overview;
say $episode->FirstAired;
}
for my $actor (@{ $series->actors }){
# $actor is a WebService::TVDB::Actor
say $actor->Name;
say $actor->Role;
}
for my $banner (@{ $series->banners }){
# $banner is a WebService::TVDB::Banner
say $banner->Rating;
say $banner->url;
}
DESCRIPTION
WebService::TVDB is an interface to http://thetvdb.com/.
METHODS
new
Creates a new WebService::TVDB object. Takes the following parameters:
- api_key
-
This is your API key. If not passed in here, we will look in ~/.tvdb. Otherwise we will die.
- language
-
The language you want tour results in. "See WebService::TVDB::Languages" for a list of languages. Defaults to English.
- max_retries
-
The amount of times we will try to get the series if our call to the URL failes. Defaults to 10.
search( $term )
Searches the TVDB and returns a list of WebService::TVDB::Series as the result.
API KEY
To use this module, you will need an API key from http://thetvdb.com/?tab=apiregister.
You can pass this key into the constructor, or save it to ~/.tvdb.
AUTHOR
Andrew Jones <andrew@arjones.co.uk>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Andrew Jones.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.