コード例 #1
0
 public function testLookupByAuthor()
 {
     $author = 'John Satzinger';
     // Retrieve volumes using the lookup manager
     $volumes = $this->volume_lookup_manager->lookupByAuthor($author)->getItems();
     $query = new VolumeSearchQuery();
     $query->setAuthorName($author);
     $json_volumes = $this->callApi($query);
     foreach ($volumes as $k => $volume) {
         $this->annotation_mapper_test->testVolumeEntityMapping($json_volumes['items'][$k], $volume);
     }
 }
コード例 #2
0
 /**
  * Find volumes in the Google Books database by the author name.
  *
  * @param string $author
  * @param int    $start
  * @param int    $count Default: VolumesSearch::MAX_RESULTS
  *
  * @return Volumes
  */
 public function lookupByAuthor($author, $start = 0, $count = VolumesSearch::MAX_RESULTS)
 {
     /** @var VolumeSearchQuery $query */
     $query = new VolumeSearchQuery();
     $query->setAuthorName($author);
     return $this->lookup($query, $start, $count);
 }