Skip to main content
Skip table of contents

CameraApi. iOS

Api to get cameras information.

Get main tree

Get all cameras user has.

If request was successful you'll the list of VMSCameraTree objects. If any error would occur you would get an VMSApiError object.

CODE
getCamerasTree(search: String?, completion: ([VMSCameraTree]?, VMSApiError?))

Camera search

Get the list of cameras according to search.

If request was successful you'll the list of founded VMSCamera objects. If any error would occur you would get an VMSApiError object.

CODE
getSearchCameras(search: String, completion: ([VMSCamera]?, VMSApiError?))

cancelSearchCamerasRequest() - cancel request in case you need it

Get camera

Get specific camera information by camera's id.

If request was successful you'll get VMSCamera object. If any error would occur you would get an VMSApiError object.

CODE
getCamera(with cameraId: Int, completion: (VMSCamera?, VMSApiError?))

cancelCameraInfoRequest(with cameraId: Int) - cancel request in case you need it

Rename camera

Rename camera by it's id and with it's new name.

If request was successful you'll get updated VMSCamera object. If any error would occur you would get an VMSApiError object.

CODE
renameCamera(with id: Int, name: String, completion: (VMSCamera?, VMSApiError?))

Send report

Send report if something is wrong with the camera. See StaticsApi to get the list of possible issues.

If request was successful you'll get nil. If any error would occur you would get an VMSApiError object.

CODE
sendReport(info: VMSReportRequest, completion: (VMSApiError?))

VMSReportRequest

Object with needed info to send report.

CODE
init(issueId: Int, cameraId: Int)

issueId - id of reported issue. See StaticsApi for more information

cameraId - id of camera with issue

Get camera preview

Get camera preview of specific date. You will receive .mp4 file of camera one frame.

If request was successful you'll get url to download frame. If any error would occur you would get an VMSApiError object.

CODE
getCameraPreview(with cameraId: Int, date: String?, completion: (String?, VMSApiError?) -> Void) -> DataRequest?

cancelPreviewCameraRequest(with cameraId: Int) - cancel request in case you need it

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.