books

fun books(tokenProvider: TokenProvider, analyticsListener: AnalyticsListener? = null, configuration: EditionsConfiguration = EditionsConfiguration(), bookOpening: BookOpening? = null, readingListHost: ReadingListHost? = null, articleOpener: ArticleOpener? = null, navigationDelegate: LibraryNavigationDelegate? = null, coverOverlayProvider: BookCoverOverlayProvider? = null, categoryListIconProvider: CategoryListIconProvider? = null, bindingOverrideAdapterFactory: BindingOverrideAdapterFactory? = null, fontProvider: DataBindingValueProvider.Fonts? = null, colorProvider: DataBindingValueProvider.Colors? = null, extraCompositions: Collection<String> = emptyList(), completion: (BookLibraryController?) -> Unit)

Creates and initializes a BookLibraryController instance, or provides the existing instance if one has already been created. Note that this method handles calling Editions.initialize too.

The return value of completion is null if start hasn't been called or if creating the instance fails for any reason, e.g. a network issue.

You must still call BookLibraryController.start to properly initialize Books.

This method also creates AdManager and Editions instances, so calling ads and/or editions is unnecessary unless you need those instances.


suspend fun books(tokenProvider: TokenProvider, analyticsListener: AnalyticsListener? = null, configuration: EditionsConfiguration = EditionsConfiguration(), bookOpening: BookOpening? = null, readingListHost: ReadingListHost? = null, articleOpener: ArticleOpener? = null, navigationDelegate: LibraryNavigationDelegate? = null, coverOverlayProvider: BookCoverOverlayProvider? = null, categoryListIconProvider: CategoryListIconProvider? = null, bindingOverrideAdapterFactory: BindingOverrideAdapterFactory? = null, fontProvider: DataBindingValueProvider.Fonts? = null, colorProvider: DataBindingValueProvider.Colors? = null, analyticsEventListener: BooksAnalyticsEventListener? = null, extraCompositions: Collection<String> = emptyList()): BookLibraryController

Creates and initializes a BookLibraryController instance, or provides the existing instance if one has already been created. Note that this method handles calling Editions.initialize too.

You must still call BookLibraryController.start to properly initialize Books.

This method also creates AdManager and Editions instances, so calling ads and/or editions is unnecessary unless you need those instances.

Throws

if start has not been called.

Other error exceptions may also be thrown if creating the BookLibraryController instance fails for any reason, e.g. a network issue.