The DNAnexus Javascript Libraries are a collection of libraries that make it easy to integrate your javascript application with the DNAnexus platform. The complex functionality that is required to upload large files efficiently is available in only a few lines of code.
var api = new DX.Api("AUTH_TOKEN_GOES_HERE");
api.call("user-bob", "describe").done(function(userData) {
alert("user-bob's full name is " + [userData.first, userData.last].join(" "));
});
The various libraries provided have different dependencies. All DNAnexus Javascript libraries rely on jQuery's Deferred object, as promises are not yet standardized across all common browsers. See the libraries below for the exact dependencies.
The examples below are intended to demonstrate how to use the libraries. The examples were built quickly and are not meant to demonstrate how to properly build a web application/component.