22
33BrAPI.js is a JavaScript client library for [ BrAPI] ( https://brapi.org ) . The call style of this library is inspired by [ D3.js] ( https://d3js.org/ ) . It can be used in either a browser or a Node.js application. It uses the [ Fetch API] ( https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API ) (or [ node-fetch] ( https://www.npmjs.com/package/node-fetch ) in Node.js) for making AJAX calls. BrAPI.js is dependent on ES6 classes.
44
5- BrAPI.js supports BrAPI versions ` v1.0 ` -` v1.3 ` . Currently, it expects a server to use a single version.
5+ BrAPI.js supports BrAPI versions ` v1.0 ` -` v2.0 ` . Currently, it expects a server to use a single version.
66
77### Contents
88
@@ -41,7 +41,7 @@ import BrAPI from './build/BrAPI.js';
4141```
4242``` js
4343// Node.js
44- const BrAPI = require (' BrAPI.js' );
44+ const BrAPI = require (' ./ BrAPI.js' );
4545```
4646
4747## How it Works
@@ -198,7 +198,7 @@ This method registers a callback function which is called once a node has loaded
198198| --------------- | -------------------- | --------------- | ------------------ |
199199| _ node_ .allelematrices_search(_ params_ ,...) | ` /allelematrices-search ` (>=v1.2) or ` /allelematrix-search ` (<v1.2) || ` POST ` |
200200| _ node_ .allelematrices(_ params_ ,...) | ` /allelematrices ` | | ` GET ` |
201- | _ node_ .attributes_categories(_ params_ ,...) | ` /attributes_categories ` | ` attributes/categories ` | ` GET ` |
201+ | _ node_ .attributes_categories(_ params_ ,...) | ` /attributes_categories ` | ` / attributes/categories` | ` GET ` |
202202| _ node_ .attributes_detail(_ params_ ,...)|| ` /attributes/{attributeDbId} ` | ` GET ` |
203203| _ node_ .attributes_modify(_ params_ ,...)|| ` /attributes/{attributeDbId} ` | ` PUT ` |
204204| _ node_ .attributes_store(_ params_ ,...)|| ` /attributes ` | ` POST ` |
@@ -209,7 +209,9 @@ This method registers a callback function which is called once a node has loaded
209209| _ node_ .attributevalues(_ params_ ,...)|| ` /attributevalues ` | ` GET ` |
210210| _ node_ .breedingmethods_detail(_ params_ ,...) | ` /breedingmethods/{breedingMethodDbId} ` | ` /breedingmethods/{breedingMethodDbId} ` | ` GET ` |
211211| _ node_ .breedingmethods(_ params_ ,...) | ` /breedingmethods ` | ` /breedingmethods ` | ` GET ` |
212- | _ node_ .calls(_ params_ ,...) | ` /calls ` | ` /calls ` | ` GET ` |
212+ | _ node_ .calls(_ params_ ,...) | ` /calls ` (server info) | | ` GET ` |
213+ | _ node_ .serverinfo(_ params_ ,...)|| ` /serverinfo ` | ` GET ` |
214+ | _ node_ .calls(_ params_ ,...) | | ` /calls ` (genotyping calls) | ` GET ` |
213215| _ node_ .callsets_calls(_ params_ ,...)|| ` /callsets/{callSetDbId}/calls ` | ` GET ` |
214216| _ node_ .callsets_detail(_ params_ ,...)|| ` /callsets/{callSetDbId} ` | ` GET ` |
215217| _ node_ .callsets(_ params_ ,...)|| ` /callsets ` | ` GET ` |
@@ -233,14 +235,14 @@ This method registers a callback function which is called once a node has loaded
233235| _ node_ .germplasm_store(_ params_ ,...)|| ` /germplasm ` | ` POST ` |
234236| _ node_ .germplasm(_ params_ ,...) | ` /germplasm ` | ` /germplasm ` | ` GET ` |
235237| _ node_ .images_detail(_ params_ ,...) | ` /images/{imageDbId} ` | ` /images/{imageDbId} ` | ` GET ` |
236- | _ node_ .images_imagecontent(_ params_ ,...) | ` /images/{imageDbId}/imagecontent ` | ` /images/{imageDbId}/imagecontent ` | ` PUT ` |
238+ | _ node_ .images_imagecontent(_ params_ ,...) | ` /images/{imageDbId}/imagecontent ` | | ` PUT ` |
239+ | _ node_ .images_imagecontent_modify(_ params_ ,...) | | ` /images/{imageDbId}/imagecontent ` | ` PUT ` |
237240| _ node_ .images_modify(_ params_ ,...)|| ` /images/{imageDbId} ` | ` PUT ` |
238241| _ node_ .images_store(_ params_ ,...)|| ` /images ` | ` POST ` |
239242| _ node_ .images(_ params_ ,...) | ` /images ` | ` /images ` | ` GET ` |
240243| _ node_ .lists_detail(_ params_ ,...) | ` /lists/{listDbId} ` | ` /lists/{listDbId} ` | ` GET ` |
241- | _ node_ .lists_items(_ params_ ,...) | ` /lists/{listDbId}/items ` | ` /lists/{listDbId}/items ` | ` PUT ` |
242244| _ node_ .lists_modify(_ params_ ,...)|| ` /lists/{listDbId} ` | ` PUT ` |
243- | _ node_ .lists_store_items (_ params_ ,...)|| ` /lists/{listDbId}/items ` | ` POST ` |
245+ | _ node_ .lists_items_store (_ params_ ,...)|| ` /lists/{listDbId}/items ` | ` POST ` |
244246| _ node_ .lists_store(_ params_ ,...)|| ` /lists ` | ` POST ` |
245247| _ node_ .lists(_ params_ ,...) | ` /lists ` | ` /lists ` | ` GET ` |
246248| _ node_ .locations_detail(_ params_ ,...) | ` /locations/{locationDbId} ` | ` /locations/{locationDbId} ` | ` GET ` |
@@ -264,15 +266,15 @@ This method registers a callback function which is called once a node has loaded
264266| _ node_ .methods_store(_ params_ ,...)|| ` /methods ` | ` POST ` |
265267| _ node_ .methods(_ params_ ,...) | ` /methods ` | ` /methods ` | ` GET ` |
266268| _ node_ .observationlevels(_ params_ ,...) | ` /observationlevels ` (>=v1.2) or ` /observationLevels ` (<v1.2) | ` /observationlevels ` | ` GET ` |
267- | _ node_ .observations_detail_modify (_ params_ ,...)|| ` /observations/{observationDbId} ` | ` PUT ` |
269+ | _ node_ .observations_modify (_ params_ ,...)|| ` /observations/{observationDbId} ` | ` PUT ` |
268270| _ node_ .observations_detail(_ params_ ,...)|| ` /observations/{observationDbId} ` | ` GET ` |
269- | _ node_ .observations_modify (_ params_ ,...)|| ` /observations ` | ` PUT ` |
271+ | _ node_ .observations_modify_multiple (_ params_ ,...)|| ` /observations ` | ` PUT ` |
270272| _ node_ .observations_store(_ params_ ,...)|| ` /observations ` | ` POST ` |
271273| _ node_ .observations_table(_ params_ ,...)|| ` /observations/table ` | ` GET ` |
272274| _ node_ .observations(_ params_ ,...)|| ` /observations ` | ` GET ` |
273- | _ node_ .observationunits_detail_modify (_ params_ ,...)|| ` /observationunits/{observationUnitDbId} ` | ` PUT ` |
275+ | _ node_ .observationunits_modify (_ params_ ,...)|| ` /observationunits/{observationUnitDbId} ` | ` PUT ` |
274276| _ node_ .observationunits_detail(_ params_ ,...)|| ` /observationunits/{observationUnitDbId} ` | ` GET ` |
275- | _ node_ .observationunits_modify (_ params_ ,...)|| ` /observationunits ` | ` PUT ` |
277+ | _ node_ .observationunits_modify_multiple (_ params_ ,...)|| ` /observationunits ` | ` PUT ` |
276278| _ node_ .observationunits_store(_ params_ ,...)|| ` /observationunits ` | ` POST ` |
277279| _ node_ .observationunits_table(_ params_ ,...)|| ` /observationunits/table ` | ` GET ` |
278280| _ node_ .observationunits(_ params_ ,...) | ` /observationunits ` | ` /observationunits ` | ` GET ` |
@@ -342,7 +344,6 @@ This method registers a callback function which is called once a node has loaded
342344| _ node_ .seedlots_transactions_store(_ params_ ,...)|| ` /seedlots/transactions ` | ` POST ` |
343345| _ node_ .seedlots_transactions(_ params_ ,...)|| ` /seedlots/transactions ` | ` GET ` |
344346| _ node_ .seedlots(_ params_ ,...)|| ` /seedlots ` | ` GET ` |
345- | _ node_ .serverinfo(_ params_ ,...)|| ` /serverinfo ` | ` GET ` |
346347| _ node_ .studies_detail(_ params_ ,...) | ` /studies/{studyDbId} ` | ` /studies/{studyDbId} ` | ` GET ` |
347348| _ node_ .studies_germplasm(_ params_ ,...) | ` /studies/{studyDbId}/germplasm ` | | ` GET ` |
348349| _ node_ .studies_layouts(_ params_ ,...) | ` /studies/{studyDbId}/layouts ` | ` /studies/{studyDbId}/layout ` | ` GET ` |
0 commit comments