DataService

interface DataService

Functions

Link copied to clipboard
abstract suspend fun downloadAnxieties(from: Long? = null, fromTime: Long? = null, toTime: Long? = null, limit: Long? = null, sensorId: String? = null): LoadResponse<AnxietyNetwork>
Link copied to clipboard
abstract suspend fun downloadEvents(from: Long? = null, fromTime: Long? = null, toTime: Long? = null, limit: Long? = null, sensorId: String? = null, moduleId: Long): LoadResponse<EventNetwork>
Link copied to clipboard
abstract suspend fun downloadFullSummaries(fromTime: Long? = null, toTime: Long? = null, sensorId: String? = null, limit: Long? = null): LoadResponse<FullSummaryNetwork>
Link copied to clipboard
abstract suspend fun downloadMeals(from: Long? = null, fromTime: Long? = null, toTime: Long? = null, limit: Long? = null, sensorId: String? = null): LoadResponse<MealNetwork>
Link copied to clipboard
abstract suspend fun downloadPressures(from: Long? = null, fromTime: Long? = null, toTime: Long? = null, limit: Long? = null, sensorId: String? = null): LoadResponse<PressureNetwork>
Link copied to clipboard
abstract suspend fun downloadResyncRanges(from: Long? = null, fromTime: Long? = null, toTime: Long? = null, limit: Long? = null, sensorId: String? = null): LoadResponse<ResyncRangeNetwork>
Link copied to clipboard
abstract suspend fun downloadShortSummaries(from: Long? = null, fromTime: Long? = null, toTime: Long? = null, limit: Long? = null, sensorId: String? = null): LoadResponse<ShortSummaryNetwork>
Link copied to clipboard
abstract suspend fun downloadSleepEvents(from: Long? = null, fromTime: Long? = null, toTime: Long? = null, limit: Long? = null, sensorId: String? = null): LoadResponse<EventNetwork>
Link copied to clipboard
abstract suspend fun downloadSleepInfos(from: Long? = null, fromTime: Long? = null, toTime: Long? = null, limit: Long? = null, sensorId: String? = null): LoadResponse<SleepInfoNetwork>
Link copied to clipboard
abstract suspend fun downloadSystemEvents(from: Long? = null, fromTime: Long? = null, toTime: Long? = null, limit: Long? = null, sensorId: String? = null): LoadResponse<EventNetwork>
Link copied to clipboard
abstract suspend fun uploadAnxieties(data: List<AnxietyNetwork>, resync: Boolean = false): StatusResponse
Link copied to clipboard
abstract suspend fun uploadEvents(data: List<EventNetwork>, resync: Boolean = false): StatusResponse
Link copied to clipboard
abstract suspend fun uploadFullSummaries(data: List<FullSummaryNetwork>, resync: Boolean = false): StatusResponse
Link copied to clipboard
abstract suspend fun uploadMeals(data: List<MealNetwork>, resync: Boolean = false): StatusResponse
Link copied to clipboard
abstract suspend fun uploadPressures(data: List<PressureNetwork>, resync: Boolean = false): StatusResponse
Link copied to clipboard
abstract suspend fun uploadResyncRanges(data: List<ResyncRangeNetwork>, resync: Boolean = false): StatusResponse
Link copied to clipboard
abstract suspend fun uploadShortSummaries(data: List<ShortSummaryNetwork>, resync: Boolean = false): StatusResponse
Link copied to clipboard
abstract suspend fun uploadSleepEvents(data: List<SleepEventNetwork>, resync: Boolean = false): StatusResponse
Link copied to clipboard
abstract suspend fun uploadSleepInfos(data: List<SleepInfoNetwork>, resync: Boolean = false): StatusResponse
Link copied to clipboard
abstract suspend fun uploadSystemEvents(data: List<SystemEventNetwork>, resync: Boolean = false): StatusResponse

Extensions

Link copied to clipboard
fun DataService.loadShortSummary(from: Long? = null, fromTime: Long? = null, toTime: Long? = null, limit: Long? = null, sensorId: String? = null, dispatcher: CoroutineDispatcher): Single<LoadResponse<ShortSummaryNetwork>>
Link copied to clipboard
fun DataService.uploadEvents(data: List<EventNetwork>, dispatcher: CoroutineDispatcher): Single<StatusResponse>