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

Update writeBufferRequestBacklog() parameters and add writeBufferRequestBacklogAll() #42

Merged
merged 3 commits into from
Jun 4, 2018

Conversation

clue
Copy link
Owner

@clue clue commented Jun 4, 2018

The writeBufferRequestBacklog() method can be used to export the channel backlog (chat history). This method now uses the parameters as-is as defined by the underlying network protocol. This is a BC break with existing code, so this PR adds relevant documentation, examples and tests:

// old
$client->writeBufferRequestBacklog($bufferId, 100);

// new
$client->writeBufferRequestBacklog($bufferId, -1, -1, 100, 0);

Additionally, this PR implements the writeBufferRequestBacklogAll() method which allows you to fetch the backlog from all buffers/channels at once:

// new
$client->writeBufferRequestBacklogAll(-1, -1, 100, 0);

This PR includes a new example which shows how both methods can be used to export the chat history. This can be used as a base to build an interactive chat application or to export this to any kind of export format, such as RSS/Atom etc. (make sure to follow https://github.com/clue/quasselio for details).

Builds on top of #41

@clue clue added this to the v0.7.0 milestone Jun 4, 2018
@clue clue merged commit 6fa93ac into clue:master Jun 4, 2018
@clue clue deleted the backlog branch June 4, 2018 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant