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

getSleepEpisodes

abstract fun getSleepEpisodes(nightsBack: Int): Flowable<List<SleepEpisode>>

Returns Flowable that emits list of episodes of sleep 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 episodes of sleep for night nightsBack ago

See Also

SleepEpisode

abstract fun getSleepEpisodes(from: Long, to: Long): Flowable<List<SleepEpisode>>

Returns Flowable that emits list of episodes of sleep for period from from to to.

Parameters

from - minimum UNIX-timestamp of sleep episode

to - maximum UNIX-timestamp of sleep episode

Return
Flowable that emits list of sleep episodes

See Also

SleepEpisode

abstract fun getSleepEpisodes(sinceTimestamp: Long): Flowable<List<SleepEpisode>>

Returns Flowable that emits list of episodes of sleep since specified time.

Parameters

sinceTimestamp - minimum timestamp of episodes of sleep

Return
Flowable that emits list of episodes of sleep since specified time

See Also

SleepEpisode