Package ai.nexconn.chat.channel.query
Class JoinedGroupsByRoleQuery
-
- All Implemented Interfaces:
-
ai.nexconn.chat.internal.query.PageableQuery
public final class JoinedGroupsByRoleQuery implements PageableQuery<PageResult<GroupInfo>>
Pagination query for joined groups filtered by role.
Implements PageableQuery to provide paginated loading of joined groups. Following the SendBird query pattern, use loadNextPage to load data page by page and hasMore to check if more data is available.
Create an instance via ai.nexconn.chat.channel.GroupChannel.createJoinedGroupsByRoleQuery; it cannot be constructed directly.
Usage example:
val params = JoinedGroupsByRoleQueryParams().apply { role = GroupMemberRole.OWNER count = 50 } val query = GroupChannel.createJoinedGroupsByRoleQuery(params) query.loadNextPage { result, error -> if (error == null && result != null) { // result.data - group list // result.totalCount - total count } if (query.hasMore) { query.loadNextPage { ... } } }
-
-
Method Summary
Modifier and Type Method Description final BooleangetHasMore()BooleanisLoading()UnitloadNextPage(OperationHandler<PageResult<GroupInfo>> handler)-
-
Method Detail
-
getHasMore
final Boolean getHasMore()
-
isLoading
Boolean isLoading()
-
loadNextPage
Unit loadNextPage(OperationHandler<PageResult<GroupInfo>> handler)
-
-
-
-