Code Snippet
Demonstrates the StackUser
class:
// Global object
var ss = new StackScript('');
function GetInfo()
{
// The provided callback will be called
// when the data arrives
var user = ss.GetUser(document.getElementById('userid').value);
user.InitUser(function() {
$('#info_box').html("<b>User:</b> " + user.GetDisplayName());
});
}
User ID: <input type='text' id='userid' />
<button onclick='GetInfo();'>Get User Info</button>
<div id='info_box'></div>
About
StackScript is a JavaScript wrapper that provides access to the StackOverflow API. Currently it has somewhat limited functionality, but I wanted to get something started that everyone can contribute to. There is enough code to make a simple demo, as you can see below. This wrapper even features a built-in caching class that works transparently under the hood.
License
GPL v3
Download
You can view a live demo here.
Platform
Any modern JavaScript-enabled browser.
Contact
I can be contacted at [email protected]
Code
Please head on over to http://launchpad.net/stackscript and join the project. You can find the code there.
If you want to help, I would love to add you to the project. Contact me and provide your LaunchPad ID and I will add you to the project.