JavaScript library for interaction with AMBIT instances. The API documentation can be found here.
The latest release: Version 0.0.2
Besides the steps below, full examples are found on here.
<script src="lib/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="lib/purl.js"></script>
<script type="text/javascript" src="src/ambit.js"></script>
<script type="text/javascript" src="src/Substance.js"></script>
<script type="text/javascript" src="src/Bundle.js"></script>
<script type="text/javascript" src="src/Compound.js"></script>
var searcher = new Ambit.Substance("https://apps.ideaconsult.net/enanomapper");
var callback = function(success, status, response) {
document.getElementById("json").innerHTML =
"<pre>" + JSON.stringify(response, null, ' ') + "</pre>";
};
searcher.list(callback);
Of course, this part requires a properly set up HTML page with an element whose identifier is "json".
The library depends jquery-1.9.1.min.js and purl.js. It can be mashed up with d3.js which is also included in the lib/ folder.
Documentation is generated with JSDoc:
npm install jsdoc@"<=3.3.0" # if needed
sh merge_js.sh
./node_modules/.bin/jsdoc -d api src/ambit_dist.js
This library is based on the ideas from Ian Dunlop whom developed ops.js for Open PHACTS.
- 2015-03-31 Version 0.0.2