Skip to content

Commit

Permalink
fix: 修改错误拼写
Browse files Browse the repository at this point in the history
  • Loading branch information
14K authored and Joy-Wang committed Dec 23, 2021
1 parent 9c2f6ff commit 56a7270
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -17,7 +17,7 @@ npm install --save-dev @tencent-connect/bot-node-sdk
### 2、引用

```ts
import { creatOpenAPI, createWebsocket } from '@tencent-connect/bot-node-sdk';
import { createOpenAPI, createWebsocket } from '@tencent-connect/bot-node-sdk';
```

### 3、配置入参
Expand All @@ -39,7 +39,7 @@ shards: Websocket分片信息,暂时默认为1,即为单例模式,后续
### 4、方法引用

```ts
const client = creatOpenAPI(botConfig);
const client = createOpenAPI(botConfig);
const ws = createWebsocket(botConfig);

// 消息监听
Expand Down
4 changes: 2 additions & 2 deletions example/client.js
@@ -1,8 +1,8 @@
import { creatOpenAPI } from '@tencent-connect/bot-node-sdk';
import { createOpenAPI } from '@tencent-connect/bot-node-sdk';

const testConfig = {
appID: '',
token: '',
};

export const client = creatOpenAPI(testConfig);
export const client = createOpenAPI(testConfig);
4 changes: 2 additions & 2 deletions example/index.js
@@ -1,11 +1,11 @@
import { creatOpenAPI, createWebsocket } from '@tencent-connect/bot-node-sdk';
import { createOpenAPI, createWebsocket } from '@tencent-connect/bot-node-sdk';

const testConfig = {
BotAppID: '',
BotToken: '',
};

const client = creatOpenAPI(testConfig);
const client = createOpenAPI(testConfig);

const testConfigWs = {
appID: '',
Expand Down
2 changes: 1 addition & 1 deletion src/bot.ts
Expand Up @@ -21,7 +21,7 @@ export function selectOpenAPIVersion(version: APIVersion) {
defaultImpl = versionMapping[version];
}
// 如果需要使用其他版本的实现,需要在调用这个方法之前调用 SelectOpenAPIVersion 方法
export function creatOpenAPI(config: Config) {
export function createOpenAPI(config: Config) {
return defaultImpl.newClient(config);
}
// ws连接新建
Expand Down

0 comments on commit 56a7270

Please sign in to comment.