Is there ANY way to get a viewcount for a category in the current api?
I know you can just use the Legacy Twitch API v5, but I want to be future proof.
You would need to use the Get Streams endpoint https://dev.twitch.tv/docs/api/reference#get-streams with the game_id param for the game you wish to know the viewer count of, and page through the streams and sum the results yourself.
Game developers can access the Get Game Analytics endpoint https://dev.twitch.tv/docs/api/reference/#get-game-analytics which will give accurate data, but for 3rd party developers the only option is to page through the Get Streams endpoint which is inherently inaccurate so you will always have some degree of error.