displayer-api-client
Example
var DisplayerAPI = ;var api = "http://backpack.openbadges.org";var user = api;userid {console;};user;user;
ID lookups are cached, but group lookups are not. You may also provide the user id if known to skip that step, like so:
var user = api;
Callback Styles
All of the user methods support three styles of invocation:
userid {}; // node style callbackuserid {} {}; // success/failure style callbacksvar idPromise = userid; // promises
If additional arguments are needed, they preceed the callbacks (if any).
Promises are implemented by bluebird.
Streams
There are two additional methods that return JSONStream streams:
var g = user;g;var b = user;b;