Skip to content

ESPRMBase

Defined in: src/ESPRMBase.ts:18

Entry point for the ESP RainMaker Admin SDK. Call ESPRMBase.configure to initialize, then ESPRMBase.getAuthInstance to authenticate.

new ESPRMBase(): ESPRMBase

ESPRMBase

static configure(config): void

Defined in: src/ESPRMBase.ts:35

Initialize the SDK with API base URL and optional settings. Must be called before any other SDK method.

ESPRMBaseConfig

SDK configuration options

void

ESPRMBase.configure({
baseUrl: "https://api.rainmaker.espressif.com",
version: "v1",
});

static getAuthInstance(): ESPRMAuth

Defined in: src/ESPRMBase.ts:60

Get the singleton authentication instance.

ESPRMAuth

The shared ESPRMAuth instance

const auth = ESPRMBase.getAuthInstance();
const user = await auth.login("admin@example.com", "password");