streamhook
A hook system to aggregate events from multiple source.
Allows you to listen to events from multiple APIs or websockets and give consistent output across.
Current build in hooks
- twitch (TwitchHook) :
- chat
- tip (cheer)
- host (hosted)
- subscription
- join
- leave (part)
- follow
- online
- offline
- streamtip (StreamtipHook) :
- tip (newTip)
- lastfm (LastfmHook) :
- music
Usage
The package is in early stages, the fundamental architecture might evolve quickly.
Single hook
const TwitchHook = ;let hook =channel : "mychannel" // your twitch channel;hook;hook;
Hook controller
const TwitchHook LastfmHook HookController = ;let twitchHook =channel : "mychannel" // your twitch channel;let lastfmHook =user : "myusername";let controller = ;controller;controller;controller;controller; // twitchcontroller; // lastfm
Custom Hook
const Hook = ;{superObject;}async {;}
If you are using standard types, follow the same event definition. I you think your custom hook should be added with the standard ones, submit an issue.