@sodazone/ocelloids-client - v4.0.0
    Preparing search index...

    Function createInformantAgent

    • Creates an 'informant' agent instance.

      Parameters

      • optsOrClient: OcelloidsClientConfig | OcelloidsClient

        Configuration options for the OcelloidsClient, or an existing OcelloidsClient instance.

      Returns SubscribableApi<AnySubscriptionInputs, AnyJson> & OcelloidsClientApi

      An object with methods for subscribing to events and accessing general client API methods.

      import { createInformantAgent } from "@sodazone/ocelloids-client";

      const agent = createInformantAgent({
      httpUrl: "http://127.0.0.1:3000",
      wsUrl: "ws://127.0.0.1:3000"
      });

      // Subscribe to general events
      const ws = await agent.subscribe(...);