justin.tv jquery get some data
- by Petter Thowsen
I've been reading for hours on this json stuff and the justin.tv API documenation but still unable to get the number of viewers currently viewing my stream.
Here's a json script I tried, nothing happens.
var url = "http://api.justin.tv/api/stream/list.json";
$.ajax({
url: url,
dataType: 'jsonp',
data: { channel: "dreamvoid"},
success: function(data) { $('#result').text(JSON.stringify(data.stream_count)); },
jsonp: 'jsonp'
});