Get detailed trips information
/**
* Returns detailed track information. (track details are cached in local DB)
*
* @param locale Language in which track are to arrive. Maybe English, Russian, Spanish, Portugal
* @param trackId Track id.
*/s
// IMPORTANT! Do not call this method in the Main thread.
fun *getTrackDetails(trackId: String, locale: Locale): TrackDetail
Response:
class TrackDetails(
/**
* The start address.
*/
var addressStart: String?,
/**
* The end address.
*/
var addressEnd: String?,
/**
* The end date in "yyyy-MM-dd'T'HH:mm:ss ZZ" format.
*/
var endDate: String?,
/**
* The start date in "yyyy-MM-dd'T'HH:mm:ss ZZ" format.
*/
var startDate: String?,
/**
* The unique trip id.
*/
var trackId: String?,
/**
* The count of sharp acceleration.
*/
var accelerationCount: Int,
/**
* The count of sharp braking.
*/
var decelerationCount: Int,
/**
* The distance trip in km.
*/
var distance: Double,
/**
* The duration trip in horse.
*/
var duration: Double,
/**
* The trip rating. Range 1..5
*/
var rating: Double,
/**
* The trip phone usage minutes.
*/
var phoneUsage: Double,
/**
* The trip type.
* See also [TripOriginDictionary.code]
*/
var originalCode: String?,
/**
* The trip type has changed. If false - origin trip type can be changed. If false - can't be changed.
* [TripOriginDictionary.code]
*/
var hasOriginChanged: Boolean,
/**
* Total distance travelled(in km) while exceeding speed limit over for 10 to 20 km/h
*/
var midOverSpeedMileage: Double,
/**
* Total distance travelled(in km) while exceeding the speed limit over for 20 km/h or more.
*/
var highOverSpeedMileage: Double,
/**
* List trip points. Usually used to build a route on the map.
*/
var points: Array<TrackPoint>?,
/**
* Driving tips.
*/
var drivingTips: String?,
var shareType: String?,
var cityStart: String?,
var cityFinish: String?,
var ratingCornering: Double,
var ratingAcceleration: Double,
var ratingBraking: Double,
var ratingSpeeding: Double,
var ratingPhoneUsage: Double,
var ratingTimeOfDay: Double,
var addressStartParts: AddressParts?,
var addressFinishParts: AddressParts?,
/**
* List of tags.
*/
val tags: Array<TrackTag>?
)
data class TrackTag(
/**
* Tag name.
*/
var name: String? = null,
/**
* Source type. Maybe: "Sdk", "UserApp".
*/
var sourceType: String? = null,
/**
* Source. For ex. App module (optional)
*/
var source: String? = null
) {
override fun toString(): String {
return "TrackTag(name=$name, sourceType=$sourceType,
source=$source)"
}
}
Last updated