Class ChannelsQueryParams

  • All Implemented Interfaces:

    
    public final class ChannelsQueryParams
    
                        

    Channel list pagination query parameters.

    Used with ai.nexconn.chat.channel.BaseChannel.createChannelsQuery to create a pagination query object. All parameters are immutable after creation to ensure consistency during the query process.

    Usage Example:

    val params = ChannelsQueryParams(
        channelTypes = listOf(ChannelType.DIRECT, ChannelType.GROUP)
    ).apply {
        pageSize = 20
        topPriority = true
    }
    val query = BaseChannel.createChannelListQuery(params)
    query.loadNextPage { list, error ->
        // ...
    }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Integer getPageSize() Number of items per page.
      final Unit setPageSize(Integer pageSize) Number of items per page.
      final Boolean getTopPriority() Whether pinned channels are returned first.
      final Unit setTopPriority(Boolean topPriority) Whether pinned channels are returned first.
      final Long getStartTime() Start timestamp (milliseconds) for the query.
      final Unit setStartTime(Long startTime) Start timestamp (milliseconds) for the query.
      final List<ChannelType> getChannelTypes()
      String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ChannelsQueryParams

        ChannelsQueryParams(List<ChannelType> channelTypes)
        Parameters:
        channelTypes - List of channel types to query.
    • Method Detail

      • getPageSize

         final Integer getPageSize()

        Number of items per page. Defaults to 20.

      • setPageSize

         final Unit setPageSize(Integer pageSize)

        Number of items per page. Defaults to 20.

      • getTopPriority

         final Boolean getTopPriority()

        Whether pinned channels are returned first.

        When true, pinned channels are prioritized in the results. When false, results are sorted by time only. Defaults to true.

      • setTopPriority

         final Unit setTopPriority(Boolean topPriority)

        Whether pinned channels are returned first.

        When true, pinned channels are prioritized in the results. When false, results are sorted by time only. Defaults to true.

      • getStartTime

         final Long getStartTime()

        Start timestamp (milliseconds) for the query.

        Channels will be fetched starting from this timestamp. Defaults to 0, which starts from the latest channel.

      • setStartTime

         final Unit setStartTime(Long startTime)

        Start timestamp (milliseconds) for the query.

        Channels will be fetched starting from this timestamp. Defaults to 0, which starts from the latest channel.