-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
107 lines (72 loc) · 3 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
NAME
WWW::LibraryThing::Covers - Interface to LibraryThing book cover API
VERSION
Version 0.0002
SYNOPSIS
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');
DESCRIPTION
Retrieves book covers from LibraryThing based on ISBN-10 numbers.
Please checkout the terms of use first.
CONSTRUCTOR
new
Create a WWW::LibraryThing::Covers object with the following parameters:
api_key
Your LibraryThing API key (required).
directory
Output directory for the cover images.
size
Default size for cover images (optional, defaults to medium).
Possible values are large, medium and small.
not_found
Defines behaviour for cover images not available. LibraryThing
returns a transparent 1×1 pixel GIF image.
delay
Delay between requests. Defaults to 1 second as this is required for
automatic downloads.
user_agent
LWP::UserAgent object (optional).
METHODS
get
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:
* Filename or scalar reference of the image data.
* Image width.
* Image size.
Returns undef in case of errors.
Returns 0 if constructor parameter not_found is set to return_zero and
cover image is not available.
AUTHOR
Stefan Hornburg (Racke), `<racke at linuxia.de>'
BUGS
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.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc WWW::LibraryThing::Covers
You can also look for information at:
* RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-LibraryThing-Covers
* AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/WWW-LibraryThing-Covers
* CPAN Ratings
http://cpanratings.perl.org/d/WWW-LibraryThing-Covers
* Search CPAN
http://search.cpan.org/dist/WWW-LibraryThing-Covers/
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
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.