Twitch followers and livestream viewers widget?

#1

Anyone able to help with this request... Twitch followers and current Live Stream Viewers? Anyone able to code this into a button? Ive seen it for YouTubers using social blade code, but haven't been able to find a way to pull this from Twitch.

Thanks so much in advance!

0 Likes

Floating HTML Settings Menu
#2

Broke this off into its own topic :slight_smile:

0 Likes

#3

I was able to accomplish this and get it working in BetterTouchTool.
Also able to grab current stream viewers and more with similar code.

Basic AppleScript and JSON, with Twitch API using a newly created Twitch "Client-ID".

tell application "JSON Helper"
set myjson to ( do shell script "curl -g GET https://api.twitch.tv/kraken/channels/“TWITCH CHANNEL NAME”/follows?client_id=“YOUR OWN ID”)
read JSON from myjson
end tell
tell application "JSON Helper"
try
set result to read JSON from myjson
set TotalFollowers to (_total of result) as number
return "Followers: " & TotalFollowers
on error
return "Followers: Error"
end try
end tell

0 Likes