コード例 #1
0
 /**
  * Find volumes in the Google Books database by their title.
  * Title is a string which will be used for partially match volumes.
  *
  * @param     $title
  * @param int $start
  * @param int $count Default: VolumesSearch::MAX_RESULTS
  *
  * @return Volumes
  */
 public function lookupByTitle($title, $start = 0, $count = VolumesSearch::MAX_RESULTS)
 {
     /** @var VolumeSearchQuery $query */
     $query = new VolumeSearchQuery();
     $query->setTitle($title);
     return $this->lookup($query, $start, $count);
 }
コード例 #2
0
 public function testLookupByTitle()
 {
     $title = 'systems analysis and design for a changing world';
     // Retrieve volumes using the lookup manager
     $volumes = $this->volume_lookup_manager->lookupByTitle($title)->getItems();
     $query = new VolumeSearchQuery();
     $query->setTitle($title);
     $json_volumes = $this->callApi($query);
     foreach ($volumes as $k => $volume) {
         $this->annotation_mapper_test->testVolumeEntityMapping($json_volumes['items'][$k], $volume);
     }
 }