If you are intention is to hit the Twitch API, you can use My JSON Parser
to easily make requests and retrieve data out of the response.
I also have a few scripts to make dealing with twitch a bit easier called mTwitch
(they depend on the json parser above). With mTwitch.Core.mrc and mTwitch.StateToTopic.mrc there are custom events raised through signal to indicate things like stream online/offline:
echo -a $1 is online
echo -a $1 is offline