Update README.md
This commit is contained in:
parent
57c6e7f823
commit
c27340eddc
10
README.md
10
README.md
@ -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);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user