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 { ... }
        }
    }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Boolean hasMore
      private final Boolean isLoading
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description