history
Deprecated
Use fetchMessages(List<String>, PNBoundedPage, Boolean, Boolean, Boolean, Boolean, Boolean) instead
Fetch historical messages of a channel.
It is possible to control how messages are returned and in what order, for example you can:
Search for messages starting on the newest end of the timeline (default behavior -
reverse = false)Search for messages from the oldest end of the timeline by setting
reversetotrue.Page through results by providing a
startORendtimetoken.Retrieve a slice of the time line by providing both a
startANDendtimetoken.Limit the number of messages to a specific quantity using the
countparameter.
Start & End parameter usage clarity:
If only the
startparameter is specified (withoutend), you will receive messages that are older than and up to thatstarttimetoken value.If only the
endparameter is specified (withoutstart) you will receive messages that match that end timetoken value and newer.Specifying values for both start and end parameters will return messages between those timetoken values (inclusive on the
endvalue)Keep in mind that you will still receive a maximum of 100 messages even if there are more messages that meet the timetoken values. Iterative calls to history adjusting the start timetoken is necessary to page through the full set of results if more than 100 messages meet the timetoken values.
Parameters
Channel to return history messages from.
Timetoken delimiting the start of time slice (exclusive) to pull messages from.
Timetoken delimiting the end of time slice (inclusive) to pull messages from.
Specifies the number of historical messages to return. Default and maximum value is 100.
Whether to traverse the time ine in reverse starting with the oldest message first. Default is false.
Whether to include message timetokens in the response. Defaults to false.
Whether to include message metadata in response. Defaults to false.