Update README.md

This commit is contained in:
syuilo 2021-05-16 18:33:08 +09:00
parent 57c6e7f823
commit c27340eddc

View File

@ -28,7 +28,15 @@ const meta = await cli.request('meta', { detail: true });
``` ```
## Streaming ## Streaming
todo ``` ts
import * as Misskey from 'misskey-js';
const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' });
const mainChannel = stream.useSharedConnection('main');
mainChannel.on('notification', notification => {
console.log('notification received', notification);
});
```
--- ---