healbesdk / com.healbe.healbesdk.business_api.healthdata / HealthData / getSleepEvents

getSleepEvents

abstract fun getSleepEvents(nightsBack: Int): Flowable<List<SleepEvent>>

Returns Flowable that emits list of sleep events for night nightsBack ago.

Night starts at 21 o'clock.

For example if current time is June 2 21:00 than 1 nightsBack will return sleep from June 1 21:00 to June 2 12:00.

But if current time is June 2 20:00 than 1 nightsBack will return sleep from May 31 21:00 to June 1 12:00.

Parameters

nightsBack - for how many days ago in relation to today information is needed

Return
Flowable that emits list of asleep events for night nightsBack ago

See Also

SleepEvent