WWW::LibraryThing::Covers - Interface to LibraryThing book cover API
use WWW::LibraryThing::Covers; my %config = (api_key => 'd231aa37c9b4f5d304a60a3d0ad1dad4', directory => 'images', size => 'large'); my $lt_covers = WWW::LibraryThing::Covers->new(%config); $lt_covers->get('0977920151');
Retrieves book covers from LibraryThing based on ISBN-10 numbers.
Create a WWW::LibraryThing::Covers object with the following parameters:
Your LibraryThing API key (required).
Output directory for the cover images.
Default size for cover images (optional, defaults to medium). Possible values are large, medium and small.
Defines behaviour for cover images not available. LibraryThing returns a transparent 1�1 pixel GIF image.
Delay between requests. Defaults to 1 second as this is required for automatic downloads.
LWP::UserAgent object (optional).
Retrieves an image for given isbn and size (optional).
The image is stored as ISBN.jpg in the directory provided to the constructor or just returned as scalar reference otherwise.
The actual return value in case of success is a list with three members:
Returns undef in case of errors.
Returns 0 if constructor parameter not_found is set to return_zero and cover image is not available.
Stefan Hornburg (Racke),
<racke at linuxia.de>
Please report any bugs or feature requests to
bug-webservice-librarything-covers at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-LibraryThing-Covers. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
Copyright 2011,2012 Stefan Hornburg (Racke).
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.