Check if streamer is streaming

Hi, can anyone explain to me, how to check if streamer is streaming in JAVA ? And how i can check if there a new follower in JAVA ? (NOT JAVASCRIPT)

Like this.

In other words, you make a GET request to the Server sending your Client-ID from your registered application (here) , and you’ll receive a response structured like this:

If stream’s offline:

{
   "stream":null
}

Otherwise:

{
   "stream": {
     ...
      },
      "channel": {
        ...
      }
   }
} 

You should check Twitch API docs for more.

If you want to know how to do this specifically in Java, you should learn how to make requests to a generic Server in Java first.

1 Like

in short? Either find a library that already exists or research the HttpsURLConnection Java class. That may be used to connect to remote servers (as mentioned above). You will need to also look at a JSON class, I like org.JSON myself.

There are many other classes and APIs available, this is just an example of two that you can research.

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