WebService::MoviePosterDB - OO Perl interface to the movie poster database MoviePosterDB.
use WebService::MoviePosterDB; my $ws = WebService::MoviePosterDB->new(api_key => "key", api_secret => "secret", cache => 1, cache_exp => "12h"); my $movie = $ws->search(type => "Movie", imdbid => "tt0114814", width => 300); print $movie->title(), ": \n\n"; print $movie->page(), "\n\n"; foreach ( @{$movie->posters()} ) { print $_->image_location(), "\n"; }
WebService::MusicBrainz is an object-oriented interface to MoviePosterDB. It can be used to retrieve artwork for IMDB titles.
Constructor.
%opts can contain:
A key and secret are required to use the API. Contact movieposterdb.com for details.
Whether to cache responses. Defaults to true
The root dir for the cache. Defaults to tmpdir();
How long to cache responses for. Defaults to "1h"
Accesses MoviePosterDB and returns a WebService::MoviePosterDB::Movie object.
%args can contain:
Controls the type of resource being requested. Currently only supports "Movie".
IMDB id for the title, e.g. tt0114814
Alias for tconst
Name of the title
Image width for returned artwork
The version 1 API, previously used by default, stopped as of 2011-09-27, and credentials are required to access the version 2 API. It is possible to access the version 2 API using test credentials (key, secret = "demo"), and this will be done for legacy applications that try to use the version 1 API. However, this feature is only intended for test purposes: legacy applications should be adapted, and new applications should not use it.
Christopher Key <cjk32@cam.ac.uk>
Copyright (C) 2010-2011 Christopher Key <cjk32@cam.ac.uk>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.
To install WebService::MoviePosterDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::MoviePosterDB
CPAN shell
perl -MCPAN -e shell install WebService::MoviePosterDB
For more information on module installation, please visit the detailed CPAN module installation guide.