About
Stack.JS is the JavaScript equivalent of Stack.PHP and aims to replicate the request structure of that library as much as possible. The library is still a long ways from being complete but is functional at this point. As was the case with Stack.PHP, Stack.JS is 100% fully documented and comes with a test suite to make sure the library functions as documented.
Request throttling was just added and there are plans to implement a cache.
Code Snippet
var site = API.Site('stackapps');
var response = site.Questions([1, 2, 3]).SortBy('creation_date').Exec();
response.Fetch(function(data) {
for(var i=0; i<data['items'].length; ++i)
console.log(data['items'][i]['title']);
});
License
Stack.JS (like Stack.PHP) is released under the MIT license.
Download
You will need to check out the code from the repository (see below) until an official release is made.
Platform
Stack.JS will run on all major browsers (IE, Firefox, Chrome, Opera, and Safari). Currently, I am running the tests in Chrome.
Contact
I can be reached at [email protected]
.
Code
The code is located at http://launchpad.net/stackjs. You can check it out using Bazaar by running these commands in an empty directory:
bzr init
bzr pull lp:stackjs
trunk
: paste.ubuntu.com/815630{"error_id":502, "error_name":"throttle_violation", "error_message":"too many requests from this IP"}
Tags
in the code toSynonyms
didn't work and I couldn't find much useful documentation other than the source code.