summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-05-16 18:33:08 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-05-16 18:33:08 +0900
commitc27340eddce7340bf1173ede51cc4f8a187be0bb (patch)
treea7764c66773120d5176c3927a355d2e6caa67cfa
parentUpdate README.md (diff)
downloadmisskey-c27340eddce7340bf1173ede51cc4f8a187be0bb.tar.gz
misskey-c27340eddce7340bf1173ede51cc4f8a187be0bb.tar.bz2
misskey-c27340eddce7340bf1173ede51cc4f8a187be0bb.zip
Update README.md
-rw-r--r--README.md10
1 files changed, 9 insertions, 1 deletions
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);
+});
+```
---