Christopher Key > WebService-IMDB-0.05 > WebService::IMDB

Download:
WebService-IMDB-0.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.05   Source  

NAME ^

WebService::IMDB - OO Perl interface to the Internet Movie Database imdb.com

SYNOPSIS ^

    use WebService::IMDB;

    my $ws = WebService::IMDB->new(cache => 1, cache_exp => "12h");

    my $movie = $ws->search(type => "Title", tconst => "tt0114814");

    print $movie->title(), ": \n\n";
    print $movie->synopsis(), "\n\n";

    foreach ( @{$movie->cast_summary()} ) {
        print $_->name()->name(), " : ", $_->char(), "\n";
    }

LEGAL ^

The data accessed via this API is provided by IMDB, and is currently supplied with the following copyright notice.

For use only by clients authorized in writing by IMDb. Authors and users of unauthorized clients accept full legal exposure/liability for their actions.

Anyone using WebService::IMDB must abide by the above requirements.

METHODS ^

new(%opts)

Constructor.

%opts can contain:

cache - Whether to cache responses. Defaults to true
cache_root - The root dir for the cache. Defaults to tmpdir();
cache_exp - How long to cache responses for. Defaults to "1h"
domain - Domain from which to request data. Defaults to "app.imdb.com"

search(%args)

%args can contain:

type - Resource type: "Title", "Name
tconst - IMDB tconst e.g. "tt0000001" (Title)
nconst - IMDB nconst e.g. "nm0000002" (Name)
imdbid - More tolerant version of tconst, nconst e.g. "123", "0000456", "tt0000001", "nm0000002" (Title, Name)
syntax highlighting: