Polling API for user go live

Hi,

I’m currently working on a pretty basic app that requires me to know when a user has gone live. I’ve been doing some research and see that web hooks are not implemented and that polling is required. My question is - would I poll the API via a cron job, or is there a different way of polling that I’m not aware of?

Thanks for the help.

Implementation of polling is up to you. The Twitch API is a straight-forward REST implementation. You can use whatever allows you to make a REST call on a regular interval. :slight_smile:

1 Like

Do you have any suggestions other than cron jobs that I’m not aware of? I’m just trying to see what other people do out of curiosity.

Most of mine use setInterval in node.js, but cron might be good for your use case. How often do you need to poll and what is your code written in?

It’s currently written in php. It would need to poll about once every 5 minutes.

You could just run your app in a continuous while, ending with a five minute sleep. No need for cron jobs.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.