Commit 916d89e5 authored by David Hoksza's avatar David Hoksza
Browse files

Example in documentation

parent 278af09b
......@@ -56,6 +56,18 @@ All the interaction with Minerva should happen through the minerva proxy object
* beware that most of these functions are asynchronous so they actually return a promise not the actual objects
* map: functions to interact with the visual aspect of the map, mainly `showBioEntity` (highlights a bioentity), `hideBioEntity`, `fitBounds` (zooms to provided coordinates) and `addListener` (enables listening to events such as selection of entities) - see examples of using these functions in the starter-kit and the Minerva's [JavaScript API documntation](https://git-r3lab.uni.lu/piotr.gawron/minerva#javascript-api-unstable-dev-api).
An example of interaction with Minerva (see the `index.html` for more examples):
```
minervaProxy.project.data.getAllBioEntities().then(function(bes){
console.log(bes);
let be = bes[0];
//the following line is valid only if the first bioineity is of type ALIAS and not REACTION
minervaProxy.project.data.getBioEntityById({id:be.getId(), modelId:bw.getModelId(), type:'ALIAS'}).then( function(be1) {
console.log(be1);
});
```
Some of the functions are also described in the [JavaScript API documntation](https://git-r3lab.uni.lu/piotr.gawron/minerva#javascript-api-unstable-dev-api).
###### ServerConnector object
......@@ -64,8 +76,4 @@ Minerva also exposes variable called `ServerConnector` to the global scope (ther
###### Minerva's API
It can happen that there exists a (mainly data-related) functionality which is not available in the proxy object but is available through [Minerva's REST API](https://git-r3lab.uni.lu/piotr.gawron/minerva). In such case you can use Ajax to retrieve the data (the easiest way is probably to use jQuery's [getJSON](http://api.jquery.com/jquery.getjson/) function).
It can happen that there exists a (mainly data-related) functionality which is not available in the proxy object but is available through [Minerva's REST API](https://git-r3lab.uni.lu/piotr.gawron/minerva). In such case you can use Ajax to retrieve the data (the easiest way is probably to use jQuery's [getJSON](http://api.jquery.com/jquery.getjson/) function).
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment