Advertisement
westor

Twitch.tv get info

Dec 17th, 2014
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.57 KB | None | 0 0
  1. alias twitch {
  2.   var %u = https://api.twitch.tv/kraken/users/exuviax/follows/channels/lirik
  3.   var %v = tw_ $+ $ticks
  4.   JSONOpen -ud %v %u
  5.   if (%JSONError) {
  6.     echo -a ERROR: There was an connection problem between the server. - (Error Details:  $+ %JSONError $+ )
  7.     goto end
  8.     return
  9.   }
  10.   var %crdate = $remove($json(%v,created_at),Z)
  11.   var %crdate = $replace(%crdate,T,$chr(32))
  12.   if (!%crdate) {
  13.     echo -a ERROR: There are NOT any informations on the twitch.tv !
  14.     goto end
  15.     return
  16.   }
  17.   echo -a Created at: %crdate
  18.   :end
  19.   JSONClose %v
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement