{
"currentLikes": 0,
"currentTarget": 1000,
"previousTarget": 0,
"isTestMode": false,
"status": "Live" | "All Channels Offline" | "No channels configured",
"apiData": { "title": "...", "viewers": 0, "likes": 0 },
"totalPeakViews": 0,
"totalPeakLikes": 0,
"youtubeChannels": {
"@x": { "isLive": true, "viewers": 0, "likes": 0, "peakViews": 0, "peakLikes": 0, "title": "...", "streamUrl": "..." }
},
"twitchChannels": {
"x": { "isLive": false, "viewers": 0, "likes": 0, "peakViews": 0, "peakLikes": 0, "title": null, "streamUrl": null }
},
"providers": { "youtube": { ... }, "twitch": { ... } }
}
{ "youtubeChannels": [], "twitchChannels": [], "youtubeEnabled": true, "twitchEnabled": true, "refreshRate": 1000 }
{ "platform": "youtube" | "twitch", "enabled": true | false }
{ "refreshRate": 2000 } // milliseconds
{ "platform": "youtube" | "twitch", "channel": "@ChannelName" }
{ "platform": "youtube" | "twitch", "channel": "@ChannelName" }
// Live → 200
{ "provider": "youtube", "channel": "@x", "isLive": true, "viewers": 0, "likes": 0, "title": "...", "streamUrl": "..." }
// Offline → 200
{ "provider": "youtube", "channel": "@x", "isLive": false }
// Not found → 404
{ "provider": "youtube", "channel": "@x", "error": "Channel not found" }
{ "provider": "youtube", "channels": { "@a": { "isLive": true, ... }, "@b": { "isLive": false } } }
// Send to subscribe / unsubscribe after connect:
{ "action": "subscribe", "channel": "@x" }
{ "action": "unsubscribe", "channel": "@x" }
// Server pushes:
{ "type": "status", "status": "live" | "offline" | "error" | "subscribed", ... }
{ "type": "chat", "channel": "@x", "author": "...", "message": "...", "timestamp": "...",
"isOwner": false, "isModerator": false, "isMember": false }