1.0.3 • Published 2 years ago

linkv-webim v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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 开发人员