Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds the new history API #414

Merged
merged 2 commits into from
Jan 28, 2024
Merged

Adds the new history API #414

merged 2 commits into from
Jan 28, 2024

Conversation

Florimond
Copy link
Member

The history api allows to retrieve any number of messages stored in a channel. As the number of messages that can return in a single response is limited by the size of a response (as per #413), a system of pagination is required. This system is implemented with the introduction of the StartFromID query parameter. An client that already received a response with a certain number of messages can send a new request to the API with the StartFromID set to the ID of the last message it received. The storage query will then start retreiving messages starting at that ID to provide the API the next page of messages in its response.

@Florimond Florimond self-assigned this Nov 21, 2023
@coveralls
Copy link

coveralls commented Nov 21, 2023

Coverage Status

coverage: 92.864% (-0.2%) from 93.085%
when pulling b6a5ef8 on history_api
into 374de74 on master.

The history api allows to retrieve any number of messages stored in a channel.
As the number of messages that can be returned in a single response is limited
by the size of a response (as per #413), a system of pagination is required.
This system is implemented with the introduction of the StartFromID query
parameter. An client that already received a response with a certain number of
messages can send a new request to the API with the StartFromID set to the ID
of the oldest message it received (first in the array). The storage query will
then begin to retrieve messages starting at the ID preceding the ID provided in
the query, to generate the next page of messages.
@Florimond Florimond merged commit 4418034 into master Jan 28, 2024
3 checks passed
@Florimond Florimond deleted the history_api branch January 28, 2024 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants