Variable LiveObjectsConst

LiveObjects: any

The LiveObjects plugin that provides a RestClient or RealtimeClient instance with the ability to use LiveObjects functionality.

To create a client that includes this plugin, include it in the client options that you pass to the RestClient.constructor or RealtimeClient.constructor:

import { Realtime } from 'ably';
import { LiveObjects } from 'ably/liveobjects';
const realtime = new Realtime({ ...options, plugins: { LiveObjects } });

The LiveObjects plugin can also be used with a BaseRest or BaseRealtime client.

import { BaseRealtime, BaseRest, WebSocketTransport, FetchRequest } from 'ably/modular';
import { LiveObjects } from 'ably/liveobjects';
const realtime = new BaseRealtime({ ...options, plugins: { WebSocketTransport, FetchRequest, LiveObjects } });
const rest = new BaseRest({ ...options, plugins: { FetchRequest, LiveObjects } });

You can also import individual utilities alongside the plugin:

import { LiveObjects, LiveCounter, LiveMap } from 'ably/liveobjects';

Generated using TypeDoc