How to get book cover picture through amazon API [duplicate]

萝らか妹 提交于 2019-12-20 10:45:05

问题


I want to get the cover of a book form its ASIN through Amazon API. I use the ItemLookup function, but I only get the author, manufacturer and the title.

ie :

<ItemAttributes>
<Author>Anna Gavalda</Author>
<Manufacturer>J'Ai Lu</Manufacturer>
<ProductGroup>Book</ProductGroup>
<Title>Ensemble, C'Est Tout (French Edition)</Title>
</ItemAttributes>

回答1:


See How do I get a book graphic and description from the Amazon Book API?

Also, interesting article about using Amazon images here: http://bibwild.wordpress.com/2008/03/19/think-you-can-use-amazon-api-for-library-service-book-covers/




回答2:


You can try this:

$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">


来源:https://stackoverflow.com/questions/876758/how-to-get-book-cover-picture-through-amazon-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!