Package ai.nexconn.chat.channel.query
Class GroupMembersByRoleQuery
-
- All Implemented Interfaces:
-
ai.nexconn.chat.internal.query.PageableQuery
public final class GroupMembersByRoleQuery implements PageableQuery<PageResult<GroupMemberInfo>>
Pagination query for group members filtered by role.
Implements PageableQuery to provide paginated loading of group members filtered by role. 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.createGroupMembersByRoleQuery; it cannot be constructed directly.
Usage example:
val params = MembersByRoleQueryParams().apply { role = GroupMemberRole.MANAGER pageSize = 50 } val query = groupChannel.createMembersByRoleQuery(params) query.loadNextPage { result, error -> if (error == null && result != null) { // result.data - member list // result.totalCount - total count } if (query.hasMore) { query.loadNextPage { ... } } }
-
-
Method Summary
Modifier and Type Method Description final BooleangetHasMore()BooleanisLoading()UnitloadNextPage(OperationHandler<PageResult<GroupMemberInfo>> handler)-
-
Method Detail
-
getHasMore
final Boolean getHasMore()
-
isLoading
Boolean isLoading()
-
loadNextPage
Unit loadNextPage(OperationHandler<PageResult<GroupMemberInfo>> handler)
-
-
-
-