Class: default

MujianSdkLite

Description

幕间 SDK 的轻量级客户端,用于在浏览器中获取 API 配置。

Example

(window as any).$mujian_lite.init().then(() => {
   console.log((window as any).$mujian_lite.openapi.baseURL); // API 的 URL
   console.log((window as any).$mujian_lite.openapi.apiKey); // API 的 KEY (当前用户唯一)
 });

Accessors

openapi

Get Signature

get openapi(): { apiKey: string; baseURL: string; } | undefined

获取 API 配置

Returns

{ apiKey: string; baseURL: string; } | undefined

{ baseURL: API 的 URL, apiKey: API 的 KEY }

Methods

init()

init(): Promise<void>

初始化

Returns

Promise<void>