Events

Publish your events to the Event API. For more information about setting up your client check this section.

Publish Event

The publish event method send a request to the event api, it requires the event name and model payload.

Go
Ruby
.NET
Node.js
Elixir
PHP

The payload always should be of type byte[]

var payload = []byte(`{ "name": "my-name" } `)
result := reactivehub.PublishEvent(client, "event-id", payload)
reactivehub.publish_event(client, "event-id", payload)

In PostEvent the first parameter is the Name of the Event and the second parameter is the Payload that should be passed as a String.

var result = client.PublishEvent("<event-id>", "<your-payload>");
const result = sdk.publishEvent('<event-id>', {name: 'Payload'});

In PublishEvent the first parameter is the Name of the Event and the second parameter is the Payload that should be passed as a String

iex> ReactivehubSdkElixir.publish_event(config, '<event-name>', payload):ok

In PublishEvent the first parameter is the Name of the Event and the second parameter is the Payload that should be passed as a Array

SDK::publishEvent($config, "<event-name>", <payload>)

Param

Description

client

The authenticated client.

event-id

The id of the event (id property in the event yaml).

payload

Payload of the event (properties of the model property in the event yaml).