Driving Summary
Handles DrivingSummary related requests with IMS web services.
Fetch Drive Summary
Concrete example
let service = DrivingSummaryService()
let startDate = Date() // customize this to your convenience
let endDate = Date() // customize this to your convenience
service.fetch(filters: [.date(start: startDate, end: endDate)], then: { result in
guard !result.value.isEmpty else {
// failure
return
}
completionHandler(.success(result.value))
}val drivingSummaryService = DrivingSummaryService()
val filters: MutableSet<DrivingSummaryService.Filter> = HashSet()
filters.add(DrivingSummaryService.Filter.Date(summaryStartDate, summaryEndDate))
drivingSummaryService.fetchDrivingSummaryAggregate {filters)
{ result: Result<Content?>? ->
if (result?.value == null || result.throwable != null) {
// failure
} else {
// Success
val content = result.value
}
})Last updated