I'm having a few issues using the amazon API to search for ISBN.
The code seams to work for a FEW isbn's and returns some results however the majority of books (mainly factual/reference books) I search for via ISBN return no results.
To test I am getting the ISBN-10 number from amazon. I have also then tested by searching for this isbn through their own search.
This is the code we use to get the results.. I dont suppose anyone can spot a flaw?
function getBooks($isbn){
$client = new AmazonECS('AWS_API_KEY', 'AWS_API_SEECRET_KEY', 'co.uk', 'tutorp-21');
$response = $client->responseGroup('Small,Images,EditorialReview')->category('Books')->search($isbn);
$books = array();
if($response->Items->TotalResults > 1){
foreach($response->Items->Item as $item)
$books[] = parseItem($item);
}else if($response->Items->TotalResults == 1){
$books[] = parseItem($response->Items->Item);
}
return $books;
}
Cheers
Edit : Just to clarify... The problem we are facing is that only some ISBN numbers return results. Even though these books exist in Amazon they dont seam to return any results when searched through the API
The problems was books that didn't have editorials. The code written works fine but needed exceptions for books being returned without all the information.