Hello, I have been trying to create a script to find out if someone is following someone on twitch and have found out that by reading the following page will leave a bunch of info:
https://api.twitch.tv/kraken/users/jester87d3/follows/channels/k3mistvideo

where as if the person is not following it will return a 404 ex:
https://api.twitch.tv/kraken/users/notfollowingname/follows/channels/k3mistvideo

I have tried using this code:

Alias Demo {
sockClose demo
sockOpen -e demo api.twitch.tv 443
%nickfollowing = /kraken/users/ $+ $$1 $+ /follows/channels/k3mistvideo
}

ON *:TEXT:!test:#:{
DEMO $nick
}
on *:SockOpen:demo: {
sockwrite -nt demo GET %nickfollowing HTTP/1.0
sockwrite -nt demo Host: api.twitch.tv
sockwrite -nt demo $crlf
}
on *:SockRead:demo: {
var %read
sockRead %read
/msg #k3mistvideo %read
if (!*"status":404*) {
/msg #k3mistvideo Following
}
Else {
/msg #k3mistvideo Not Following
}
}


But the above script will not get past:
sockOpen -e demo api.twitch.tv 443
There is no error or anything what do you guys think?
NOTE: you need to be using Google Chrome to see the text. Otherwise it will just try to download a JSON file.

Last edited by RuLerZ; 11/05/13 02:49 AM.