NAME
WebService::IMDBAPI - Interface to http://imdbapi.org/
VERSION
version 1.130150
SYNOPSIS
my $imdb = WebService::IMDBAPI->new();
# an array of up to 1 result
my $results = $imdbapi->search_by_title('In Brugges', { limit => 1 });
# an WebService::IMDBAPI::Result object
my $result = $results->[0];
say $result->title;
say $result->plot_simple;
DESCRIPTION
WebService::IMDBAPI is an interface to http://imdbapi.org/.
METHODS
new
Creates a new WebService::IMDBAPI object. Takes the following optional parameters:
- user_agent
-
The user agent to use. Note that the default LWP user agent seems to be blocked. Defaults to
Mozilla/5.0
. - language
-
The language for the results. Defaults to
en-US
.
search_by_title( $title, $options )
Searches based on a title. For the options and their defaults, see http://imdbapi.org/#search-by-title.
Some of the most common options are:
- limit
-
Limits the number of results. Defaults to 1.
- plot
-
The plot type you wish the API to return (none, simple or full). Defaults to simple.
- release
-
The release date type you wish the API to return (simple or full). Defaults to simple.
$title
is required. $options
are optional.
Returns an array of WebService::IMDBAPI::Result objects.
search_by_id( $id, $options )
Searches based on an IMDB ID. For the options and their defaults, see http://imdbapi.org/#search-by-id.
$id
is required. $options
are optional.
Returns a single WebService::IMDBAPI::Result object.
AUTHOR
Andrew Jones <andrew@arjones.co.uk>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 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.