EditionProvider

interface EditionProvider

Interface to get the the editions available since the latest feed update, see Editions.updateFeed.

Functions

Link copied to clipboard
abstract fun edition(id: UUID, callback: (Edition?) -> Unit)

Get an Edition from its UUID.

Link copied to clipboard

Coroutine version of EditionProvider.edition.

Link copied to clipboard
abstract fun editionCounts(productTags: List<String>? = null, callback: (EditionCounts) -> Unit)

Returns a map of the form {year: {month: count}}, where count is the count of Editions that month. You can narrow the results down with productTags. An empty map is returned on errors.

Link copied to clipboard
suspend fun EditionProvider.editionCountsAsync(productTags: List<String>? = null): EditionCounts

Coroutine version of EditionProvider.editionCounts.

Link copied to clipboard
abstract fun editions(title: String, productTag: String, pageSize: Int? = null): Paginator

Get all Editionss matching the given title and productTag. Editions in the Paginator are sorted by date, in descending order.

abstract fun editions(productTags: List<String>? = null, startDate: Date? = null, endDate: Date? = null, pageSize: Int? = null): Paginator

Method for getting editions. It returns a Paginator object that can be used to iterate over the requested editions. Editions are sorted by date with newer editions first. You can specify filters productTags, startDate (date >= startDate), endDate (date < endDate) and a page size pageSize for the paginator. When pageSize is null, the method will return a Paginator with ALL the Editions matching the filters in a single Page.