Content
Everything the catalogue holds — articles, issues, videos, media and publications — as seen by the profile currently active on the session.
Obtained from CGS.content. Each domain is its own small service with the same two shapes:
get(id, scope)observes one item as aStateFlowof CgsStreamStateall(…, scope)returns a PaginatedResource you observe through itsstateand advance withloadNextPage()
val issues = CGS.content().issues.all(pageSize = 20, scope = viewModelScope)
issues.state.collect { state ->
render(state.items)
if (state.canLoadMore) issues.loadNextPage()
}Session awareness
Every accessor here follows the session. When the active profile or the language changes, whatever was loaded is dropped and requested again against the new session — you never have to re-request after switching profiles. A refresh that fails is reported as a failure with no stale data attached, so a screen never shows one profile's content under another's.
Lifecycle
All of it is bound to the CoroutineScope you pass in: requests stop once nothing collects anymore, and resume on the next collection. Pass the scope of whatever is displaying the data — a viewModelScope, typically — and there is nothing to release by hand.