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.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ESPRMBase():
ESPRMBase
Returns
Section titled “Returns”ESPRMBase
Methods
Section titled “Methods”configure()
Section titled “configure()”
staticconfigure(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.
Parameters
Section titled “Parameters”config
Section titled “config”SDK configuration options
Returns
Section titled “Returns”void
Example
Section titled “Example”ESPRMBase.configure({ baseUrl: "https://api.rainmaker.espressif.com", version: "v1",});getAuthInstance()
Section titled “getAuthInstance()”
staticgetAuthInstance():ESPRMAuth
Defined in: src/ESPRMBase.ts:60
Get the singleton authentication instance.
Returns
Section titled “Returns”The shared ESPRMAuth instance
Example
Section titled “Example”const auth = ESPRMBase.getAuthInstance();const user = await auth.login("admin@example.com", "password");