Amazon API

[this page is deprecated as it's based on the old version of App Inventor. Please see the updated page on building an Amazon client and web service]

appinventoramazon.appspot.com is a web service that serves book information from the Amazon API. The service is a custom copy of the tinywebdb.appspot.com web service created by Google's App Inventor team. It can be used with the tinywebdb component within app inventor, meaning that App Inventor programs can now access Amazon information. The source code for this web service, written with Google's App Engine and Python, is attached at the bottom of this page.

The web service follows the tinywebdb protocol, but only implements the getValue operation. There is no facility for storing information (storeValue has no effect).

The getValue operation returns Amazon information based on keyword and isbn search. If the provided tag begins with "isbn:", an isbn search is performed. If the tag is anything else, it is treated as keywords for a general search. Here is an example of each using the web interface provided with the appinventoramazon api:

ISBN:

The Server will return:
    ["VALUE", "isbn:0156444453", "In Favor of the Sensitive Man, and Other Essays::$7.20::0156444453"]

The result has three parts, a title, the lowest price for a new version, and the ASIN for the book.

If the tag does not begin with "ibsn:", the tag is treated as the keyword(s) for a search.

Search:

The Server will return:

    ["VALUE", "baseball", "Baseball Americana: Treasures from the Library of Congress::$17.54::0061625450;;Baseball Prospectus 2010::$16.47::0470558407;;Sports Illustrated: The Baseball Book::$15.00::1933405236;;Watching Baseball Smarter: A Professional Fan's Guide for Beginners, Semi-experts, and Deeply Serious Geeks::$6.97::0307280322;;The Boy Who Saved Baseball::$1.95::0142402869"]

The returned results are separated with a double-semi-colon.

Note that this web service is provided as a proof-of-concept. A full-fledged service could provide more information about each book.

The App Inventor Client

Here is a tutorial for an App Inventor client that uses the above web service.


Č
ċ
ď
David Wolber,
Jan 12, 2010 8:46 AM