Created
September 30, 2010 16:40
-
-
Save rmanalan/604891 to your computer and use it in GitHub Desktop.
Prototype WebCenter Chainable JSON API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var wc = {}; | |
$.getJSON('http://wc/rest/api/resourceIndex',function(d){ | |
wc = JSON.parse(d); | |
}); | |
// based on @ded's async method chaining http://www.dustindiaz.com/async-method-queues/ | |
// will initiate an async req to get the current user and lazily populates the currentUser | |
// object. | |
> wc.currentUser | |
[object currentUser] | |
> wc.currentUser.spaces | |
[object spaces] | |
> wc.activityStream.getActivities({[obj options]}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment