apiKey = $apiKey; $this->idsModel = new Ids($apiKey); $this->query = new Query($apiKey); } public function getEventsByUserId(int $userId): array { $ids = ['userId' => $userId]; return $this->getGrid(null, $ids); } public function getEventsByIspId(int $ispId): array { $ids = ['ispId' => $ispId]; return $this->getGrid(null, $ids); } public function getEventsByDomainId(int $domainId): array { $ids = ['domainId' => $domainId]; return $this->getGrid(null, $ids); } public function getEventsByDeviceId(int $deviceId): array { $ids = ['deviceId' => $deviceId]; return $this->getGrid(null, $ids); } public function getEventsByResourceId(int $resourceId): array { $ids = ['resourceId' => $resourceId]; return $this->getGrid(null, $ids); } public function getEventsByCountryId(int $countryId): array { $ids = ['countryId' => $countryId]; return $this->getGrid(null, $ids); } public function getEventsByIpId(int $ipId): array { $ids = ['ipId' => $ipId]; return $this->getGrid(null, $ids); } public function getAllEvents() { return $this->getGrid(); } protected function calculateCustomParams(array &$result): void { $this->calculateIpType($result); $this->applyDeviceParams($result); } protected function convertTimeToUserTimezone(array &$result): void { $fields = ['time', 'lastseen', 'session_max_t', 'session_min_t', 'score_updated_at']; $this->translateTimeZones($result, $fields); } }