* @extends RequestHandlerWithScraperCache */ abstract class QueryRecommendationsHandler extends RequestHandlerWithScraperCache { protected abstract function recommendationType(): string; protected function getScraperData(string $requestFingerPrint, Collection $requestParams): CachedData { return $this->scraperService->findList( $requestFingerPrint, fn(MalClient $jikan, ?int $page = null) => $jikan->getRecentRecommendations(new RecentRecommendationsRequest( $this->recommendationType(), $page )), $requestParams->get("page", 1) ); } }