What I just watched on Joost

For fun, I just added a little to this blog in sidebar.php. It shows what I just last watched on Joost, updating itself every 5 minutes.

function updateJson() {
var url="http://www.joost.com/api/events/lastwatched/libby?json_function=lastW"
var script = document.createElement("script");
script.defer = "true";
script.type = "text/javascript";
script.src = url;

setInterval ( "updateJson()", 60000 );

function lastW(obj){
var el=document.getElementById("lastW");
var id=obj.events[0].publicId;
var title=obj.events[0].title;
var thumb=obj.events[0].thumbnail;
el.innerHTML="Libby just watched: <a href='http://www.joost.com/"+id+"'>"+title+"</a> on <a href='http://www.joost.com/'>Joost</a>";

<span id="lastW"></span>

I’m biased of course but I think this is pretty cool. Numerous (alpha, check the heath warning) APIs are at http://www.joost.com/doc/api. Allan and Toni_H have been playing around too.