我希望通过Amazon API获得一本书的封面。我使用ItemLookup
函数,但我只获得author
,manufacturer
和title
。
即:
<ItemAttributes>
<Author>Anna Gavalda</Author>
<Manufacturer>J'Ai Lu</Manufacturer>
<ProductGroup>Book</ProductGroup>
<Title>Ensemble, C'Est Tout (French Edition)</Title>
</ItemAttributes>
答案 0 :(得分:3)
请参阅How do I get a book graphic and description from the Amazon Book API?
此外,有关使用亚马逊图像的有趣文章: http://bibwild.wordpress.com/2008/03/19/think-you-can-use-amazon-api-for-library-service-book-covers/
答案 1 :(得分:0)
你可以试试这个:
$track=$_GET['title'];
// Call To Amazon Predefined Class
$client = new AmazonECS(AWS_API_KEY, AWS_API_SECRET_KEY, 'com', AWS_ASSOCIATE_TAG);
$response = $client->category('Books')->responseGroup('Images,Reviews,ItemAttributes,OfferSummary')->search($track);
// To Get Image
<img src="<?php echo $response->Items->Item[0]->LargeImage->URL ?>" width="233" height="300">