I’m trying to find a way to check if a user streams or not. The best bet I found was checking the mature settings in the channels API, and seeing whether it was null or true/false.
My main question is, when does the value get updated from null to true/false? Is it after the first time they stream? Or only after they change something in their settings?
The “Mature” value is just a checkbox in settings, asking the viewers to be 18 or older (Require ‘mature’ audience).
As long as the user doesn’t edit the settings and check the box, or uncheck it if it was checked, the ‘mature’ value won’t change.
This is not a reliable parameter to check if the user streams a lot, use the viewcount instead.
Hm, thanks. I know some streamers that I don’t think have ever had it set as “mature” who show as “false” in null, so I thought it just updated after someone streamed. Guess I was wrong. Thanks again
Then again, I know people who have never streamed who have views. Doesn’t seem particularly reliable there, either.
For checking if a stream is live or not, the best endpoint would be the
/streams/:CHANNEL endpoint. For this one, you can just check if the
stream object is null or contains any values. If user is streaming, the
stream object will have multiple values (including mature and viewer count) whereas if user is not streaming, the entire object will just be
null. Stepping into the stream object to check an additional value is a needless step (unless you have a secondary purpose for checking that specific value.)
Ex. Offline user
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.