getBookableUnits

abstract fun getBookableUnits(parentUnitId: String? = null, pageConfig: PageConfig?, endsAfter: String, callback: (Result<Paged<SensorbergUnit.BookableUnit>>) -> Unit): Cancelable

Support function to get BookableUnit's in a paginated way. Returns a single page with key to next page.

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

Since

1.5.0

Return

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

Parameters

parentUnitId

(optional) the id of the parent unit. When set you will get the child units only.

pageConfig

(optional) sets the configuration for loading the next page.

callback

gives you the result of paged bookable units.

endsAfter

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

abstract fun getBookableUnits(parentUnitId: String? = null, pageConfig: PageConfig?, endsAfter: String, lifecycleOwner: LifecycleOwner, callback: (Result<Paged<SensorbergUnit.BookableUnit>>) -> Unit): Cancelable

Support function to get BookableUnit's in a paginated way. Returns a single page with key to next page.

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

parentUnitId

(optional) the id of the parent unit. When set you will get the child units only.

pageConfig

(optional) sets the configuration for loading the next page.

endsAfter

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

lifecycleOwner

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

callback

gives you the result of paged bookable units.