Team-TAU / tau

TAU- Twitch API Unifier, a containerized relay/proxy to unify the WebHook- and WebSocket-based real-time Twitch APIs under a single (local) WebSocket connection.
MIT License
154 stars 39 forks source link

API access to the TAU test comands #60

Closed ukmadlz closed 3 years ago

ukmadlz commented 3 years ago

Is your feature request related to a problem? Please describe. Twitch's API is (as always) kinda limiting. I'd like the ability to trigger point redemptions etc via my bots and apps, but can't. So being able to trigger the test commands in TAU is the next best option.

Describe the solution you'd like Existing APIs for the test commands with tokenised access (or docs if possible already)

FiniteSingularity commented 3 years ago

This is currently undocumented (will fix that shortly, and keep this issue open until it is done), but you can fire off test events via the TAU Rest API. In order to do so, simply send a POST request to the endpoint: /api/v1/twitch-events/{EVENT_TYPE}/test with a json body that matches the Twitch event_data you want returned, where {EVENT_TYPE} is either cheer, follow, point-redemption, 'raid', subscribe, or update. The json body should match the event_data json you see when you do a test via the dashboard.

Edit to note: you need to include the token in a header like all other REST API requests.

FiniteSingularity commented 3 years ago

We've merged in some basic documentation, that includes info on the test endpoints. You can view it here:

https://github.com/Team-TAU/tau/blob/main/docs/api/v1.md#post-apiv1twitch-eventsevent_typetest