Net::Amazon::Property - Baseclass for products on amazon.com
use Net::Amazon; # ... if($resp->is_success()) { for my $prop ($resp->properties) { print $_->ProductName(), " ", $_->Manufacturer(), " ", $_->OurPrice(), "\n";
Net::Amazon::Property is the baseclass for results returned from Amazon web service queries. The term 'properties' is used as a generic description for an item on amazon.com.
Net::Amazon::Property
Typically, the properties() method of a Net::Amazon::Response::* object will return one or more objects of class Net::Amazon::Property or one of its subclasses, e.g. Net::Amazon::Property::Book or Net::Amazon::Property::CD.
properties()
Net::Amazon::Response::*
Net::Amazon::Property::Book
Net::Amazon::Property::CD
While Net::Amazon::Property objects expose accessors for all fields returned in the XML response (like OurPrice(), ListPrice(), Manufacturer(), Asin(), Catalog(), ProductName(), subclasses might define their own accessors to more class-specific fields (like the iNet::Amazon::Property::Book's authors() method returning a list of authors, while Net::Amazon::Property's Authors() method will return a reference to a sub-hash containing a Author field, just like the response's XML contained it).
OurPrice()
ListPrice()
Manufacturer()
Asin()
Catalog()
ProductName()
authors()
Authors()
Author
Methods vary, depending on the item returned from a query. Here's the most common ones. They're all accessors, meaning they can be used like Method() to retrieve the value or like Method($value) to set the value of the field.
Method()
Method($value)
The item's ASIN number.
Book title, CD album name or item name
Text string describing if the item is available. Examples: "Usually ships within 24 hours" or "Out of Print--Limited Availability".
"Usually ships within 24 hours"
"Out of Print--Limited Availability"
Shows the catalog the item was found in: Book, Music, Classical, Electronics etc.
Book
Music
Classical
Electronics
Returns a sub-hash with a Author key, which points to either a single $scalar or to a reference of an array containing author names as scalars.
Item's release date, format is "NN Monthname, Year".
Music label, publishing company or manufacturer
URL to a small (thumbnail) image of the item
URL to a medium-size image of the item
URL to a large image of the item
List price of the item
Amazon price of the item
Used price of the item
The release year extracted from ReleaseDate()
Please check the subclasses of Net::Amazon::Property for specialized methods.
Mike Schilli, <m@perlmeister.com>
Copyright 2003 by Mike Schilli <m@perlmeister.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::Amazon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Amazon
CPAN shell
perl -MCPAN -e shell install Net::Amazon
For more information on module installation, please visit the detailed CPAN module installation guide.