all

abstract fun all(pageSize: Int = 20, scope: CoroutineScope): PaginatedResource<IssueShort>

Retrieves a paginated list of issue content accessible to the current user profile.

The returned PaginatedResource's reactivity (restarting on account or profile change, and on auth state changes) is bound to scope: its internal machinery stops five seconds after PaginatedResource.state loses its last collector, and resumes on the next collection.

Return

A PaginatedResource wrapping the fetched co.cafeyn.cgs.api.model.IssueShort.

Parameters

pageSize

Specify a limit for the number of items returned per page.

scope

The CoroutineScope used to bound the lifecycle of the returned PaginatedResource.


abstract fun all(issueIds: List<IssueId>, publicationIds: List<PublicationId>, dates: DateRange? = null, pageSize: Int = 20, scope: CoroutineScope): PaginatedResource<IssueShort>

Retrieves a paginated list of issue content accessible to the current user profile filtered by issueIds and publicationIds, optionally narrowed to the issues released within dates.

The returned PaginatedResource's reactivity (restarting on account or profile change, and on auth state changes) is bound to scope: its internal machinery stops five seconds after PaginatedResource.state loses its last collector, and resumes on the next collection.

Return

A PaginatedResource wrapping the fetched co.cafeyn.cgs.api.model.IssueShort. Returns a PaginatedResource in an error state with co.cafeyn.cgs.api.errors.CgsError.Content.NotFound if both id lists are empty — dates narrows a search, it cannot stand in as the only filter.

Parameters

issueIds

Issue identifiers to query. Empty leaves this filter out.

publicationIds

Publication identifiers to query. Empty leaves this filter out.

dates

Optional release-date window to restrict the results to. Pair it with co.cafeyn.cgs.api.model.Publication.availableYears and DateRange.ofYear to page through one year of a publication's archives at a time; null leaves the results unrestricted.

pageSize

Specify a limit for the number of items returned per page.

scope

The CoroutineScope used to bound the lifecycle of the returned PaginatedResource.