From c27340eddce7340bf1173ede51cc4f8a187be0bb Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 16 May 2021 18:33:08 +0900 Subject: [PATCH] Update README.md --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a018bb6594..4dc761c7c9 100644 --- a/README.md +++ b/README.md @@ -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); +}); +``` ---