public function getBookGdata($isbn_id) { $objGdata = new Zend_Gdata_Books(); $query = $objGdata->newVolumeQuery(); $isbnno = 'isbn:' . $isbn_id; $query->setQuery($isbnno); $feed = $objGdata->getVolumeFeed($query); $thumbnail_img = null; foreach ($feed as $entry) { $thumbnailLink = $entry->getThumbnailLink(); if ($thumbnailLink) { $thumbnail = $thumbnailLink->href; } else { $thumbnail = null; } $preview = $entry->getPreviewLink()->href; $thumbnail_img = !$thumbnail ? '' : '<a href="' . $preview . '"><img src="' . $thumbnail . '"/></a>'; } return $thumbnail_img; }
} if (isset($_GET['startIndex'])) { $startIndex = $_GET['startIndex']; $query->setStartIndex($startIndex); } if (isset($_GET['maxResults'])) { $maxResults = $_GET['maxResults']; $query->setMaxResults($maxResults); } if (isset($_GET['minViewability'])) { $minViewability = $_GET['minViewability']; $query->setMinViewability($minViewability); } /* check for one of the restricted feeds, or list from 'all' videos */ switch ($queryType) { case 'full_view': case 'partial_view': $query->setMinViewability($queryType); echo 'Requesting feed: ' . $query->getQueryUrl() . '<br><br>'; $feed = $books->getVolumeFeed($query); break; case 'all': echo 'Requesting feed: ' . $query->getQueryUrl() . '<br><br>'; $feed = $books->getVolumeFeed($query); break; default: echo 'ERROR - unknown queryType - "' . $queryType . '"'; break; } echoBookList($feed); }