CameraApi. Android
Api to get cameras information.
Get main tree
Get all cameras user has.
If request was successful you'll the list of VMSCameraTree
objects.
@GET(FLAT_TREE)
suspend fun getCamerasTree(): List<VMSCameraTree>
Camera search
Get the list of cameras according to search.
If request was successful you'll the list of founded VMSCamera
objects.
@GET(FLAT_TREE)
suspend fun getSearchTree(@Query("search") search: String): List<VMSCamera>
Get camera
Get specific camera information by camera's id.
If request was successful you'll get VMSCamera
object.
@GET(CAMERAS_INFO)
suspend fun getCamera(@Path(ID) id: String): VMSCamera
Rename camera
Rename camera by it's id and with it's new name.
If request was successful you'll get updated VMSCamera
object.
@POST(CAMERAS_RENAME)
suspend fun renameCamera(
@Path(CAMERA) id: String,
@Body request: VMSRenameCameraRequest
): VMSCamera
Send report
Send report if something is wrong with the camera.
See VMSStatics
to get the list of possible issues in camera_issues
.
If request was successful you'll get empty ResponseBody
.
@POST(CAMERAS_ISSUE)
suspend fun sendReport(@Path(ISSUE_KEY) key: String, @Path(ID) id: String): ResponseBody
issue_key
- id of reported issue.
id
- 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.
@GET(CAMERAS_PREVIEW)
suspend fun getCamerasPreview(
@Path(ID) id: String,
@Query("date") date: String? = null
): VMSUrlPreviewResponse
VMSUrlPreviewResponse
id
- id of camera.
date
- date of frame camera's, could be null
.