Publications

interface Publications

The publication catalogue: the titles issues are published under — a magazine, a newspaper, a video channel.

Reached through Content.publications. get resolves one publication in full, including Publication.availableYears for building an archives browser, while the all overloads list them in their light PublicationShort form.

val titles = CGS.content().publications.all(scope = viewModelScope)

Everything here follows the active profile and is bound to the scope you pass — see Content.

Functions

Link copied to clipboard
abstract fun all(pageSize: Int = 20, scope: CoroutineScope): PaginatedResource<PublicationShort>

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

abstract fun all(publicationIds: List<PublicationId>, topicIds: List<TopicId>, pageSize: Int = 20, scope: CoroutineScope): PaginatedResource<PublicationShort>

Retrieves a paginated list of publication content accessible to the current user profile filtered by publicationIds and topicIds.

Link copied to clipboard
abstract suspend fun get(id: PublicationId, scope: CoroutineScope): StateFlow<CgsStreamState<Publication?>>

Observes a publication by its identifier, reacting to changes in the active session.