Skip to main content
Skip table of contents

CameraEventsApi. iOS

Api to get work with events inside player.

Get all events

Get all camera events in specific period of time ad specific event types.

See StaticsApi to get all possible event types.

If no types specified server will return events of all possible types.

If any error would occur you would get an VMSApiError object.

CODE
getCameraEvents(with cameraId: Int, from: Date, to: Date, types: [String]?, completion: ([VMSEvent]?, VMSApiError?))

Get the nearest event

Get the nearest event next or previous from your current date in camera archive.

See statisticsApi to get all possible event types.

If no types specified server will return events of all possible types.

If any error would occur you would get an VMSApiError object.

CODE
func getNearestEvent(with cameraId: Int, from date: Date, types: [String]?, direction: VMSRewindDirection, completion: @escaping (VMSEvent?, VMSApiError?) -> Void)

public enum VMSRewindDirection: String {
    case next
    case previous
}

Create event

If any error would occur you would get an VMSApiError object.

CODE
func createEvent(cameraId: Int, eventName: String, from: Date, completion: @escaping (VMSApiError?) -> Void)

Update event

If any error would occur you would get an VMSApiError object.

CODE
func updateEvent(with id: Int, cameraId: Int, eventName: String, from: Date, completion: @escaping (VMSApiError?) -> Void)

Delete event

If any error would occur you would get an VMSApiError object.

CODE
func deleteEvent(with id: Int, cameraId: Int, completion: @escaping (VMSApiError?) -> Void)

JavaScript errors detected

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

If this problem persists, please contact our support.