@zhengxs/dingtalk-event-hubs
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-beta.1 • Public • Published

@zhengxs/dingtalk-event-hubs

安装

# With PNPM
$ pnpm add @zhengxs/dingtalk-auth @zhengxs/dingtalk-event-hubs

示例

import { AuthCredential } from '@zhengxs/dingtalk-auth';
import { HubConnectionBuilder } from '@zhengxs/dingtalk-event-hubs';

async function main() {
  const credential = new AuthCredential({
    clientId: process.env.DINGTALK_CLIENT_ID,
    clientSecret: process.env.DINGTALK_CLIENT_SECRET,
  });

  const connection = new HubConnectionBuilder().withCredential(credential).build();

  connection.on('message', function (payload) {
    console.log(data);
  });

  await connection.start();
}

main();

Readme

Keywords

Package Sidebar

Install

npm i @zhengxs/dingtalk-event-hubs

Weekly Downloads

2

Version

0.0.1-beta.1

License

MIT

Unpacked Size

102 kB

Total Files

63

Last publish

Collaborators

  • zhengxs