I wanted to build a notification service for Teamspeak Servers and was checking the possibilities to get the information, when a stream starts. As calling the API all the time and requesting the status of a bunch of streams, i was thinking about reading in the notofication e-mails.
I allready finished a test version. I have a dummy twitch user, which is following the users i want to get notifications. As soon as the e-mail arrives, the service checks the name of the streamer and notifies the teamspeak server.
Unfortunately, the e-mail notification doen’t work most of the time. I disabled all the spam filters, but i still don’t get the e-mail most of the time. I found a few messages, that there are problems with e-mail notifications right now.
Is that going to get better? Is there a different solution for that?
best regards Thomas
No other way with Twitch, only timed checkings.
Is the e-mail situation changing anytime soon?
Are they working on that?
I don’t want to flood the API with requests…
What about a Limit, if i try to fetch the status of hundereds of streams every minute?
Thanks, I know that. But still, i have to do that every minute and a GET Request only takes 8kb. So at some points there will be problems using that approach.
Is there anybody, that knows, if the e-mail notification will be reliable anytime soon?
Well, if twitch has problems with some API features - this features are restricted, so if not - that means it works fine. (As example - you cant get more then 1.600 followers from followers list) About email - mine works fine, didnt notice any misses.
Never rely on anything being reliable.
Don’t rely on email as you are at the mercy of Twitch sending them, AND your email provider receiving them
Just poll the API once per minute. Which is the maximum speed you should be polling at.
Partnered streams you could poll for the “xx resubscribed whilst you were away” chat message but thats as real time as polling the API once per minute and means running a bot/chat monitor.
You can either do as @splinny says, or create a dummy account and follow everyone you want. Then poll the /streams/followed endpoint as the following end point returns only the live streams as per https://github.com/justintv/Twitch-API/blob/master/v3_resources/users.md#get-streamsfollowed
Might work out cheaper that constructing a query string argument
Thanks for the tip.
If streams/followed only returns online streams, thats great!
It doesn’t really state that in the docs, but i will try it right away.
best regards Thomas
user only returns a live stream object if the
user is live (otherwise
stream:null) so /streams/followed returns live streams you follow, skipping all the
NULL stream/follow objects you would normally get (complete).
In summary /streams/followed/ only returns objects of live streams you follow. It’s the same end point that is used on http://twitch.tv/directory/following as Twitch uses it’s own API
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.