/** * Gets number of pages of records/results for the last API request. * * @return int * Number of pages. */ public function getTotalNumberOfPagesForLastRequest() { $has_pagination_data = is_set($this->lastApiResponse->getNumPages()); return $has_pagination_data ? $this->lastApiResponse->getNumPages() : 1; }