Reputation: 2485
I want to get a list of all online status (if it is streaming or not) of Twitch team members for a given team name.
My current approach
https://api.twitch.tv/kraken/team/<team name>
)https://api.twitch.tv/kraken/streams/<channel id>
) My problem with this
First request is okay and works as expected. but I have to request each channel / streamer by it self and not in bulk - and the responded data is more than I really need.
Question
Is there any Twitch API endpoint that I can use, that takes several channel ids and response just a flat dict of channel Id and flag if the streamer is online?
Like:
{[
{ id: 123, online: false },
{ id: 456, online: true}
}]
Upvotes: 1
Views: 462
Reputation: 2485
Solution
_id
propertyhttps://api.twitch.tv/helix/streams?user_id=123&user_id=456
user_id
matches an _id
-> User is online Source
Upvotes: 1