Package ai.nexconn.chat.params
Class GetMessagesAroundTimeParams
-
- All Implemented Interfaces:
public final class GetMessagesAroundTimeParamsParameters for fetching messages around a specific point in time.
Used with ai.nexconn.chat.channel.BaseChannel.getMessagesAroundTime to fetch a specified number of messages before and after the given sent timestamp.
Usage Example:
val params = GetMessagesAroundTimeParams( sentTime = targetMessage.sentTime, beforeCount = 10, afterCount = 10 ) channel.getMessagesAroundTime(params) { messages, error -> if (error == null && messages != null) { // ... } }
-
-
Field Summary
Fields Modifier and Type Field Description private final LongsentTimeprivate final IntegerbeforeCountprivate final IntegerafterCount
-
Constructor Summary
Constructors Constructor Description GetMessagesAroundTimeParams(Long sentTime, Integer beforeCount, Integer afterCount)
-
Method Summary
Modifier and Type Method Description final LonggetSentTime()final IntegergetBeforeCount()final IntegergetAfterCount()-
-
Constructor Detail
-
GetMessagesAroundTimeParams
GetMessagesAroundTimeParams(Long sentTime, Integer beforeCount, Integer afterCount)
- Parameters:
sentTime- Reference sent timestamp in milliseconds.beforeCount- Number of messages to fetch before the reference timestamp.afterCount- Number of messages to fetch after the reference timestamp.
-
-
Method Detail
-
getSentTime
final Long getSentTime()
-
getBeforeCount
final Integer getBeforeCount()
-
getAfterCount
final Integer getAfterCount()
-
-
-
-