1.0.6 • Published 4 years ago
linkv-im v1.0.6
WebIM SDK 参考文档
安装
- 通过
npm包管理器安装并使用 WebIM SDK:
# 最新版本
npm i git+ssh://git@git.joyme.sg:live.me_IM/webim.git --save
# 指定版本号
npm i git+ssh://git@git.joyme.sg:live.me_IM/webim.git#1.0.2 --save/// CommonJS
const { WebIM } = require("webim");
const messenger = new WebIM({ appId: "{Your appId}", appKey: "{Your AppKey}" });/// ESM & TypeScript
import { WebIM } from "webim";
const messenger = new WebIM({ appId: "{Your appId}", appKey: "{Your AppKey}" });- 通过
<script>标签使用 WebIM SDK(其他对应版本的 SDK 文件可以在当前仓库dist/目录下面找到):
<!DOCTYPE html>
<html>
...
<body>
<script src="https://cdn.xxx.com/webim-1.0.2.js"></script>
<script>
const { WebIM } = webim;
const messenger = new WebIM({ appId: "{Your appId}", appKey: "{Your AppKey}" });
</script>
</body>
</html>使用
API 参考
错误码
SDK 开发人员
1.0.6
4 years ago