View camera archive list. Stub for archive record page

This commit is contained in:
ftc
2023-07-02 17:18:17 +03:00
parent b19e70b005
commit 477afbecd1
6 changed files with 93 additions and 4 deletions
+11 -1
View File
@@ -29,7 +29,6 @@ class ApiClient
{
$this->http_client->setOption(CURLOPT_POSTFIELDS, $json);
}
$result = $this->http_client->$method($url);
if ($this->http_client->responseCode !== 200)
{
@@ -44,4 +43,15 @@ class ApiClient
return $this->sendRequest('host/getVersion.json');
}
public function getAllEvents($id)
{
return $this->sendRequest('events/index/MonitorId:'.$id.'.json');
}
public function getEvents($id, $start_time, $page = 1)
{
return $this->sendRequest('events/index/MonitorId:'.$id.'/'.
urlencode('StartTime >=:'.$start_time).'.json?page='.$page);
}
}