@meet-im/meet-bot-jssdk 0.0.1 → 0.0.2
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/README.md +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# @meet/meet-bot-jssdk
|
|
1
|
+
# @meet-im/meet-bot-jssdk
|
|
2
2
|
|
|
3
3
|
MeetIM Chatbot JavaScript SDK - 支持 Long Polling 消息获取和消息发送
|
|
4
4
|
|
|
5
5
|
## 安装
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
pnpm add @meet/meet-bot-jssdk
|
|
8
|
+
pnpm add @meet-im/meet-bot-jssdk
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## 快速开始
|
|
@@ -13,7 +13,7 @@ pnpm add @meet/meet-bot-jssdk
|
|
|
13
13
|
### 类实例风格
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { MeetBot } from '@meet/meet-bot-jssdk'
|
|
16
|
+
import { MeetBot } from '@meet-im/meet-bot-jssdk'
|
|
17
17
|
|
|
18
18
|
const bot = new MeetBot({
|
|
19
19
|
token: 'bot_id:secret',
|
|
@@ -34,7 +34,7 @@ bot.startPolling()
|
|
|
34
34
|
### 函数式风格
|
|
35
35
|
|
|
36
36
|
```typescript
|
|
37
|
-
import { getUpdates, sendMessage } from '@meet/meet-bot-jssdk'
|
|
37
|
+
import { getUpdates, sendMessage } from '@meet-im/meet-bot-jssdk'
|
|
38
38
|
|
|
39
39
|
const token = 'bot_id:secret'
|
|
40
40
|
const baseUrl = 'https://staging-meet-api.miyachat.com'
|
|
@@ -190,7 +190,7 @@ SDK 提供以下错误类型:
|
|
|
190
190
|
| `ValidationError` | 参数验证错误 |
|
|
191
191
|
|
|
192
192
|
```typescript
|
|
193
|
-
import { ApiError, NetworkError } from '@meet/meet-bot-jssdk'
|
|
193
|
+
import { ApiError, NetworkError } from '@meet-im/meet-bot-jssdk'
|
|
194
194
|
|
|
195
195
|
try {
|
|
196
196
|
await bot.sendMessage(sessionInfo, { content: 'Hello' })
|