Baseclass for products on amazon.com
use Net::Amazon; # ... if($resp->is_success()) { for my $prop ($resp->properties) { print $_->ProductName(), " ", $_->Manufacturer(), " ", $_->OurPrice(), "\n";
\*(C`Net::Amazon::Property\*(C' 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.
Typically, the \*(C`properties()\*(C' method of a \*(C`Net::Amazon::Response::*\*(C' object will return one or more objects of class \*(C`Net::Amazon::Property\*(C' or one of its subclasses, e.g. \*(C`Net::Amazon::Property::Book\*(C' or \*(C`Net::Amazon::Property::CD\*(C'.
While \*(C`Net::Amazon::Property\*(C' objects expose accessors for all fields returned in the \s-1XML\s0 response (like \*(C`OurPrice()\*(C', \*(C`ListPrice()\*(C', \*(C`Manufacturer()\*(C', \*(C`Asin()\*(C', \*(C`Catalog()\*(C', \*(C`ProductName()\*(C', subclasses might define their own accessors to more class-specific fields (like the i\*(C`Net::Amazon::Property::Book\*(C''s \*(C`authors()\*(C' method returning a list of authors, while \*(C`Net::Amazon::Property\*(C''s \*(C`Authors()\*(C' method will return a reference to a sub-hash containing a \*(C`Author\*(C' field, just like the response's \s-1XML\s0 contained it).
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 \*(C`Method()\*(C' to retrieve the value or like \*(C`Method($value)\*(C' to set the value of the field.
The item's \s-1ASIN\s0 number. This option is deprecated, please use \s-1ASIN\s0.
The item's \s-1ASIN\s0 number.
Book title, \s-1CD\s0 album name or item name. This option is actually an alias for the method title, and is actually dependent upon the type of item returned.
Text string describing if the item is available. Examples: "Usually ships within 24 hours" or "Out of Print--Limited Availability".
Shows the catalog the item was found in: \*(C`Book\*(C', \*(C`Music\*(C', \*(C`Classical\*(C', \*(C`Electronics\*(C' etc.
Returns a sub-hash with a \*(C`Author\*(C' 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 \*(L"\s-1NN\s0 Monthname, Year\*(R".
Music label, publishing company or manufacturer
\s-1URL\s0 to a small (thumbnail) image of the item
\s-1URL\s0 to a medium-size image of the item
\s-1URL\s0 to a large image of the item
List price of the item
Amazon price of the item
Used price of the item
Unformatted list price as an integer, without currency symbol.
The currency code for the \*(L"ListPrice()\*(R", e.g. \*(C`USD\*(C'.
Sales rank of the item (contains digits and commas, like 1,000,001)
Type of media (Paperback, etc.).
Number of media the item carries (1,2 CDs etc.).
Lengthy textual description of the product.
Lowest price in \*(L"Collectible\*(R" category.
Number of offerings in \*(L"Collectible\*(R" category.
Total number of offerings in all categories.
Number of offerings in \*(L"Used\*(R" category.
Number of offerings of the product.
Lowest price in \*(L"Third Party New\*(R" category.
Number of offerings in \*(L"Third Party New\*(R" category.
Return the width of the small image in pixels.
Return the height of the small image in pixels.
Return the width of the medium image in pixels.
Return the height of the medium image in pixels.
Return the width of the large image in pixels.
Return the height of the large image in pixels.
Boolean value that indicates if the product is eligible for super saver shipping.
The release year extracted from ReleaseDate().
Returns a list of browse nodes (text string categories) for this item.
Returns a list of ASINs of similar items for this item.
Returns a list of ASINs and titles of similar items for this item.
Please check the subclasses of \*(C`Net::Amazon::Property\*(C' for specialized methods.
Mike Schilli, <[email protected]>
Copyright 2003 by Mike Schilli <[email protected]>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.