Hi guys, let’s say there are 20 channels that are part of a Twitch team and they have all given stats access to the team as well. Can someone explain what the best approach is to start curating stats like stream duration, peak viewership, and possibly advertisement breaks/runtime on a per channel per stream basis? From reading other posts and experience with the API, I know that I would have to curate the data and store the data in a database myself to build a historical dataset over time, but I wanted your opinions on how to do this for channels that are part of a team. I have access to the Team twitch login, of course.
Thanks for your reply! Do you know if it is possible to only retrieve info for videos that were past broadcasts? The type in the “Get Videos” endpoint doesn’t clarify this for me here unless type = “archive” is the same as past broadcasts.
The reason I need to use get-videos instead of get-streams for a given userid is because I need to see duration data for the past streams-- live streams are a little less important for my metrics. However, even if I use get-videos, I’m not sure how to get the average concurrent viewers or peak viewers during that past broadcast since there is no response variable related to that.
Thus, I am curious what the best way to accomplish the following would be:
Grab all channels for a given team (done, use get team endpoint)
For each user id in the team above, find stream duration, avg. concurrent viewers and peak viewers for all past broadcasts (need help with this one)
Also find # Ad breaks and total ad duration per past broadcast (impossible using the API as you already mentioned)
Thanks, I’ll check out the Webhooks guide for new streams moving forward. If I wanted to backfill historical data from past broadcasts, is there a way to retrieve peak viewers or any viewer data that we can calculate over for past broadcasts (video type ‘archive’)?
Last couple questions to help me get started with using the Twitch API.
Even if videos are privated, I should be able access the data returned from the get-videos endpoint right? If not, how can I utilize the fact that the channels/user ids I am retrieving videos for are team members of the parent Twitch login that I do have access to (OAuth authorization?)
Do you have any pointers/references of using Python to create and parse requests/responses from the new Twitch API?