TOTAL_DURATION

The aggregate operation to obtain the total duration from the retrieved ExerciseType data.

This helps to create an AggregateRequest instance to get the exercise data's total duration simply and easily.

This aggregate operation allows the application to set the following:

// set a Local date range with one week ago including today
val today = LocalDate.now()
val localDateFilter = LocalDateFilter.of(today.minusDays(6), today)
// set the local time group daily
val localDateGroup = LocalDateGroup.of(LocalDateGroupUnit.DAILY, 1)

val aggregateRequest = DataType.ExerciseType.TOTAL_DURATION.requestBuilder
    .setLocalDateFilterWithGroup(localDateFilter, localDateGroup)
    ... // set some filters or conditions
    .build()

Since

1.0.0

See also

Preferences Submitted

You have successfully updated your cookie preferences.