amazon_api.pl

build_agent(-Agent, +Args:dict)
Build an Agent which is used for making Amazon API requests. Args should contain at least the following keys (obtained from Amazon):

It may include an optional host key which defaults to "webservices.amazon.com".

item_lookup(+Agent, +Asin:string, -Item, +Args:dict)
Perform an "ItemLookup" call using Amazon's Product Advertising API. Additional API arguments are passed via Args. A common use case is to specify response groups:
item_lookup(Agent,'B00004TN1Z',Item, _{'ResponseGroup':"Offers"}).
item_lookup(+Agent, +Asin:string, -Item)
Like item_lookup/4 with no arguments.
offer_inventory(+Item, ?Condition:atom, -Inventory:integer)
Find how many offers in Condition are available. Item is a value produced by item_lookup/3, which must include the response group "OfferSummary" (directly or indirectly).

Condition should be one of used, new or collectible. Leaving Condition unbound iterates all conditions on backtracking.

offer_low_price(+Item, ?Condition, -Pennies:integer)
Find the lowest price for an offer in Condition. The price is represented as an integer number of pennies, when using US Dollars. An equivalent unit is used for other currencies. Item is a value produced by item_lookup/3, which must include the response group "OfferSummary" (directly or indirectly).

Condition should be one of used, new or collectible. Leaving Condition unbound iterates all conditions on backtracking.

title(+Item, -Title:atom) is det
An item's title. Item is a value from item_lookup/3 and requires the "ItemAttributes" response group.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

request(Arg1, Arg2, Arg3, Arg4, Arg5)