Main > Programming > Libraries >

Net::Amazon 0.39

Net::Amazon 0.39

Sponsored Links

Net::Amazon 0.39 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.15 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 961
Date added: 2007-03-09
Publisher: Mike Schilli

Net::Amazon 0.39 description

Net::Amazon is a framework for accessing amazon.com via REST.

SYNOPSIS

use Net::Amazon;

my $ua = Net::Amazon->new(token => YOUR_AMZN_TOKEN);

# Get a request object
my $response = $ua->search(asin => 0201360683);

if($response->is_success()) {
print $response->as_string(), "n";
} else {
print "Error: ", $response->message(), "n";
}

ABSTRACT

Net::Amazon provides an object-oriented interface to amazon.coms
REST interface. This way its possible to create applications
using Amazons vast amount of data via a functional interface, without
having to worry about the underlying communication mechanism.

Net::Amazon works very much like LWP: First you define a useragent like

my $ua = Net::Amazon->new(
token => YOUR_AMZN_TOKEN,
max_pages => 3,
);

which you pass your personal amazon developers token (can be obtained from http://amazon.com/soap) and (optionally) the maximum number of result pages the agent is going to request from Amazon in case all results dont fit on a single page (typically holding 20 items). Note that each new page requires a minimum delay of 1 second to comply with Amazons one-query-per-second policy.

According to the different search methods on Amazon, theres a bunch of different request types in Net::Amazon. The user agents convenience method search() triggers different request objects, depending on which parameters you pass to it:

$ua->search(asin => "0201360683")
The asin parameter has Net::Amazon search for an item with the specified ASIN. If the specified value is an arrayref instead of a single scalar, like in
$ua->search(asin => ["0201360683", "0596005083"])
then a search for multiple ASINs is performed, returning a list of results.
$ua->search(actor => "Adam Sandler")
The actor parameter has the user agent search for items created by the specified actor. Can return many results.
$ua->search(artist => "Rolling Stones")
The artist parameter has the user agent search for items created by the specified artist. Can return many results.
$ua->search(author => "Robert Jordan")
The author parameter has the user agent search for items created by the specified author. Can return many results.
$ua->search(browsenode=>"4025", mode=>"books" [, keywords=>"perl"])
Returns a list of items by category ID (node). For example node "4025" is the CGI books category. You can add a keywords parameter to filter the results by that keyword.
$ua->search(exchange => Y04Y3424291Y2398445)
Returns an item offered by a third-party seller. The item is referenced by the so-called exchange ID.
$ua->search(keyword => "perl xml", mode => "books")
Search by keyword, mandatory parameters keyword and mode. Can return many results.
$ua->search(wishlist => "1XL5DWOUFMFVJ")
Search for all items in a specified wishlist. Can return many results.
$ua->search(upc => "075596278324", mode => "music")
Music search by UPC (product barcode), mandatory parameter upc. mode has to be set to music. Returns at most one result.
$ua->search(isbn => "0439784549")
Book search by ISBN (International Standard Book Number), mandatory parameter isbn. Returns at most one result. When searching non-US locales use the 13-digit ISBN.
$ua->search(similar => "0201360683")
Search for all items similar to the one represented by the ASIN provided. Can return many results.
$ua->search(power => "subject: perl and author: schwartz", mode => "books")
Initiate a power search for all books matching the power query. Can return many results. See Net::Amazon::Request::Power for details.
$ua->search(manufacturer => "Disney")
Initiate a search for all items made by a given manufacturrer. Can return many results. See Net::Amazon::Request::Manufacturer for details.
$ua->search(musiclabel => "Arista")
Initiate a search for all items made by a given music label. Can return many results. See Net::Amazon::Request::MusicLabel for details.
$ua->search(publisher => "oreilly")
Initiate a search for all items made by a given publisher. Can return many results. See Net::Amazon::Request::Publisher for details.
$ua->search(blended => "Perl")
Initiate a search for items in all categories.
$ua->search(seller => "A2GXAGU54VOP7")
Start a search on items sold by a specific third-party seller, referenced by its ID (not seller name).
$ua->search(textstream => "Blah blah Rolling Stones blah blah")
Find items related to keywords within a text stream.
The user agents search method returns a response object, which can be checked for success or failure:
if($resp->is_success()) {
print $resp->as_string();
} else {
print "Error: ", $resp->message(), "n";
}

In case the request for an item search succeeds, the response contains one or more Amazon properties, as it calls the products found. All matches can be retrieved from the Response object using its properties() method.

In case the request fails, the response contains one or more error messages. The response objects message() method will return it (or them) as a single string, while messages() (notice the plural) will return a reference to an array of message strings.

Response objects always have the methods is_success(), is_error(), message(), total_results(), as_string() and properties() available.
total_results() returns the total number of results the search yielded. properties() returns one or more Net::Amazon::Property objects of type Net::Amazon::Property (or one of its subclasses like Net::Amazon::Property::Book, Net::Amazon::Property::Music or Net::Amazon::Property::DVD), each of which features accessors named after the attributes of the product found in Amazons database:

for ($resp->properties) {
print $_->Asin(), " ",
$_->OurPrice(), "n";
}

In scalar context, properties() just returns the first Net::Amazon::Property object found. Commonly available accessors to Net::Amazon::Property objects are OurPrice(), ImageUrlLarge(), ImageUrlMedium(), ImageUrlSmall(), ReleaseDate(), Catalog(), Asin(), url(), Manufacturer(), UsedPrice(), ListPrice(), ProductName(), Availability(), SalesRank(), CollectiblePrice(), CollectibleCount(), NumberOfOfferings(), UsedCount(), ThirdPartyNewPrice(), ThirdPartyNewCount(), similar_asins(). For details, check Net::Amazon::Property.

Also, the specialized classes Net::Amazon::Property::Book and Net::Amazon::Property::Music feature convenience methods like authors() (returning the list of authors of a book) or album() for CDs, returning the album title.

Customer reviews: Every property features a review_set() method which returns a Net::Amazon::Attribute::ReviewSet object, which in turn offers a list of Net::Amazon::Attribute::Review objects. Check the respective man pages for details on whats available.

Net::Amazon 0.39 Screenshot

Advertisements

Net::Amazon 0.39 Keywords

Bookmark Net::Amazon 0.39

Hyperlink code:
Link for forum:

Net::Amazon 0.39 Copyright

WareSeeker periodically updates pricing and software information of Net::Amazon 0.39 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Net::Amazon 0.39 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Net::Amazon::S3 is a simple, easy to use, pure Ruby implementation of the Amazon S3 REST API. Free Download
Net::Amazon::EC2 is a Perl interface to the Amazon Elastic Compute Cloud (EC2) environment. Free Download
Net::Amazon::Property::DVD is a Perl class for DVDs on amazon.com. Free Download
TeamFound provides a a team the capability to share search results without any usage-overhead. Free Download
Net::Amazon::Validate::ItemSearch is a Perl module to validate ItemSearch requests. Free Download
panelSearch will open your search results in a sidebar-like panel. Free Download
PHP ClamaAV Lib is a PHP extension that allows you to incorporate virus scanning features in your PHP scripts. Free Download
Net::Google is a simple OOP-ish interface to the Google SOAP API. Free Download