EventsListApi. Android
Api to get all user's events
Get cameras with analytics
Get list of cameras by page and search if needed where user has analytics on.
CODE
@GET(CAMERAS_WITH_ANALYTICS)
suspend fun getCamerasList(
@Query(SEARCH) search: String? = null,
@Query(FILTER) filter: String = "analytics",
@Query(PAGE) page: String = "1"
): VMSResponseCameras
Events
Get system events
Get the list of system events
CODE
@GET(EVENTS)
fun getEventsSystem(
@Query(PAGE) page: String,
@Query(CAMERAS_ARRAY) cameras: List<Int>? = null,
@Query(SORT) sort: String = "created_at",
@Query(DIR) dir: String = "desc", // 'desc' by default or 'asc'
@Query(DATE) date: String?,
@Query(TIMEZONE) timezone: String?,
@Query(FROM) from: String?,
@Query(TO) to: String?,
): VMSApiResponseEvents
Get user's events
CODE
@GET(MARKS)
fun getEventsMarks(
@Query(PAGE) page: String,
@Query(CAMERAS_ARRAY) cameras: List<Int>? = null,
@Query(SORT) sort: String = "created_at",
@Query(DIR) dir: String = "desc",// 'desc' by default or 'asc'
@Query(DATE) date: String?,
@Query(TIMEZONE) timezone: String?,
@Query(FROM) from: String?,
@Query(TO) to: String?,
): VMSApiResponseEvents
Get analytics events
CODE
@GET(ANALYTIC_CASE_EVENTS)
fun getEventsAnalytic(
@Query(PAGE) page: String? = null,
@Query(EVENTS_ARRAY) events: List<String>? = null,
@Query(ANALYTIC_TYPES) types: List<String>? = null,
@Query(CAMERAS_ARRAY) cameras: List<Int>? = null,
@Query(IDS_ARRAY) cases: List<Int>? = null,
@Query(DIR) dir: String = "desc", // 'desc' by default or 'asc'
@Query(DATE) date: String?,
@Query(TIMEZONE) timezone: String?,
@Query(FROM) from: String?,
@Query(TO) to: String?
): VMSApiResponseEvents
Get analytics cases
Get all cases available for current eventTypes. See VMSStatics
to get all available event types.
CODE
@GET(ANALYTIC_CASE)
suspend fun getAnalyticCases(@Query(TYPES_ARRAY) types: List<String>): VMSAnalyticFilters
Information you need to make requests to get events. Every list has not required params:
CODE
@Query(PAGE) page: String? = null,
@Query(EVENTS_ARRAY) events: List<String>? = null,
@Query(ANALYTIC_TYPES) types: List<String>? = null,
@Query(CAMERAS_ARRAY) cameras: List<Int>? = null,
@Query(IDS_ARRAY) cases: List<Int>? = null,
@Query(DIR) dir: String = "desc", // 'asc' or 'desc'
@Query(DATE) date: String?,
@Query(TIMEZONE) timezone: String?,
@Query(FROM) from: String?,
@Query(TO) to: String?