solvebio-js
SolveBio Javascript SDK
Features
- Full SolveBio Api binding
- Works in NodeJS and in the browser
- Support of promises
- Uses Angular, jQuery, Q or native promises if available
- Special build
solvebio-promises.js
includes BlueBird promises API - Support pagination
Usage
Install
npm
npm install solvebio
Then require('solvebio')
in your code.
bower
bower install solvebio
Then add a <script>
to your index.html
:
<!-- If you already have a promise library loaded, just include solvebio.js --> <!-- If you don't include solvebio-promises.js. This version is bundled with the BlueBird promise library. -->
Initialize SolveBio
Initialize SolveBio Javascript client with your Oauth token. Please contact us at support@solvebio.com to get your Oauth token.
var SolveBio = ; SolveBio;
Retrieve a specific dataset
var dataset = SolveBio; dataset ;
Create filters
var filter1 = SolveBio filter2 = SolveBio; var filter = filter1;
Apply Filters and Retrieve query results
dataset ;
Retrieve a list of paged results
var Promise = Promise; { var deferred = Promisedefer data = ; ; return deferredpromise; { promise ; }} ;
Example
An HTML example is provided at examples/simple.html
. You can try
it by cloning the repository and opening the file in your browser.
Developing
Building from sources
First install Node/NPM then do this:
sudo npm install -g grunt-cli
Then:
npm install
grunt build
Contributing to solvebio-js
Use the build:dev
task:
npm install
grunt build:dev