Kd's Twitch Interface-API
The basic gist of how this works: It uses the JSON api (found here though it auto-downloads) by the talented ElvishJerriccoIt asks the twitch API servers for a streamer's stream (or follows) element you specify (see usage below) and then spits out information regarding the function you choose. I highly recommend having a second or so sleep every four or so times you 'ping' Twitch, otherwise you may get temporarily banned from the Twitch api
USAGE:
os.loadAPI("twitchapi") twitchapi.live("wolftaz",colors.green,colors.red) -- argumets: streamer name, live color, NOT live colorOR...
os.loadAPI("twitchapi") if twitchapi.checkLive("choobtastic") then print("Live!") else print("Not live!") endOR...
os.loadAPI("twitchapi") print(twitchapi.lastFollower("rebelofroses")OR...
os.loadAPI("twitchapi") print(twitchapi.followerCount("EthanRay10"))OR...
os.loadAPI("twitchapi") print(twitchapi.viewerCount("kd8lvt"))OR...
os.loadAPI("twitchapi") print(twitchapi.viewCount("leavaris")) --This only works when the stream is LIVE! Additionally, View count it DIFFERENT from current VIEWERS! This is how many times the stream page has been loaded!If you want, here is the code so you can suggest improvements:
Spoiler
DOWNLOADS:API: pastebin get vh4Jd1B6 twitchapi
EXAMPLE: pastebin get BkR9un49 example
NEW! My friend, Funniray, has slightly edited the API for beam.pro use!
pastebin get wbPC0Zv7 beamapi
Edited by kd8lvt, 04 January 2016 - 03:13 PM.