First off I am using SReject's JSONforMirc 0.2.4 and I am trying to make an alias to unfollow a twitch channel. I have the following alias to PUT a follow to the API and it works perfectly. I have the required scope for my OAuth token.
alias followchan {
var %json followput
JSONOpen -duw %json https://api.twitch.tv/kraken/users/ $+ $lower($me) $+ /follows/channels/ $+ $lower($1)
JSONUrlMethod %json PUT
JSONUrlHeader %json Connection close
JSONUrlHeader %json Accept application/vnd.twitchtv.v3+json
JSONUrlHeader %json Authorization OAuth $oauth
JSONUrlGet %json
}
But when I try to UNfollow a channel with this code
alias unfollowchan {
var %json followdel
JSONOpen -duw %json https://api.twitch.tv/kraken/users/ $+ $lower($me) $+ /follows/channels/ $+ $lower($1)
JSONUrlMethod %json DEL
JSONUrlHeader %json Connection close
JSONUrlHeader %json Accept application/vnd.twitchtv.v3+json
JSONUrlHeader %json Authorization OAuth $oauth
JSONUrlGet %json
}
Turning on the JSONDebugger when running the alias gives me this error:
/JSONUrlGet - followdel --RAISED-- Unable to Parse: Invalid JSON
According to the API documentation the only difference between the 2 actions is to change PUT to DELETE, the process should be the same otherwise. Unfortunately DELETE is not one of the accepted methods for SReject's parser, only DEL. So I was thinking that may have something to do with it.
Any help is appreciated.
