I am making a console C# application which is supposed to check whether a Twitch Stream is online or not. I have to use Twitch API for that, I believe, which I am not very familiar with. So I need help in coming up with a solution.
I have done some research on my own to come up with a solution but most of them that I found are outdated and don't work anymore.
I do have an idea of how this is supposed to work but I can't put it in use.
First, I believe I need to download a URL string which is something like:
curl -H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' -X GET 'https://api.twitch.tv/helix/streams?first=20'
How can I achieve that in C#?
After that, the result is parsed but I'm not sure how to do that.
var r = JsonConvert.DeserializeObject<Rootobject>(json);
Maybe that's how it's done (found it on another post) but "Rootobject" has an error. Most likely it's missing something.
I am not fully sure if what I said makes sense, but in the end, I'm looking for a solution that can check if a Twitch stream is online or not.