|
NAMENet::Amazon::Thumbnail - Use the Amazon Alexa Site Thumbnail web serviceSYNOPSISuse Net::Amazon::Thumbnail;my %conf = ( key_id => "YoursecretkeyID", access_key => "Yoursecretaccesskey", size => "Large", path => "C:/dev/thumbs/", no_image => "noimage.jpg" ); my $thumb = Net::Amazon::Thumbnail->new(\%conf); # Request single thumbnail my $images = $thumb->get_thumbnail('amazon.com'); # Request multiple thumbnails my @domains = ('http://perlmonks.org', 'http://perl.com'); $images = $thumb->get_thumbnail(\@domains); # Request with custom name (when path is provided) my %domain = ('perl.com' => 'TheSourceForPerl'); $images = $thumb->get_thumbnail(\%domain); DESCRIPTIONThe Net::Amazon::Thumbnail module allows you to use the Amazon Alexa Site Thumbnail web service with relative ease.The Alexa Site Thumbnail web service provides developers with programmatic access to thumbnail images for the home pages of web sites. It offers access to Alexa's large and growing collection of images, gathered from its comprehensive web crawl. This web service enables developers to enhance web sites, search results, web directories, blog entries, and other web real estate with Alexa thumbnails images. In order to access the Alexa Web Information Service, you will need an Amazon Web Services Subscription ID. See http://www.amazon.com/gp/aws/landing.html There are some limitations, so be sure to read the The Amazon Alexa Web Information Service FAQ. INTERFACEThe interface follows. Most of this documentation was copied from the API reference. Upon errors, an exception is thrown.newThe constructor method creates a new Net::Amazon::Thumbnail object. You must pass in a hash reference containing the Amazon Web Services Access Key ID, Secret Access Key, thumbnail size (small or large), and the name of your default empty image. Optionally you can also provide a path to store the images.my $thumb = Net::Amazon::Thumbnail->new(\%conf); ConfigThe configuration options have just a few requirements. The following keys are required:
The following keys are optional
get_thumbnailThe get_thumbnail method retrieves the thumbnails for the sites given, and returns an array reference containing the thumbnail(s) requested.This method only accepts one argument, which must be a reference.
If the path option was given, it will return the stored image instead of the image hosted on Amazon. post_thumbnailThe post_thumbnail is exactly the same as get method, except that it dispatches a "POST" request instead of a "GET" request.Although this method does work, the API says to use "GET" requests. BUGS AND LIMITATIONSNo bugs have been reported.Please report any bugs or feature requests to "bug-Net-Amazon-Thumbnail@rt.cpan.org". <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Amazon-Thumbnail> is the RT queue for Net::Amazon::Thumbnail. Please check to see if your bug has already been reported. AUTHORIan Tyndall "ityndall@cpan.org"COPYRIGHTCopyright (c) 2007, Ian Tyndall "ityndall@cpan.org". All rights reserved.This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |