Close
Asset

Twitcher - Twitchwatching for everyone

Twitcher is a rework of the Twitch component originaly posted in 2018 on the forum.
This version now takes you through the whole authentication process (using the Web Client, Web Server DAT and webBrowser component.) without the need of an external website. Also support for the latest twitch API is added.

Registering an Application

Getting an Token

  • open twitcher.tox and fill in Client ID and Client Secret on the Twitch Parameter Page
  • Hit Get Token
  • In the opened up webbrowser window log onto your twitch account
  • acknowledge the permissions for the app (you can change permissions on the Permissions Parameter Page)
  • the webbrowser will close and the component will receive a oAuth and oAuth refresh token from twitch

Chat

On the Chat Parameter Page toggle the Connect Parameter. You can send messages to the selected room via the parameters on that page as well.

Messages received in the chat will be redirected to the referenced Chat Callback DAT's  callback functions.

You can also call the SendMsg Method on the twitcher component to send messages:

SendMsg(channel=ChannelName, room=RoomName, msg=MessageString)

For more information on Twitch's Chat system, please read here: https://dev.twitch.tv/docs/irc

PubSub

You can Listen and Receive events under the PubSub category of the Twitch API. Enable the categories on the PubSub Parameter Page and parse received messages via the specified PubSub Callback DAT.

For more on PubSub, please read here: https://dev.twitch.tv/docs/pubsub

 

API Calls

API calls can be made on the old V5 API and the new Twitch API. The API Call Parameter page allows for sending API calls to any endpoint specified in the Twitch API documentation.

Do make sure that you have the right presmissions set when retrieving your oAuth token. 

You can also call the APICall Method on the twitcher component to interact with the API:

APICall(v5=False, enpoint='streams', pars={'first':25})

Messages received will be processed in the referenced API Callback DAT.

For a full documentation on Twitch's API, check https://dev.twitch.tv/docs/v5 for the older V5 and https://dev.twitch.tv/docs/api for the new API.

Asset Downloads