easemob-websdk 3.6.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
- "name": "easemob-websdk",
3
- "version": "3.6.0",
4
- "description": "Easemob IM websdk",
5
- "main": "websdk3.6.0",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "author": "easemob",
10
- "license": "ISC"
2
+ "name": "easemob-websdk",
3
+ "version": "4.0.0",
4
+ "description": "Easemob chat websdk",
5
+ "main": "Easemob-chat",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "easemob",
10
+ "typings": "Easemob-chat.d.ts",
11
+ "license": "ISC"
11
12
  }
package/readme.md CHANGED
@@ -5,22 +5,22 @@ sdk提供完整的即时消息功能开发功能,屏蔽/封装并阻止其内
5
5
 
6
6
  ## 可以通过以下方式引用 WebSDK:
7
7
 
8
- 1.安装
9
-
8
+ 1. 安装
10
9
  ```
11
10
  npm install easemob-websdk --save
12
11
  ```
13
- 2. 先引入 ,再访问 WebIM 。
12
+
13
+ 2. 先引入,再访问 WebIM。
14
14
  ```
15
15
  import websdk from 'easemob-websdk'
16
16
  ```
17
17
 
18
18
  3、初始化SDK
19
19
  ```js
20
- const conn = WebIM.conn = new WebIM.connection({
20
+ const WebIM = {}
21
+ const conn = WebIM.conn = new websdk.connection({
21
22
  appKey: 'your app key',
22
- isHttpDNS: true,
23
- https: true
23
+ isHttpDNS: true
24
24
  })
25
25
  ```
26
26
 
@@ -28,8 +28,7 @@ const conn = WebIM.conn = new WebIM.connection({
28
28
  ```js
29
29
  const options = {
30
30
  user: 'username',
31
- pwd: 'password',
32
- appKey: 'your app key'
31
+ pwd: 'password'
33
32
  };
34
33
  conn.open(options);
35
34
  ```