getCollection

fun getCollection(    collectionAlias: String,     listener: ArcXPContentCallback? = null,     shouldIgnoreCache: Boolean = false,     from: Int = 0,     size: Int = DEFAULT_PAGINATION_SIZE,     preLoading: Boolean? = null): LiveData<Either<ArcXPException, Map<Int, ArcXPContentElement>>>

This function requests a collection result by content alias

returns result either through callback interface or livedata

Return

LiveData subscribe to this livedata for successful results (or use optional callback interface) Note: this will always return same live data, can subscribe directly one time collectionLiveData, listener will have individual results per call

Parameters

collectionAlias

Content Alias

listener

Callback interface for optional callback

override ArcXPContentCallback.onGetCollectionSuccess for success

override ArcXPContentCallback.onError for failure

or leave null and use livedata result and error livedata

shouldIgnoreCache

if true, we ignore caching for this call only

from

index in which to start (ie for pagination, you may want to start at index for next page)

size

number of entries to request: (valid range VALID_COLLECTION_SIZE_RANGE, will coerce parameter into this range if it is outside)

preLoading

: Boolean should we call collection full? if nothing is entered, will default to ArcXPContentConfig.preLoading value