getSchedules

abstract fun getSchedules(unitId: String, endsAfter: String, startsBefore: String? = null, pageConfig: PageConfig? = null, callback: (Result<Paged<TimePeriod>>) -> Unit): Cancelable

Support function to get a paginated TimePeriod for the given unitId.

Note: The purpose of this function is to support clients that can not use Coroutines or the Kotlin programming language!

Since

1.6.0

Return

Cancelable It is your responsibility to cancel this operation, when no longer needed, to avoid memory leaks.

Parameters

unitId

the unit id you will get the schedules.

endsAfter

(ISO 8601) timestamp. You will get bookings that ends after this timestamp.

startsBefore

(ISO 8601) timestamp. You will get bookings that starts before this timestamp. When startsBefore is null you will get all bookings that endsAfter.

pageConfig

configuration for paginated data fetching

callback

receiving the Result with the list of TimePeriod.

abstract fun getSchedules(unitId: String, endsAfter: String, startsBefore: String? = null, pageConfig: PageConfig? = null, lifecycleOwner: LifecycleOwner, callback: (Result<Paged<TimePeriod>>) -> Unit): Cancelable

Support function to get a paginated TimePeriod for the given unitId.

Note: The purpose of this function is to support clients that can not use Coroutines or the Kotlin programming language!

Since

1.9.0

Return

Cancelable In case you want to cancel before Lifecycle.State.DESTROYED

Parameters

unitId

the unit id you will get the schedules.

endsAfter

(ISO 8601) timestamp. You will get bookings that ends after this timestamp.

startsBefore

(ISO 8601) timestamp. You will get bookings that starts before this timestamp. When startsBefore is null you will get all bookings that endsAfter.

pageConfig

configuration for paginated data fetching

lifecycleOwner

auto cancel the Cancelable when lifecycle state is Lifecycle.State.DESTROYED

callback

receiving the Result with the list of TimePeriod.