observeSleepEvents

abstract fun observeSleepEvents(from: Timestamp, to: Timestamp, vararg events: SleepEventType): Flowable<List<SleepEvent>>

Returns Flowable that emits list of sleep events filtered by events for specified period sorted ascending by time.

If events is empty, all events will be returned.

Return

Flowable that emits list of asleep events for day daysBack ago

See also

Parameters

from

minimum timestamp for first sleep event.

to

maximum timestamp for last sleep event.

events

returns only specified sleep type. If not specified, all events will be returned.