Releases: emitter-io/go
Releases · emitter-io/go
v2.1.0
What's Changed
Adds the API for the History feature by @Florimond in #37
The History feature was introduced in emitter-io/emitter#414 and allows to retrieve any number of stored messages from a channel between two points in time. The response from the server can be paginated.
To consume these messages, I decided to use the iterator feature from the latest version of Go, 1.23. Thus, retrieving the messages can be done using a simple range loop like so:
for messageHistory, err := range c.History("JN8kaVOZQtG-G6QHnbFzcI-uyS_M3L5q", "test/", 1685608812, 1757293928, 5) {
if err != nil {
//...
}
fmt.Println(messageHistory)
}
Where the 3rd and 4th parameters are two timestamps, and the 5th is the maximum number of messages you'd like to receive between these two timestamps.
New Contributors
Full Changelog: v2.0.9...v2.1.0