Two questions about Google Books Search API

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Two questions about Google Books Search API

oportell
Hi,

I have two questions related to the use of Google Books Search API:

1) Does anyone know if it has a bug? When I do a search, I get incomplete data. The problem happens when I try to get the "publishers" data. For example: for a book from "Oxford University Press" I get "Oxford University Pr"... My code is as following:

$books = new Zend_Gdata_Books();
$query = $books->newVolumeQuery();
$term = $this->getRequest()->getParam('q');
$filter = "inauthor:{$term}";
$query->setMaxResults(6);
$query->setQuery($filter);
$feeds = $books->getVolumeFeed($query);
foreach ($feeds as $entry) {
   $publishers = implode(" / ", $entry->getPublishers());
}


2) Is there a way to do a search in Google Books Search API by Google book ID?
I try to do the following, but I don't know if I will ever get a result:

$books = new Zend_Gdata_Books();
$query = $books->newVolumeQuery();
$id = "3uQQNAAACAAF";
$search = "http://www.google.com/books/feeds/volumes/{$id}";
$query->setQuery($search);
$feeds = $books->getVolumeFeed($query);

Thanks in advance,

Oriol