6.1.2 • Published 29 days ago
@ambassify/eventbus-client v6.1.2
EventBus-client
A client to publish events to eventbus
.
Installation
npm install --save eventbus-client
Usage
const { Client } = require('eventbus-client');
const eventbus = new Client({
baseUrl: 'https://eventbus-endpoint'
});
eventbus.send('event_name', payload, options);
new EventBus()
new EventBus({ endpoint, [token, tokenType], [timeout] })
- endpoint: The endpoint of the eventbus service.
- token: The accessToken to use when none was set for the
.send()
call. - tokenType: The tokenType to use when setting the Authorization headerj.
- timeout: The duration for which events are batched before publishing them.
.send()
.send(eventName, payload, options)
- eventName: The event to publish. Example:
item_created
- payload: Any object that can be serialized using
JSON.stringify
- options: An object with any one of the following options set:
- orgId: The organization ID to publish to.
- userId: The user ID to publish to.
- id: The ID of the object in
payload
- type: The type of the object in
payload
6.1.2
29 days ago
6.1.0
8 months ago
6.1.1
7 months ago
6.0.2
8 months ago
6.0.1
11 months ago
5.0.4
12 months ago
6.0.0
12 months ago
5.0.3
1 year ago
5.0.2
1 year ago
5.0.1
2 years ago
5.0.0
3 years ago
4.1.0
3 years ago
4.0.0
3 years ago
3.3.1
4 years ago
3.3.0
4 years ago
3.2.3
4 years ago
3.2.2
4 years ago
3.2.1
4 years ago
3.2.0
4 years ago
3.1.2
4 years ago
3.1.1
4 years ago
3.1.0
4 years ago
3.0.1
4 years ago
3.0.0
4 years ago
2.3.0
4 years ago
2.2.0
5 years ago
2.1.1
5 years ago
2.1.0
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.3.0
5 years ago
1.2.6
5 years ago
1.2.5
5 years ago
1.2.4
5 years ago
1.2.3
6 years ago
1.2.2
6 years ago
1.2.1
6 years ago
1.2.0
6 years ago