Breadcrumbs

CameraEventsApi. Android

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 VMSStatics to get all possible event types. If no types specified server will return events of all possible types.

@GET(CAMERAS_MARKS)
suspend fun getCameraMarks(
    @Path(ID) id: String,
    @Query("from") from: String,
    @Query("to") to: String,
    @Query("types[]") types: List<String>
): List<VMSEvent>

Get the nearest event

Get the nearest event next or previous from your current date in camera archive. See VMSStatics to get all possible event types.

@GET(CAMERAS_NEAREST_EVENT)
suspend fun getNearestEvent(
    @Path(ID) idCamera: String,
    @Query("from") currentTimelineTime: String,
    @Query("types[]") types: List<String>,
    @Query("rewind") direction: String // "previous" or "next"
): VMSNearestEvent

Create event

@POST(CAMERAS_EVENTS)
suspend fun createEvent(
    @Path(ID) idCamera: String,
    @Body createData: VMSEventCreateData
): VMSEvent

Update event

@PUT(CAMERAS_ACCESS_MARK)
suspend fun updateEvent(
    @Path(ID) cameraId: Int,
    @Path(MARK_ID) markId: Int,
    @Body createData: VMSEventCreateData
): VMSEvent

Delete event

@DELETE(CAMERAS_ACCESS_MARK)
suspend fun deleteEvent(@Path(ID) cameraId: Int, @Path(MARK_ID) markId: Int): ResponseBody