Open Trukess opened 7 years ago
You'll need https://dev.twitch.tv/docs/v5/reference/streams/.
Further this belongs to https://discuss.dev.twitch.tv and not an inactive bug tracker for obsolete API documentation.
Thank you very much for answer me freaktechnik, where I should type:
curl -H 'Accept: application/vnd.twitchtv.v5+json' \ -H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' \ -X GET 'https://api.twitch.tv/kraken/streams/?game=Overwatch'
What kind of language is this?
curl is a command line tool. (https://curl.haxx.se/)
This means you'd put the following into your console:
The top part is the command. curl -H "Accept: application/vnd.twitchtv.v5+json" -H "Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2" -X GET "https://api.twitch.tv/kraken/streams/?game=Overwatch" The next part is the response.
Broken down this gives you: The application: curl Add a header: -H "Accept: application/vnd.twitchtv.v5+json" Add a header -H "Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2" Set the request method: -X GET Finally the url you're requesting: 'https://api.twitch.tv/kraken/streams/?game=Overwatch'
Hope this helps, sca
Thanks for the answer scagood, so I need to install latest version from curl in my computer?
No, that's just how the API documentation shows examples for making requests to the API. You can use whatever you want to make requests.
Oh I understand, thanks freaktechnik 🍡
@freaktechnik to determine if a channel is online i proof that
".stream.viewers" is not NULL
and in my case if
".stream.stream_type" is "live"
so i skip out the Vodcasts.
Hopes that helps you.
Update: Currently the v5 API returns if a stream is offline: { "stream": null }
v3 version if a stream is offline
{
"stream": null,
"_links": {
"self": "https://api.twitch.tv/kraken/streams/
I was reading the API documentation from twitch but didn't find what I needed, I just need a condition that give me true or false if streamer is on or off, someone can help me?