Class HistoryMessageOption

    • Constructor Detail

      • HistoryMessageOption

        HistoryMessageOption()
    • Method Detail

      • getDataTime

         long getDataTime()

        Retrieves the starting point for message retrieval. This corresponds to the `sentTime` in the message. If no messages exist in the local database, pass `0` for the first retrieval. Otherwise, pass the `sentTime` of the earliest message to fetch the latest `count` messages.

        Returns:

        The starting point for message retrieval. This corresponds to the `sentTime` in the message. If no messages exist in the local database, pass `0` for the first retrieval. Otherwise, pass the `sentTime` of the earliest message to fetch the latest `count` messages.

      • setDataTime

         void setDataTime(long dataTime)

        Sets the starting point for message retrieval. This corresponds to the `sentTime` in the message. If there are no messages in the local database, pass `0` for the first retrieval. Otherwise, pass the `sentTime` of the earliest message to retrieve the latest `count` messages.

        Parameters:
        dataTime - The starting point for message retrieval.
      • getCount

         int getCount()

        Specifies the number of messages to retrieve, with a maximum of 100.

        Returns:

        The number of messages to retrieve, up to a maximum of 100.

      • setCount

         void setCount(int count)

        Sets the number of messages to retrieve, with a maximum of 100.

        Parameters:
        count - Specifies the number of messages to retrieve, with a maximum of 100.
      • getOrder

         int getOrder()

        Get the pull order. 0: Descending order, combined with the passed timestamp parameter, retrieves messages with increasing send time; 1: Ascending order, combined with the passed timestamp parameter, retrieves messages with decreasing send time.

        Returns:

        The pull order. 0: Descending order, combined with the passed timestamp parameter, retrieves messages with increasing send time; 1: Ascending order, combined with the passed timestamp parameter, retrieves messages with decreasing send time.