amazon.com/onca/xml?Service=AWSECommerceService
&AWSAccessKeyId=[Your Access Key ID]
&Operation=ItemLookup
&IdType=ASIN
&ItemId=1590598644
?– Tip Make sure you type the entire URL on a single line; we??™ve broken it down here to individual elements
to make it easier to read.
Your browser will display an XML structure with information about the book you are reading
now. Figure 22-3 shows this XML structure in Firefox, which nicely displays the XML document
tree. (We??™ll discuss displaying the products, visually, in TShirtShop later. For now we are interested
in seeing the data that is returned from the request.)
CHAPTER 22 ?– USING AMAZON.COM WEB SERVICES 669
Figure 22-3. The XML response of an Amazon.com web service request
Pretty cool, huh? You have just seen REST in action. Every product in the Amazon.com
database has a unique identifier called an Amazon.com standard item number (ASIN). For
books, the ASIN is the book??™s ISBN (this book has the ASIN 1590598644).
The web service request you just made tells AWS the following: I have an access key
ID (AWSAccessKeyId=[Your Access Key ID]), and I want to make an item lookup operation
(&Operation=ItemLookup) to learn more about the product with the 1590598644 ASIN
(&IdType=ASIN&ItemId=1590598644).
You didn??™t get much information about this book in this example??”no price or availability
information and no links to the cover picture or customer reviews.
Pages:
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784