This repo contains a Twitch Extensions "tester". Which basically implements a most/every feature for test purposes. And is used to flag a number of TwitchDev issues
To change the port that the server listens on for Extension Serving modify the following in server/server.js
app.listen(8050, function () {
console.log("booted express on 8050");
});
The use a Reverse SSH Tunnel or NGROK to handle SSL termination for preferred testing on Twitch.
Basic Callbacks | when | docs and notes |
---|---|---|
window.Twitch.ext.onAuthorized |
when it occurs | Extensions Ref |
window.Twitch.ext.onContext |
when it occurs | Extensions Ref |
window.Twitch.ext.onError |
when an error occurs | Extensions Ref |
window.Twitch.ext.onHighlightChanged |
when it occurs | Extensions Ref |
window.Twitch.ext.onVisibilityChanged |
when it occurs | Extensions Ref |
Extension PubSub Callbacks | when | docs and notes |
---|---|---|
window.Twitch.ext.listen |
At Page load | Listens to the three Extension PubSub Topics |
window.Twitch.ext.send |
At Request | Not Supported yet |
Action Things | when | docs and notes |
---|---|---|
window.Twitch.ext.actions.followChannel |
On Click | Follow the current channel |
window.Twitch.ext.actions.onFollow |
when it occurs | Extensions Ref |
window.Twitch.ext.actions.minimize |
On Click | Minimize the extension if possible (video) |
window.Twitch.ext.actions.requestIdShare |
On Click | Login or Logout the user to the extension |
The Configuration Service no table here as complicated, but iterated and onChanged listened to. We don't currently support the set function yet!
Feature Flags iterated and onChanged listened to
Bits | when | docs and notes |
---|---|---|
window.Twitch.ext.bits.getProducts |
On Click | Fetch all products and build the "shop" |
twitch.ext.bits.onTransactionCancelled |
On occur | The user cancelled the bits transaction |
twitch.ext.bits.onTransactionComplete |
On occur | The user completed the bits transaction |
twitch.ext.bits.showBitsBalance |
On mouseover | Whenever you hover over the "shop", so hit [Get Products] to build the store first |
Viewer Things | when | docs and notes |
---|---|---|
window.Twitch.ext.viewer iterated |
At page load | Various useful attributes |
window.Twitch.ext.viewer.onChanged |
When it occurs | An Attribute changed |
The Client Query Parameters are iterated
Using the HelixToken helix is tested
Using the JWT send extemsion chat is testable