Skip to content

Conversation

@WillSewell
Copy link
Contributor

Adds support for a new experimental feature of the Channels API:
Specifically the ability to specify an info parameter in a
trigger body, or with an event in a batch trigger body. The server
will respond with attributes in the same format as the /channels
endpoint.

The info param is specified in a "params" object, which is
passed in as the fourth parameter to the trigger method. The
socket_id parameter is specified in the same way.

Note: this introduces a breaking change for users that were
passing in a socket_id.

It is not a breaking change for triggerBatch.

triggerBatch has also been updated to support socket_id being
included as part of event objects.

Resolves #134.

@WillSewell WillSewell self-assigned this Feb 11, 2021
Adds support for a new experimental feature of the Channels API:
Specifically the ability to specify an `info` parameter in a
trigger body, or with an event in a batch trigger body. The server
will respond with attributes in the same format as the `/channels`
endpoint.

The `info` param is specified in a "params" object, which is
passed in as the fourth parameter to the `trigger` method. The
`socket_id` parameter is specified in the same way.

Note: this introduces a breaking change for users that were
passing in a `socket_id`.

It is not a breaking change for `triggerBatch`.

`triggerBatch` has also been updated to support `socket_id` being
included as part of event objects.
Copy link

@jonathanlloyd jonathanlloyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@WillSewell WillSewell merged commit 85c8c14 into master Feb 18, 2021
@WillSewell WillSewell deleted the publish-info branch February 18, 2021 16:36
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.

Support info parameter for trigger requests

3 participants