Spotlight Javascipt API

OK, I was trying to display some spotlight data, and really didn’t want to bother with a web server, much less cross-browser security garbage. I decided to exploit the spotlight APIs callback support and go with the old script tag approach to cross-browser async calls. This code works on a hosted server (from any domain) and can be run from a file as well.

So I ended up with a compact little JS library which contain a few widgets that will take care of both retrieving data and rendering it out as standards compliant “UL” and “LI” items. The slideshow is a touch more elaborate as it uses the elusive and nocturnal “DIV” element. In any case, css classes are arguments to the various constructors so you should be able to make the widgetos look however you want. In a brilliant display of over-engineering, i factored out the rendering to separate classes so you could always implement your own “renderer”.

Enough of that, should be very easy to use, consult the demo page for a more clear and full demo implementation.  Also, check out the project on the reuters spotlight sight, more info is available there on how to steal the code and there’s an even bigger sales pitch too!!

This entry was posted in Projects. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>