The TypeScript SDK can be installed via your favourite package manager, e.g. pnpm
The SailhouseClient
class from the package has everything we need to get started.
Provided you have generated a token, you can create a client from the class.
The client has an async publish
method for sending data to a given topic.
The second argument can be any object. Ideally, this should just be a map, as the contents are stringified via JSON.stringify(...)
and we don’t want that to get messy.
The client has a getEvents
method for pull subscriptions.
The TypeScript SDK can be installed via your favourite package manager, e.g. pnpm
The SailhouseClient
class from the package has everything we need to get started.
Provided you have generated a token, you can create a client from the class.
The client has an async publish
method for sending data to a given topic.
The second argument can be any object. Ideally, this should just be a map, as the contents are stringified via JSON.stringify(...)
and we don’t want that to get messy.
The client has a getEvents
method for pull subscriptions.