diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-05-16 18:33:08 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-05-16 18:33:08 +0900 |
| commit | c27340eddce7340bf1173ede51cc4f8a187be0bb (patch) | |
| tree | a7764c66773120d5176c3927a355d2e6caa67cfa | |
| parent | Update README.md (diff) | |
| download | misskey-c27340eddce7340bf1173ede51cc4f8a187be0bb.tar.gz misskey-c27340eddce7340bf1173ede51cc4f8a187be0bb.tar.bz2 misskey-c27340eddce7340bf1173ede51cc4f8a187be0bb.zip | |
Update README.md
| -rw-r--r-- | README.md | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -28,7 +28,15 @@ const meta = await cli.request('meta', { detail: true }); ``` ## 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); +}); +``` --- |