apiKey = $apiKey; $this->idsModel = new Ids($apiKey); $this->query = new Query($apiKey); } public function getDevicesByIpId(int $ipId): array { $params = [':ip_id' => $ipId]; return $this->getGrid($this->idsModel->getDevicesIdsByIpId(), $params); } public function getDevicesByUserId(int $userId): array { $params = [':account_id' => $userId]; return $this->getGrid($this->idsModel->getDevicesIdsByUserId(), $params); } public function getDevicesByResourceId(int $resourceId): array { $params = [':resource_id' => $resourceId]; return $this->getGrid($this->idsModel->getDevicesIdsByResourceId(), $params); } public function getAllDevices(): array { return $this->getGrid(); } protected function calculateCustomParams(array &$result): void { $this->applyDeviceParams($result); } protected function convertTimeToUserTimezone(array &$result): void { $fields = ['created']; $this->translateTimeZones($result, $fields); } }