The base of Twitch related calls is http://localhost:7777/twitch
.
Methods relating to Hype Trains!
For getting the current state of the user's hype train.
GET /twitch/hypetrain/
Where active signifies if there currently is an active hype train.
{
"status": "OK",
"data": {
"active": false,
"level": 0,
"progress": 0
}
}
Where active signifies if there currently is an active hype train, level is your current train level and process is the percentage of your progress towards the next level.
{
"status": "OK",
"data": {
"active": true,
"level": 1,
"progress": 50
}
}
After the Hype Train Ended trigger is fired in Aitum, the data will persist from the hype train for 2500ms to allow your application to pull data. It is cleared after that time.
Methods relating to Polls!
For getting the current state of the user's poll.
GET /twitch/poll/
Where active signifies if there currently is an active poll.
{
"status": "OK",
"data": {
"active": false,
"title": null,
"choices": []
}
}
Where active signifies if there currently is an active poll.
{
"status": "OK",
"data": {
"active": true,
"title": "This is a really cool poll title!",
"choices": [
{
"text": "Here's an answer",
"votes": 69
},
{
"text": "Here's another answer",
"votes": 420
}
]
}
}