EventsListApi. iOS
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.
getCamerasWithAnalytics(page: Int, search: String?, completion: (PaginatedResponse<VMSCamera>?, VMSApiError?))
Events
Get marks
Get the list of mark.
getMarks(page: Int, request: VMSEventsRequest, completion: (PaginatedResponse<VMSEvent>?, VMSApiError?))
Get events
Get the list of events.
getEvents(page: Int, request: VMSEventsRequest, completion: (PaginatedResponse<VMSEvent>?, VMSApiError?))
Get analytic events
Get the list of analytic events.
getAnalyticEvents(page: Int, request: VMSEventsAnalyticRequest, completion: @escaping (PaginatedResponse<VMSEvent>?, VMSApiError?) -> Void)
Get analytics cases
Get all cases of specific analytic cases types. See StaticsApi to get all available analytic cases types.
getAnalyticCases(page: Int, analyticCasesTypes: [String], completion: @escaping (PaginatedResponse<VMSAnalyticCase>?, VMSApiError?) -> Void)
Information you need to make requests to get events
public struct VMSEventsRequest {
public let cameraIds: [Int]
public let types: [String]
public let sortDirection: VMSSortDirection
public let timePeriod: VMSEventTimePeriod?
}
types - if you want to get marks then send marks types. In case you want to get events list sent here event types. See StaticsApi for more details
timePeriod - time period from which you want to take events from. Can be specific or setManualy, in case of setManualy set from and to dates respectively
public struct VMSEventsAnalyticRequest {
public let eventNames: [String]
public let caseIds: [Int]
public let cameraIds: [Int]
public let analyticEventTypes: [String]
public let sortDirection: VMSSortDirection
public let timePeriod: VMSEventTimePeriod?
}
analyticEventTypes - analytics event types. See StaticsApi for more details
eventNames - event name you get from availableEvents of VMSAnalyticCase object
timePeriod - time period from which you want to take events from. Can be specific or setManualy, in case of setManualy set from and to dates respectively
public enum VMSSortDirection: String {
case ascending = "asc"
case descending = "desc"
}