From 884fcf54b1218a578a236a9c0b92592241658976 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 17 Mar 2021 10:27:22 -0400 Subject: [PATCH 01/31] add new endpoint to germplasm and studies --- src/brapi_methods/germplasm.js | 50 ++++++++++++++++++++-- src/brapi_methods/studies.js | 78 ++++++++++++++++++++++++++++------ 2 files changed, 112 insertions(+), 16 deletions(-) diff --git a/src/brapi_methods/germplasm.js b/src/brapi_methods/germplasm.js index b5ec187..a0af7ee 100644 --- a/src/brapi_methods/germplasm.js +++ b/src/brapi_methods/germplasm.js @@ -18,6 +18,27 @@ export function germplasm (params,behavior){ return this.simple_brapi_call(call); } +/** `POST /germplasm` +* @alias BrAPINode.prototype.germplasm +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function germplasm_post (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/germplasm', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + + /** `POST /germplasm-search` * @alias BrAPINode.prototype.germplasm_search * @param {Object} params Parameters to provide to the call @@ -47,6 +68,26 @@ export function germplasm_detail (params){ return this.simple_brapi_call(call); } +/** `PUT /germplasm/{germplasmDbId}` +* @alias BrAPINode.prototype.germplasm +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function germplasm_detail_put (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/germplasm/{germplasmDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `GET /germplasm/{germplasmDbId}/mcpd` * @alias BrAPINode.prototype.germplasm_mcpd * @param {Object} params Parameters to provide to the call @@ -82,7 +123,8 @@ export function germplasm_attributes (params,behavior){ 'behavior': behavior, } this.version.check(call.urlTemplate,{ - introduced:"v1.0" + introduced:"v1.0", + deprecated:"v2.0" }); return this.simple_brapi_call(call); } @@ -141,7 +183,8 @@ export function germplasm_markerprofiles (params){ 'behavior': 'map', } this.version.check(call.urlTemplate,{ - introduced:"v1.0" + introduced:"v1.0", + deprecated:"v2.0" }); return this.simple_brapi_call(call); } @@ -163,7 +206,8 @@ export function search_germplasm(params,behavior,useOld){ } this.version.check(call.urlTemplate,{ introduced:"v1.0", - deprecated:"v1.3" + deprecated:"v1.3", + deprecated:"v2.0" }); return this.simple_brapi_call(call); } diff --git a/src/brapi_methods/studies.js b/src/brapi_methods/studies.js index c8e1131..c4276e2 100644 --- a/src/brapi_methods/studies.js +++ b/src/brapi_methods/studies.js @@ -25,7 +25,8 @@ export function search_studies(params,behavior,useOld){ call.defaultMethod = "post"; this.version.check(call.urlTemplate,{ introduced:"v1.0", - deprecated:"v1.3" + deprecated:"v1.3", + deprecated:"v2.0" }); return this.simple_brapi_call(call); } else { @@ -56,6 +57,26 @@ export function studies (params,behavior){ return this.simple_brapi_call(call); } +/** `POST /studies` + * @alias BrAPINode.prototype.studies + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function studies_post (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/studies', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + + /** `GET /studies/{studyDbId}` * @alias BrAPINode.prototype.studies_detail * @param {Object} params Parameters to provide to the call @@ -75,6 +96,25 @@ export function studies_detail (params){ return this.simple_brapi_call(call); } +/** `PUT /studies/{studyDbId}` + * @alias BrAPINode.prototype.studies_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.studyDbId studyDbId + * @return {BrAPI_Behavior_Node} + */ +export function studies_detail_put (params){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/studies/{studyDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `GET /studies/{studyDbId}/germplasm` * @alias BrAPINode.prototype.studies_germplasm * @param {Object} params Parameters to provide to the call @@ -91,7 +131,8 @@ export function studies_germplasm (params,behavior){ 'behavior': behavior, } this.version.check(call.urlTemplate,{ - introduced:"v1.0" + introduced:"v1.0", + deprecated:"v2.0" }); return this.simple_brapi_call(call); } @@ -113,12 +154,14 @@ export function studies_layouts (params,behavior){ if(this.version.predates("v1.3")){ call.urlTemplate = '/studies/{studyDbId}/layout'; this.version.check(call.urlTemplate,{ - introduced:"v1.0" + introduced:"v1.0", + deprecated:"v2.0" }); } else { call.urlTemplate = '/studies/{studyDbId}/layouts'; this.version.check(call.urlTemplate,{ - introduced:"v1.3" + introduced:"v1.3", + deprecated:"v2.0" }); } return this.simple_brapi_call(call); @@ -140,7 +183,8 @@ export function studies_observations (params,behavior){ 'behavior': behavior, } this.version.check(call.urlTemplate,{ - introduced:"v1.0" + introduced:"v1.0", + deprecated:"v2.0" }); return this.simple_brapi_call(call); } @@ -162,12 +206,14 @@ export function studies_observations_modify (params){ call.defaultMethod = "post" this.version.check(call.urlTemplate,{ introduced:"v1.0", - deprecated:"v1.1" + deprecated:"v1.1", + deprecated:"v2.0" }); } else { call.defaultMethod = "put" this.version.check(call.urlTemplate,{ - introduced:"v1.1" + introduced:"v1.1", + deprecated:"v2.0" }); } @@ -188,7 +234,8 @@ export function studies_observations_zip (params){ 'behavior': 'map', } this.version.check(call.urlTemplate,{ - introduced:"v1.1" + introduced:"v1.1", + deprecated:"v2.0" }); return this.simple_brapi_call(call); @@ -212,12 +259,14 @@ export function studies_observationvariables (params,behavior){ call.urlTemplate= '/studies/{studyDbId}/observationVariables', this.version.check(call.urlTemplate,{ introduced:"v1.0", - deprecated:"v1.1" + deprecated:"v1.1", + deprecated:"v2.0" }); } else { call.urlTemplate= '/studies/{studyDbId}/observationvariables', this.version.check(call.urlTemplate,{ - introduced:"v1.1" + introduced:"v1.1", + deprecated:"v2.0" }); } @@ -240,7 +289,8 @@ export function studies_table (params,behavior){ 'behavior': behavior, } this.version.check(call.urlTemplate,{ - introduced:"v1.0" + introduced:"v1.0", + deprecated:"v2.0" }); return this.simple_brapi_call(call); @@ -262,7 +312,8 @@ export function studies_table_add (params,behavior){ 'behavior': behavior, } this.version.check(call.urlTemplate,{ - introduced:"v1.0" + introduced:"v1.0", + deprecated:"v2.0" }); return this.simple_brapi_call(call); @@ -285,7 +336,8 @@ export function studytypes (params,behavior){ call.urlTemplate = '/studyTypes'; this.version.check(call.urlTemplate,{ introduced:"v1.0", - deprecated:"v1.1" + deprecated:"v1.1", + deprecated:"v2.0" }); } else { call.urlTemplate = '/studytypes'; From 37922abf108f6b61b8b777d615bbb5892a00e26a Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 17 Mar 2021 15:54:44 -0400 Subject: [PATCH 02/31] change studies prototype name --- src/brapi_methods/studies.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/brapi_methods/studies.js b/src/brapi_methods/studies.js index c4276e2..f99ec07 100644 --- a/src/brapi_methods/studies.js +++ b/src/brapi_methods/studies.js @@ -58,12 +58,12 @@ export function studies (params,behavior){ } /** `POST /studies` - * @alias BrAPINode.prototype.studies + * @alias BrAPINode.prototype.studies_store * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} */ -export function studies_post (params,behavior){ +export function studies_store (params,behavior){ var call = { 'defaultMethod': 'post', 'urlTemplate': '/studies', @@ -97,12 +97,12 @@ export function studies_detail (params){ } /** `PUT /studies/{studyDbId}` - * @alias BrAPINode.prototype.studies_detail + * @alias BrAPINode.prototype.studies_modify * @param {Object} params Parameters to provide to the call * @param {String} params.studyDbId studyDbId * @return {BrAPI_Behavior_Node} */ -export function studies_detail_put (params){ +export function studies_modify (params){ var call = { 'defaultMethod': 'put', 'urlTemplate': '/studies/{studyDbId}', From 42196b44e2879e817fd890c9a00f875993dbbaef Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 17 Mar 2021 15:55:55 -0400 Subject: [PATCH 03/31] change germplasm prototype name --- src/brapi_methods/germplasm.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/brapi_methods/germplasm.js b/src/brapi_methods/germplasm.js index a0af7ee..de7d79a 100644 --- a/src/brapi_methods/germplasm.js +++ b/src/brapi_methods/germplasm.js @@ -19,12 +19,12 @@ export function germplasm (params,behavior){ } /** `POST /germplasm` -* @alias BrAPINode.prototype.germplasm +* @alias BrAPINode.prototype.germplasm_store * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} */ -export function germplasm_post (params,behavior){ +export function germplasm_store (params,behavior){ var call = { 'defaultMethod': 'post', 'urlTemplate': '/germplasm', @@ -69,12 +69,12 @@ export function germplasm_detail (params){ } /** `PUT /germplasm/{germplasmDbId}` -* @alias BrAPINode.prototype.germplasm +* @alias BrAPINode.prototype.germplasm_modify * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} */ -export function germplasm_detail_put (params,behavior){ +export function germplasm_modify (params,behavior){ var call = { 'defaultMethod': 'put', 'urlTemplate': '/germplasm/{germplasmDbId}', From b5ef5d43c0160a6f5a0d37954445aed52df2cbde Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 17 Mar 2021 16:07:07 -0400 Subject: [PATCH 04/31] programs put and post methods --- src/brapi_methods/programs.js | 62 ++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/src/brapi_methods/programs.js b/src/brapi_methods/programs.js index abfb722..bbb5f64 100644 --- a/src/brapi_methods/programs.js +++ b/src/brapi_methods/programs.js @@ -18,6 +18,65 @@ export function programs (params,behavior){ return this.simple_brapi_call(call); } +/** `POST /programs` +* @alias BrAPINode.prototype.programs_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function programs_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/programs', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /programs/{programDbId}` + * @alias BrAPINode.prototype.programs_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.germplasmDbId germplasmDbId + * @return {BrAPI_Behavior_Node} + */ +export function programs_detail (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/programs/{programDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `PUT /programs/{programDbId}` +* @alias BrAPINode.prototype.programs_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function programs_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/programs/{programDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `POST /programs-search` * @alias BrAPINode.prototype.programs_search * @param {Object} params Parameters to provide to the call @@ -45,7 +104,8 @@ export function search_programs(params,behavior,useOld){ call.defaultMethod = "post"; this.version.check(call.urlTemplate,{ introduced:"v1.0", - deprecated:"v1.3" + deprecated:"v1.3", + deprecated:"v2.0" }); return this.simple_brapi_call(call); } else { From 9889fc701cea18768a63f8afe90592ca9f5d347a Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 17 Mar 2021 16:18:27 -0400 Subject: [PATCH 05/31] trials put and post methods --- src/brapi_methods/trials.js | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/src/brapi_methods/trials.js b/src/brapi_methods/trials.js index 7d6ead1..0ecf3c7 100644 --- a/src/brapi_methods/trials.js +++ b/src/brapi_methods/trials.js @@ -18,6 +18,26 @@ export function trials (params,behavior){ return this.simple_brapi_call(call); } +/** `POST /trials` +* @alias BrAPINode.prototype.trials_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function trials_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/trials', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `GET /trials/{trialDbId}` * @alias BrAPINode.prototype.trials_detail * @param {Object} params Parameters to provide to the call @@ -36,3 +56,47 @@ export function trials_detail (params){ }); return this.simple_brapi_call(call); } + + +/** `PUT /trials/{trialDbId}` +* @alias BrAPINode.prototype.trials_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function trials_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/trials/{trialDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `POST /search/trials` +* @alias BrAPINode.prototype.trials_search +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function trials_search(params,behavior){ + return this.search_trials(params,behavior,true); +}; + +/** `POST /search/trials -> GET /search/trials` +* @alias BrAPINode.prototype.search_trials +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function search_trials(params,behavior,useOld){ + this.version.check("POST /search/trials -> GET /search/trials",{ + introduced:"v2.0" + }); + return this.search("trials",params,behavior); +}; From f3c3ac53de5858c4e441dc4378a4a7db652d0e95 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 17 Mar 2021 16:24:11 -0400 Subject: [PATCH 06/31] locations put and post methods --- src/brapi_methods/locations.js | 64 ++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/src/brapi_methods/locations.js b/src/brapi_methods/locations.js index 648c7df..2bdaf0c 100644 --- a/src/brapi_methods/locations.js +++ b/src/brapi_methods/locations.js @@ -18,6 +18,26 @@ export function locations (params,behavior){ return this.simple_brapi_call(call); } +/** `POST /locations` +* @alias BrAPINode.prototype.locations_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function locations_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/locations', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `GET /locations/{locationDbId}` * @alias BrAPINode.prototype.locations_detail * @param {Object} params Parameters to provide to the call @@ -36,3 +56,47 @@ export function locations_detail (params){ }); return this.simple_brapi_call(call); } + + +/** `PUT /locations/{locationDbId}` +* @alias BrAPINode.prototype.locations_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function locations_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/locations/{locationDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `POST /search/locations` +* @alias BrAPINode.prototype.locations_search +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function locations_search(params,behavior){ + return this.search_locations(params,behavior,true); +}; + +/** `POST /search/locations -> GET /search/locations` +* @alias BrAPINode.prototype.search_locations +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function search_locations(params,behavior,useOld){ + this.version.check("POST /search/locations -> GET /search/locations",{ + introduced:"v2.0" + }); + return this.search("locations",params,behavior); +}; From 2460db2454b447a90eac94c3ad746f0b6bb60f09 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 17 Mar 2021 16:27:45 -0400 Subject: [PATCH 07/31] add observation unit table --- src/brapi_methods/observationunits.js | 23 +++++++++++++++++++++++ src/brapi_methods/programs.js | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/brapi_methods/observationunits.js b/src/brapi_methods/observationunits.js index 1609d48..41e543a 100644 --- a/src/brapi_methods/observationunits.js +++ b/src/brapi_methods/observationunits.js @@ -18,6 +18,29 @@ export function observationunits (params,behavior){ return this.simple_brapi_call(call); } +/** `GET /observationunits/table` + * @alias BrAPINode.prototype.observationunits_table + * @param {Object} params Parameters to provide to the call + * @param {String} params.studyDbId studyDbId + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function observationunits_table (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate':'/observationunits/table', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + + return this.simple_brapi_call(call); +} + + /** `POST /search/observationunits -> GET /search/observationunits` * @alias BrAPINode.prototype.search_observationunits * @param {Object} params Parameters to provide to the call diff --git a/src/brapi_methods/programs.js b/src/brapi_methods/programs.js index bbb5f64..aa7b52d 100644 --- a/src/brapi_methods/programs.js +++ b/src/brapi_methods/programs.js @@ -41,7 +41,7 @@ export function programs_store (params,behavior){ /** `GET /programs/{programDbId}` * @alias BrAPINode.prototype.programs_detail * @param {Object} params Parameters to provide to the call - * @param {String} params.germplasmDbId germplasmDbId + * @param {String} params.programDbId programDbId * @return {BrAPI_Behavior_Node} */ export function programs_detail (params){ From ff278087acc73bfcdafe9c8143699645373aa779 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 17 Mar 2021 16:39:40 -0400 Subject: [PATCH 08/31] change naming convention for version 1.3 and upper --- src/brapi_methods/commoncropnames.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/brapi_methods/commoncropnames.js b/src/brapi_methods/commoncropnames.js index fc9d236..1d20bd6 100644 --- a/src/brapi_methods/commoncropnames.js +++ b/src/brapi_methods/commoncropnames.js @@ -15,12 +15,19 @@ export function commoncropnames (params,behavior){ call.urlTemplate = "/crops" this.version.check(call.urlTemplate,{ introduced:"v1.0", - deprecated:"v1.2" + deprecated:"v1.2", + deprecated:"v2.0" }); - } else { + } else if (this.version.predates("v1.3")){ call.urlTemplate = "/commonCropNames" this.version.check(call.urlTemplate,{ - introduced:"v1.2" + introduced:"v1.2", + deprecated:"v1.3" + }); + } else { + call.urlTemplate = "/commoncropnames" + this.version.check(call.urlTemplate,{ + introduced:"v1.3" }); } return this.simple_brapi_call(call); From 5cdbcfad4b64cc7e88b30118ac9bc557f32506f6 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 17 Mar 2021 16:48:31 -0400 Subject: [PATCH 09/31] lists put and post methods --- src/brapi_methods/lists.js | 86 +++++++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) diff --git a/src/brapi_methods/lists.js b/src/brapi_methods/lists.js index 757ad5f..4abdcc7 100644 --- a/src/brapi_methods/lists.js +++ b/src/brapi_methods/lists.js @@ -18,6 +18,26 @@ export function lists (params,behavior){ return this.simple_brapi_call(call); } +/** `POST /lists` +* @alias BrAPINode.prototype.lists_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function lists_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/lists', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `GET /lists/{listDbId}` * @alias BrAPINode.prototype.lists_detail * @param {Object} params Parameters to provide to the call @@ -37,6 +57,26 @@ export function lists_detail (params){ return this.simple_brapi_call(call); } +/** `PUT /lists/{listDbId}` +* @alias BrAPINode.prototype.lists_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function lists_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/lists/{listDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `PUT /lists/{listDbId}/items` * @alias BrAPINode.prototype.lists_items * @param {Object} params Parameters to provide to the call @@ -51,7 +91,51 @@ export function lists_items (params){ 'behavior': 'map', } this.version.check(call.urlTemplate,{ - introduced:"v1.3" + introduced:"v1.3", + deprecated:"v2.0" }); return this.simple_brapi_call(call); } + +/** `POST /lists/{listDbId}/items` + * @alias BrAPINode.prototype.lists_store_items + * @param {Object} params Parameters to provide to the call + * @param {String} params.imageDbId imageDbId + * @return {BrAPI_Behavior_Node} + */ +export function lists_store_items (params){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/lists/{listDbId}/items', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + + +/** `POST /search/lists` +* @alias BrAPINode.prototype.lists_search +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function lists_search(params,behavior){ + return this.search_lists(params,behavior,true); +}; + +/** `POST /search/lists -> GET /search/lists` +* @alias BrAPINode.prototype.search_lists +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function search_lists(params,behavior,useOld){ + this.version.check("POST /search/lists -> GET /search/lists",{ + introduced:"v2.0" + }); + return this.search("lists",params,behavior); +}; From 90dcb7be7050da483d8b164ad7c1fd17ba1dae80 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 17 Mar 2021 16:53:40 -0400 Subject: [PATCH 10/31] people put and post methods --- src/brapi_methods/people.js | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/src/brapi_methods/people.js b/src/brapi_methods/people.js index 50cb334..62ee08e 100644 --- a/src/brapi_methods/people.js +++ b/src/brapi_methods/people.js @@ -18,6 +18,26 @@ export function people (params,behavior){ return this.simple_brapi_call(call); } +/** `POST /people` +* @alias BrAPINode.prototype.people_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function people_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/people', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `GET /people/{personDbId}` * @alias BrAPINode.prototype.people_detail * @param {Object} params Parameters to provide to the call @@ -36,3 +56,47 @@ export function people_detail (params){ }); return this.simple_brapi_call(call); } + + +/** `PUT /people/{personDbId}` +* @alias BrAPINode.prototype.people_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function people_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/people/{personDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `POST /search/people` +* @alias BrAPINode.prototype.people_search +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function people_search(params,behavior){ + return this.search_people(params,behavior,true); +}; + +/** `POST /search/people -> GET /search/people` +* @alias BrAPINode.prototype.search_people +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function search_people(params,behavior,useOld){ + this.version.check("POST /search/people -> GET /search/people",{ + introduced:"v2.0" + }); + return this.search("people",params,behavior); +}; From 58bd94fd44b11e35a573f3e9e86769a8d4e989de Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 17 Mar 2021 19:55:06 -0400 Subject: [PATCH 11/31] seasons put and post methods --- src/brapi_methods.js | 3 ++ src/brapi_methods/seasons.js | 59 ++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/src/brapi_methods.js b/src/brapi_methods.js index 5b291c1..38591e2 100644 --- a/src/brapi_methods.js +++ b/src/brapi_methods.js @@ -2,6 +2,7 @@ export * from "./brapi_methods/allelematrices"; export * from "./brapi_methods/attributes"; export * from "./brapi_methods/breedingmethods"; export * from "./brapi_methods/calls"; +export * from "./brapi_methods/callsets"; export * from "./brapi_methods/commoncropnames"; export * from "./brapi_methods/germplasm"; export * from "./brapi_methods/images"; @@ -11,6 +12,7 @@ export * from "./brapi_methods/maps"; export * from "./brapi_methods/markerprofiles"; export * from "./brapi_methods/markers"; export * from "./brapi_methods/methods"; +export * from "./brapi_methods/observations"; export * from "./brapi_methods/observationlevels"; export * from "./brapi_methods/observationunits"; export * from "./brapi_methods/ontologies"; @@ -21,6 +23,7 @@ export * from "./brapi_methods/samples"; export * from "./brapi_methods/scales"; export * from "./brapi_methods/search"; export * from "./brapi_methods/seasons"; +export * from "./brapi_methods/serverinfo"; export * from "./brapi_methods/studies"; export * from "./brapi_methods/traits"; export * from "./brapi_methods/trials"; diff --git a/src/brapi_methods/seasons.js b/src/brapi_methods/seasons.js index dd00f2d..caf9f97 100644 --- a/src/brapi_methods/seasons.js +++ b/src/brapi_methods/seasons.js @@ -17,3 +17,62 @@ export function seasons (params,behavior){ }); return this.simple_brapi_call(call); } + +/** `POST /seasons` +* @alias BrAPINode.prototype.seasons_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function seasons_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/seasons', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /seasons/{seasonDbId}` + * @alias BrAPINode.prototype.seasons_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.seasonDbId seasonDbId + * @return {BrAPI_Behavior_Node} + */ +export function seasons_detail (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/seasons/{seasonDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `PUT /seasons/{seasonDbId}` +* @alias BrAPINode.prototype.seasons_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function seasons_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/seasons/{seasonDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} From 657a508c26f983d5003094e367cca0526a16b28c Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 17 Mar 2021 20:03:32 -0400 Subject: [PATCH 12/31] images put and post methods --- src/brapi_methods.js | 1 + src/brapi_methods/images.js | 40 +++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/src/brapi_methods.js b/src/brapi_methods.js index 38591e2..cf8c273 100644 --- a/src/brapi_methods.js +++ b/src/brapi_methods.js @@ -4,6 +4,7 @@ export * from "./brapi_methods/breedingmethods"; export * from "./brapi_methods/calls"; export * from "./brapi_methods/callsets"; export * from "./brapi_methods/commoncropnames"; +export * from "./brapi_methods/events"; export * from "./brapi_methods/germplasm"; export * from "./brapi_methods/images"; export * from "./brapi_methods/lists"; diff --git a/src/brapi_methods/images.js b/src/brapi_methods/images.js index beb339a..6a97b8f 100644 --- a/src/brapi_methods/images.js +++ b/src/brapi_methods/images.js @@ -18,6 +18,26 @@ export function images (params,behavior){ return this.simple_brapi_call(call); } +/** `POST /images` +* @alias BrAPINode.prototype.images_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function images_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/images', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `GET /images/{imageDbId}` * @alias BrAPINode.prototype.images_detail * @param {Object} params Parameters to provide to the call @@ -37,6 +57,26 @@ export function images_detail (params){ return this.simple_brapi_call(call); } +/** `PUT /images/{imageDbId}` +* @alias BrAPINode.prototype.images_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function images_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/images/{imageDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `PUT /images/{imageDbId}/imagecontent` * @alias BrAPINode.prototype.images_imagecontent * @param {Object} params Parameters to provide to the call From ff39c2ae222701a489409a3a425dc41ca7ba6075 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Wed, 17 Mar 2021 20:06:16 -0400 Subject: [PATCH 13/31] methods put and post methods --- src/brapi_methods/methods.js | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/brapi_methods/methods.js b/src/brapi_methods/methods.js index cb75c41..8f9f9a0 100644 --- a/src/brapi_methods/methods.js +++ b/src/brapi_methods/methods.js @@ -18,6 +18,26 @@ export function methods (params,behavior){ return this.simple_brapi_call(call); } +/** `POST /methods` +* @alias BrAPINode.prototype.methods_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function methods_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/methods', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `GET /methods/{methodDbId}` * @alias BrAPINode.prototype.methods_detail * @param {Object} params Parameters to provide to the call @@ -36,3 +56,23 @@ export function methods_detail (params){ }); return this.simple_brapi_call(call); } + +/** `PUT /methods/{methodDbId}` +* @alias BrAPINode.prototype.methods_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function methods_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/methods/{methodDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} \ No newline at end of file From ba70056c87a11ec57d8c8937f2f63668d86ddfe8 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 18 Mar 2021 09:49:36 -0400 Subject: [PATCH 14/31] observation levels --- src/brapi_methods/observationlevels.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/brapi_methods/observationlevels.js b/src/brapi_methods/observationlevels.js index fd482da..66b265f 100644 --- a/src/brapi_methods/observationlevels.js +++ b/src/brapi_methods/observationlevels.js @@ -16,7 +16,8 @@ export function observationlevels (params,behavior){ call.urlTemplate = "/observationLevels" this.version.check(call.urlTemplate,{ introduced:"v1.0", - deprecated:"v1.2" + deprecated:"v1.2", + deprecated:"v2.0" }); } else { call.urlTemplate = "/observationlevels" From a9940bf9190a11fbca45739f1942f09136c6c79d Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 18 Mar 2021 09:50:07 -0400 Subject: [PATCH 15/31] observation units put and post methods --- src/brapi_methods/observationunits.js | 82 ++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/src/brapi_methods/observationunits.js b/src/brapi_methods/observationunits.js index 41e543a..1d4dc02 100644 --- a/src/brapi_methods/observationunits.js +++ b/src/brapi_methods/observationunits.js @@ -18,6 +18,85 @@ export function observationunits (params,behavior){ return this.simple_brapi_call(call); } +/** `POST /observationunits` +* @alias BrAPINode.prototype.observationunits_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function observationunits_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/observationunits', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `PUT /observationunits` +* @alias BrAPINode.prototype.observationunits_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function observationunits_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/observationunits', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /observationunits/{observationUnitDbId}` + * @alias BrAPINode.prototype.observationunits_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.observationUnitDbId observationUnitDbId + * @return {BrAPI_Behavior_Node} + */ +export function observationunits_detail (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/observationunits/{observationUnitDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v1.0" + }); + return this.simple_brapi_call(call); +} + +/** `PUT /observationunits/{observationUnitDbId}` +* @alias BrAPINode.prototype.observationunits_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function observationunits_detail_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/observationunits/{observationUnitDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `GET /observationunits/table` * @alias BrAPINode.prototype.observationunits_table * @param {Object} params Parameters to provide to the call @@ -62,7 +141,8 @@ export function search_observationunits(params,behavior){ */ export function search_observationtables(params,behavior){ this.version.check("POST /search/observationtables -> GET /search/observationtables",{ - introduced:"v1.3" + introduced:"v1.3", + deprecated:"v2.0" }); return this.search("observationtables",params,behavior); }; From 401c1a9f7cb847f87164f7286135a8a9ea38e598 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 18 Mar 2021 09:50:35 -0400 Subject: [PATCH 16/31] observation variables put and post methods --- src/brapi_methods/variables.js | 43 +++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/src/brapi_methods/variables.js b/src/brapi_methods/variables.js index 2d66e05..9e023a3 100644 --- a/src/brapi_methods/variables.js +++ b/src/brapi_methods/variables.js @@ -18,6 +18,26 @@ export function variables (params,behavior){ return this.simple_brapi_call(call); } +/** `POST /variables` +* @alias BrAPINode.prototype.variables_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function variables_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/variables', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `POST /variables-search` * @alias BrAPINode.prototype.variables_search * @param {Object} params Parameters to provide to the call @@ -75,6 +95,26 @@ export function variables_detail (params){ return this.simple_brapi_call(call); } +/** `PUT /variables/{observationVariableDbId}` +* @alias BrAPINode.prototype.variables_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function variables_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/variables/{observationVariableDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `GET /variables/datatypes` * @alias BrAPINode.prototype.variables_datatypes * @param {Object} params Parameters to provide to the call @@ -91,7 +131,8 @@ export function variables_datatypes (params,behavior){ } this.version.check(call.urlTemplate,{ introduced:"v1.0", - deprecated:"v1.3" + deprecated:"v1.3", + deprecated:"v2.0" }); return this.simple_brapi_call(call); } From aca284d897bf553f735c0363fd0815532a1646eb Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 18 Mar 2021 09:50:59 -0400 Subject: [PATCH 17/31] add events --- src/brapi_methods/events.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/brapi_methods/events.js diff --git a/src/brapi_methods/events.js b/src/brapi_methods/events.js new file mode 100644 index 0000000..26e6301 --- /dev/null +++ b/src/brapi_methods/events.js @@ -0,0 +1,19 @@ +/** `GET /events` + * @alias BrAPINode.prototype.events + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function events (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/events', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} \ No newline at end of file From 54b9b2182466d20f01f748be5dd21a9639861a20 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 18 Mar 2021 09:51:16 -0400 Subject: [PATCH 18/31] add observations --- src/brapi_methods/observations.js | 133 ++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 src/brapi_methods/observations.js diff --git a/src/brapi_methods/observations.js b/src/brapi_methods/observations.js new file mode 100644 index 0000000..97c1c92 --- /dev/null +++ b/src/brapi_methods/observations.js @@ -0,0 +1,133 @@ +/** `GET /observations` + * @alias BrAPINode.prototype.observations + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function observations (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/observations', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `POST /observations` + * @alias BrAPINode.prototype.observations + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function observations_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/observations', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `PUT /observations` + * @alias BrAPINode.prototype.observations + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function observations_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/observations', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + + +/** `GET /observations/{observationDbId}` + * @alias BrAPINode.prototype.observations_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.observationDbId observationDbId + * @return {BrAPI_Behavior_Node} + */ +export function observations_detail (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/observations/{observationDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + + +/** `PUT /observations/{observationDbId}` +* @alias BrAPINode.prototype.observations_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function observations_detail_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/observations/{observationDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + + +/** `GET /observations/table` + * @alias BrAPINode.prototype.observations_table + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function observations_table (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate':'/observations/table', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + + return this.simple_brapi_call(call); +} + +/** `POST /search/observations -> GET /search/observations` +* @alias BrAPINode.prototype.search_observations +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function search_observations(params,behavior){ + this.version.check("POST /search/observations -> GET /search/observations",{ + introduced:"v2.0" + }); + return this.search("observations",params,behavior); +}; From eab009815513c5102bc09ce83f657dc939a4575d Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 18 Mar 2021 09:51:35 -0400 Subject: [PATCH 19/31] add serverinfo --- src/brapi_methods/serverinfo.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/brapi_methods/serverinfo.js diff --git a/src/brapi_methods/serverinfo.js b/src/brapi_methods/serverinfo.js new file mode 100644 index 0000000..0f03fb5 --- /dev/null +++ b/src/brapi_methods/serverinfo.js @@ -0,0 +1,19 @@ +/** `GET /serverinfo` + * @alias BrAPINode.prototype.serverinfo + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function serverinfo (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/serverinfo', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} \ No newline at end of file From b7213497f53aebe29079f588e1a1f836c114ec62 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 18 Mar 2021 09:55:20 -0400 Subject: [PATCH 20/31] scales put and post methods --- src/brapi_methods/scales.js | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/brapi_methods/scales.js b/src/brapi_methods/scales.js index 2bf9c2a..e7c16f2 100644 --- a/src/brapi_methods/scales.js +++ b/src/brapi_methods/scales.js @@ -18,6 +18,26 @@ export function scales (params,behavior){ return this.simple_brapi_call(call); } +/** `POST /scales` +* @alias BrAPINode.prototype.scales_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function scales_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/scales', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `GET /scales/{scaleDbId}` * @alias BrAPINode.prototype.scales_detail * @param {Object} params Parameters to provide to the call @@ -36,3 +56,23 @@ export function scales_detail (params){ }); return this.simple_brapi_call(call); } + +/** `PUT /scales/{scaleDbId}` +* @alias BrAPINode.prototype.scales_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function scales_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/scales/{scaleDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} \ No newline at end of file From 4cdc2104ec1e30e27323d4b71cba7b7c810eb95f Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 18 Mar 2021 09:55:47 -0400 Subject: [PATCH 21/31] traits put and post methods --- src/brapi_methods/traits.js | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/brapi_methods/traits.js b/src/brapi_methods/traits.js index d0ba539..194984a 100644 --- a/src/brapi_methods/traits.js +++ b/src/brapi_methods/traits.js @@ -18,6 +18,26 @@ export function traits (params,behavior){ return this.simple_brapi_call(call); } +/** `POST /traits` +* @alias BrAPINode.prototype.traits_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function traits_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/traits', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `GET /traits/{traitDbId}` * @alias BrAPINode.prototype.traits_detail * @param {Object} params Parameters to provide to the call @@ -36,3 +56,23 @@ export function traits_detail (params){ }); return this.simple_brapi_call(call); } + +/** `PUT /traits/{traitDbId}` +* @alias BrAPINode.prototype.traits_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function traits_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/traits/{traitDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} From aa18445b26cb1ecafad43e4eee01aeb630ddd156 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 18 Mar 2021 16:24:23 -0400 Subject: [PATCH 22/31] upgrade attributes calls and vendor --- src/brapi_methods/attributes.js | 75 +++++++++++++++++++++++++++++++++ src/brapi_methods/calls.js | 13 ++++++ src/brapi_methods/vendor.js | 24 ++++++++++- 3 files changed, 110 insertions(+), 2 deletions(-) diff --git a/src/brapi_methods/attributes.js b/src/brapi_methods/attributes.js index ce1ea8c..95e5ca5 100644 --- a/src/brapi_methods/attributes.js +++ b/src/brapi_methods/attributes.js @@ -18,6 +18,67 @@ export function attributes (params,behavior){ return this.simple_brapi_call(call); } +/** `POST /attributes` +* @alias BrAPINode.prototype.attributes_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function attributes_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/attributes', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + + +/** `GET /attributes/{attributeDbId}` + * @alias BrAPINode.prototype.attributes_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.attributeDbId attributeDbId + * @return {BrAPI_Behavior_Node} + */ +export function attributes_detail (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/attributes/{attributeDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + + +/** `PUT /attributes/{attributeDbId}` +* @alias BrAPINode.prototype.attributes_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function attributes_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/attributes/{attributeDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `GET /attributes_categories` * @alias BrAPINode.prototype.attributes_categories * @param {Object} params Parameters to provide to the call @@ -37,3 +98,17 @@ export function attributes_categories (params,behavior){ }); return this.simple_brapi_call(call); } + + +/** `POST /search/attributes -> GET /search/attributes` +* @alias BrAPINode.prototype.search_attributes +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function search_attributes(params,behavior){ + this.version.check("POST /search/attributes -> GET /search/attributes",{ + introduced:"v2.0" + }); + return this.search("attributes",params,behavior); +}; diff --git a/src/brapi_methods/calls.js b/src/brapi_methods/calls.js index 774dfdd..a8fc8cc 100644 --- a/src/brapi_methods/calls.js +++ b/src/brapi_methods/calls.js @@ -17,3 +17,16 @@ export function calls (params,behavior){ }); return this.simple_brapi_call(call); } + +/** `POST /search/calls -> GET /search/calls` +* @alias BrAPINode.prototype.search_calls +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function search_calls(params,behavior){ + this.version.check("POST /search/calls -> GET /search/calls",{ + introduced:"v2.0" + }); + return this.search("calls",params,behavior); +}; diff --git a/src/brapi_methods/vendor.js b/src/brapi_methods/vendor.js index aad0cfd..b6e4a39 100644 --- a/src/brapi_methods/vendor.js +++ b/src/brapi_methods/vendor.js @@ -34,13 +34,15 @@ export function vendor_plates_search(params,behavior){ call.urlTemplate = '/vendor/plate-search'; this.version.check(call.urlTemplate,{ introduced:"v1.1", - deprecated:"v1.2" + deprecated:"v1.2", + deprecated:"v2.0" }); } else { call.urlTemplate = '/vendor/plates-search'; this.version.check(call.urlTemplate,{ introduced:"v1.2", - deprecated:"v1.3" + deprecated:"v1.3", + deprecated:"v2.0" }); } return this.simple_brapi_call(call); @@ -109,6 +111,24 @@ export function vendor_orders (params){ return this.simple_brapi_call(call); } +/** `POST /vendor/orders` + * @alias BrAPINode.prototype.vendor_orders + * @param {Object} params Parameters to provide to the call + * @return {BrAPI_Behavior_Node} + */ +export function vendor_orders (params){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/vendor/orders', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `GET /vendor/orders/{orderId}/results` * @alias BrAPINode.prototype.vendor_orders_results * @param {Object} params Parameters to provide to the call From 87fc5c4f164c0468d743e0311b9831e2c306356d Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 18 Mar 2021 16:24:55 -0400 Subject: [PATCH 23/31] upgrade maps markers samples --- src/brapi_methods.js | 9 +++++++ src/brapi_methods/maps.js | 27 +++++++++++++++++-- src/brapi_methods/markers.js | 49 +++++++++++++++++++++++++++++++---- src/brapi_methods/samples.js | 50 ++++++++++++++++++++++++++++++++---- 4 files changed, 123 insertions(+), 12 deletions(-) diff --git a/src/brapi_methods.js b/src/brapi_methods.js index cf8c273..15dcb25 100644 --- a/src/brapi_methods.js +++ b/src/brapi_methods.js @@ -1,9 +1,12 @@ export * from "./brapi_methods/allelematrices"; export * from "./brapi_methods/attributes"; +export * from "./brapi_methods/attributevalues"; export * from "./brapi_methods/breedingmethods"; export * from "./brapi_methods/calls"; export * from "./brapi_methods/callsets"; export * from "./brapi_methods/commoncropnames"; +export * from "./brapi_methods/crosses"; +export * from "./brapi_methods/crossingprojects"; export * from "./brapi_methods/events"; export * from "./brapi_methods/germplasm"; export * from "./brapi_methods/images"; @@ -19,14 +22,20 @@ export * from "./brapi_methods/observationunits"; export * from "./brapi_methods/ontologies"; export * from "./brapi_methods/people"; export * from "./brapi_methods/phenotypes"; +export * from "./brapi_methods/plannedcrosses"; export * from "./brapi_methods/programs"; +export * from "./brapi_methods/references"; +export * from "./brapi_methods/referencesets"; export * from "./brapi_methods/samples"; export * from "./brapi_methods/scales"; export * from "./brapi_methods/search"; export * from "./brapi_methods/seasons"; +export * from "./brapi_methods/seedlots"; export * from "./brapi_methods/serverinfo"; export * from "./brapi_methods/studies"; export * from "./brapi_methods/traits"; export * from "./brapi_methods/trials"; export * from "./brapi_methods/variables"; +export * from "./brapi_methods/variants"; +export * from "./brapi_methods/variantsets"; export * from "./brapi_methods/vendor"; diff --git a/src/brapi_methods/maps.js b/src/brapi_methods/maps.js index 3929674..ebafeca 100644 --- a/src/brapi_methods/maps.js +++ b/src/brapi_methods/maps.js @@ -62,7 +62,8 @@ export function maps_positions (params,behavior){ 'behavior': behavior, } this.version.check(call.urlTemplate,{ - introduced:"v1.0" + introduced:"v1.0", + deprecated:"v2.0" }); return this.simple_brapi_call(call); } @@ -84,7 +85,29 @@ export function maps_linkagegroups_detail (params,behavior){ 'behavior': behavior, } this.version.check(call.urlTemplate,{ - introduced:"v1.0" + introduced:"v1.0", + deprecated:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /maps/{mapsDbId}/linkagegroups` + * @alias BrAPINode.prototype.maps_linkagegroups + * @param {Object} params Parameters to provide to the call + * @param {String} params.mapsDbId mapsDbId + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function maps_linkagegroups (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/maps/{mapsDbId}/linkagegroups', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" }); return this.simple_brapi_call(call); } diff --git a/src/brapi_methods/markers.js b/src/brapi_methods/markers.js index c4e84a4..580d34e 100644 --- a/src/brapi_methods/markers.js +++ b/src/brapi_methods/markers.js @@ -16,12 +16,14 @@ export function markers(params,behavior){ if(this.version.predates("v1.3")){ this.version.check(call.urlTemplate,{ introduced:"v1.0", - deprecated:"v1.1" + deprecated:"v1.1", + deprecated:"v2.0" }); } else { this.version.check(call.urlTemplate,{ - introduced:"v1.3" + introduced:"v1.3", + deprecated:"v2.0" }); } return this.simple_brapi_call(call); @@ -41,7 +43,28 @@ export function markers_detail (params){ 'behavior': 'map', } this.version.check(call.urlTemplate,{ - introduced:"v1.0" + introduced:"v1.0", + deprecated:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /markerpositions` + * @alias BrAPINode.prototype.markerpositions + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function markerpositions (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/markerpositions', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" }); return this.simple_brapi_call(call); } @@ -73,13 +96,29 @@ export function search_markers(params,behavior,useOld){ call.defaultMethod = "post"; this.version.check(call.urlTemplate,{ introduced:"v1.1", - deprecated:"v1.3" + deprecated:"v1.3", + deprecated:"v2.0" }); return this.simple_brapi_call(call); } else { this.version.check("POST /search/markers -> GET /search/markers",{ - introduced:"v1.3" + introduced:"v1.3", + deprecated:"v2.0" }); return this.search("markers",params,behavior); } }; + + +/** `POST /search/markerpositions -> GET /search/markerpositions` +* @alias BrAPINode.prototype.search_markerpositions +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function search_markerpositions(params,behavior){ + this.version.check("POST /search/markerpositions -> GET /search/markerpositions",{ + introduced:"v2.0" + }); + return this.search("markerpositions",params,behavior); +}; diff --git a/src/brapi_methods/samples.js b/src/brapi_methods/samples.js index 9eff650..1cf1895 100644 --- a/src/brapi_methods/samples.js +++ b/src/brapi_methods/samples.js @@ -16,16 +16,36 @@ export function samples (params){ return this.simple_brapi_call(call); } -/** `GET /samples/{sampleId}` +/** `POST /samples` +* @alias BrAPINode.prototype.samples_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function samples_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/samples', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /samples/{sampleDbId}` * @alias BrAPINode.prototype.samples_detail * @param {Object} params Parameters to provide to the call - * @param {String} params.sampleId sampleId + * @param {String} params.sampleDbId sampleDbId * @return {BrAPI_Behavior_Node} */ export function samples_detail (params){ var call = { - 'defaultMethod': 'put', - 'urlTemplate': '/samples/{sampleId}', + 'defaultMethod': 'get', + 'urlTemplate': '/samples/{sampleDbId}', 'params': params, 'behavior': 'map', } @@ -35,6 +55,25 @@ export function samples_detail (params){ return this.simple_brapi_call(call); } +/** `PUT /samples/{sampleDbId}` + * @alias BrAPINode.prototype.samples_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.sampleDbId sampleDbId + * @return {BrAPI_Behavior_Node} + */ +export function samples_modify (params){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/samples/{sampleDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `POST /samples-search` * @alias BrAPINode.prototype.samples_search * @param {Object} params Parameters to provide to the call @@ -62,7 +101,8 @@ export function search_samples(params,behavior,useOld){ call.defaultMethod = "post"; this.version.check(call.urlTemplate,{ introduced:"v1.1", - deprecated:"v1.3" + deprecated:"v1.3", + deprecated:"v2.0" }); return this.simple_brapi_call(call); } else { From 90c10c4fc524a8c1a1d09776f00f42998d0bc3d4 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 18 Mar 2021 16:26:03 -0400 Subject: [PATCH 24/31] add attributevalues, callsets crosses --- src/brapi_methods/attributevalues.js | 92 ++++++++++++++++++++++++++++ src/brapi_methods/callsets.js | 73 ++++++++++++++++++++++ src/brapi_methods/crosses.js | 59 ++++++++++++++++++ 3 files changed, 224 insertions(+) create mode 100644 src/brapi_methods/attributevalues.js create mode 100644 src/brapi_methods/callsets.js create mode 100644 src/brapi_methods/crosses.js diff --git a/src/brapi_methods/attributevalues.js b/src/brapi_methods/attributevalues.js new file mode 100644 index 0000000..e7b3beb --- /dev/null +++ b/src/brapi_methods/attributevalues.js @@ -0,0 +1,92 @@ +/** `GET /attributevalues` + * @alias BrAPINode.prototype.attributevalues + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function attributevalues (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/attributevalues', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v1.3" + }); + return this.simple_brapi_call(call); +} + +/** `POST /attributevalues` +* @alias BrAPINode.prototype.attributevalues_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function attributevalues_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/attributevalues', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /attributevalues/{attributeValueDbId}` + * @alias BrAPINode.prototype.attributevalues_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.attributeValueDbId attributeValueDbId + * @return {BrAPI_Behavior_Node} + */ +export function attributevalues_detail (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/attributevalues/{attributeValueDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v1.3" + }); + return this.simple_brapi_call(call); +} + +/** `PUT /attributevalues/{attributeValueDbId}` +* @alias BrAPINode.prototype.attributevalues_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function attributevalues_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/attributevalues/{attributeValueDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + + +/** `POST /search/attributevalues -> GET /search/attributevalues` +* @alias BrAPINode.prototype.search_attributevalues +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function search_attributevalues(params,behavior){ + this.version.check("POST /search/attributevalues -> GET /search/attributevalues",{ + introduced:"v1.3" + }); + return this.search("attributevalues",params,behavior); +}; diff --git a/src/brapi_methods/callsets.js b/src/brapi_methods/callsets.js new file mode 100644 index 0000000..29a8754 --- /dev/null +++ b/src/brapi_methods/callsets.js @@ -0,0 +1,73 @@ + +/** `GET /callsets` + * @alias BrAPINode.prototype.callsets + * @param {Object} params Parameters to provide to the call + * @param {String} params.germplasmDbId germplasmDbId + * @return {BrAPI_Behavior_Node} + */ +export function callsets (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/callsets', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + + +/** `GET /callsets/{callSetDbId}` + * @alias BrAPINode.prototype.callsets_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.callSetDbId callSetDbId + * @return {BrAPI_Behavior_Node} + */ +export function callsets_detail (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/callsets/{callSetDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + + +/** `GET /callsets/{callSetDbId}/calls` + * @alias BrAPINode.prototype.callsets_detail_calls + * @param {Object} params Parameters to provide to the call + * @param {String} params.callSetDbId callSetDbId + * @return {BrAPI_Behavior_Node} + */ +export function callsets_detail_calls (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/callsets/{callSetDbId}/calls', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + + +/** `POST /search/callsets -> GET /search/callsets` +* @alias BrAPINode.prototype.search_callsets +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function search_callsets(params,behavior){ + this.version.check("POST /search/callsets -> GET /search/callsets",{ + introduced:"v2.0" + }); + return this.search("callsets",params,behavior); +}; diff --git a/src/brapi_methods/crosses.js b/src/brapi_methods/crosses.js new file mode 100644 index 0000000..8257545 --- /dev/null +++ b/src/brapi_methods/crosses.js @@ -0,0 +1,59 @@ +/** `GET /crosses` + * @alias BrAPINode.prototype.crosses + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function crosses (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/crosses', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `POST /crosses` +* @alias BrAPINode.prototype.crosses_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function crosses_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/crosses', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `PUT /crosses` +* @alias BrAPINode.prototype.crosses_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function crosses_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/crosses', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} \ No newline at end of file From 2fc24595e89134612d8909c654999dfe26aa7412 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 18 Mar 2021 16:27:12 -0400 Subject: [PATCH 25/31] add crossingprojects plannedcrosses, references --- src/brapi_methods/crossingprojects.js | 79 +++++++++++++++++++++++++++ src/brapi_methods/plannedcrosses.js | 60 ++++++++++++++++++++ src/brapi_methods/references.js | 70 ++++++++++++++++++++++++ src/brapi_methods/referencesets.js | 51 +++++++++++++++++ 4 files changed, 260 insertions(+) create mode 100644 src/brapi_methods/crossingprojects.js create mode 100644 src/brapi_methods/plannedcrosses.js create mode 100644 src/brapi_methods/references.js create mode 100644 src/brapi_methods/referencesets.js diff --git a/src/brapi_methods/crossingprojects.js b/src/brapi_methods/crossingprojects.js new file mode 100644 index 0000000..d7e05d5 --- /dev/null +++ b/src/brapi_methods/crossingprojects.js @@ -0,0 +1,79 @@ +/** `GET /crossingprojects` + * @alias BrAPINode.prototype.crossingprojects + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function crossingprojects (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/crossingprojects', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `POST /crossingprojects` +* @alias BrAPINode.prototype.crossingprojects_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function crossingprojects_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/crossingprojects', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /crossingprojects/{crossingProjectDbId}` + * @alias BrAPINode.prototype.crossingprojects_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.crossingProjectDbId crossingProjectDbId + * @return {BrAPI_Behavior_Node} + */ +export function crossingprojects_detail (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/crossingprojects/{crossingProjectDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + + +/** `PUT /crossingprojects/{crossingProjectDbId}` +* @alias BrAPINode.prototype.crossingprojects_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function crossingprojects_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/crossingprojects/{crossingProjectDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} diff --git a/src/brapi_methods/plannedcrosses.js b/src/brapi_methods/plannedcrosses.js new file mode 100644 index 0000000..6a9f271 --- /dev/null +++ b/src/brapi_methods/plannedcrosses.js @@ -0,0 +1,60 @@ +/** `GET /plannedcrosses` + * @alias BrAPINode.prototype.plannedcrosses + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function plannedcrosses (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/plannedcrosses', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `POST /plannedcrosses` +* @alias BrAPINode.prototype.plannedcrosses_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function plannedcrosses_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/plannedcrosses', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + + +/** `PUT /plannedcrosses` +* @alias BrAPINode.prototype.plannedcrosses_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function plannedcrosses_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/plannedcrosses', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} \ No newline at end of file diff --git a/src/brapi_methods/references.js b/src/brapi_methods/references.js new file mode 100644 index 0000000..95f68fd --- /dev/null +++ b/src/brapi_methods/references.js @@ -0,0 +1,70 @@ +/** `GET /references` + * @alias BrAPINode.prototype.references + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function references (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/references', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /references/{referenceDbId}` + * @alias BrAPINode.prototype.references_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.referenceDbId referenceDbId + * @return {BrAPI_Behavior_Node} + */ +export function references_detail (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/references/{referenceDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /references/{referenceDbId}/bases` + * @alias BrAPINode.prototype.references_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.referenceDbId referenceDbId + * @return {BrAPI_Behavior_Node} + */ +export function references_detail_bases (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/references/{referenceDbId}/bases', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `POST /search/references -> GET /search/references` +* @alias BrAPINode.prototype.search_references +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function search_references(params,behavior){ + this.version.check("POST /search/references -> GET /search/references",{ + introduced:"v2.0" + }); + return this.search("references",params,behavior); +}; diff --git a/src/brapi_methods/referencesets.js b/src/brapi_methods/referencesets.js new file mode 100644 index 0000000..6a68b76 --- /dev/null +++ b/src/brapi_methods/referencesets.js @@ -0,0 +1,51 @@ +/** `GET /referencesets` + * @alias BrAPINode.prototype.referencesets + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function referencesets (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/referencesets', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /referencesets/{referenceSetDbId}` + * @alias BrAPINode.prototype.referencesets_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.referenceSetDbId referenceSetDbId + * @return {BrAPI_Behavior_Node} + */ +export function referencesets_detail (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/referencesets/{referenceSetDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `POST /search/referencesets -> GET /search/referencesets` +* @alias BrAPINode.prototype.search_referencesets +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function search_referencesets(params,behavior){ + this.version.check("POST /search/referencesets -> GET /search/referencesets",{ + introduced:"v2.0" + }); + return this.search("referencesets",params,behavior); +}; From 1f3cb31330ae7986f5d1642d02d30b8bf3513f07 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 18 Mar 2021 16:28:04 -0400 Subject: [PATCH 26/31] adding seedlots, variants, variantsets --- src/brapi_methods/seedlots.js | 139 +++++++++++++++++++++++++++++++ src/brapi_methods/variants.js | 70 ++++++++++++++++ src/brapi_methods/variantsets.js | 134 +++++++++++++++++++++++++++++ 3 files changed, 343 insertions(+) create mode 100644 src/brapi_methods/seedlots.js create mode 100644 src/brapi_methods/variants.js create mode 100644 src/brapi_methods/variantsets.js diff --git a/src/brapi_methods/seedlots.js b/src/brapi_methods/seedlots.js new file mode 100644 index 0000000..0553530 --- /dev/null +++ b/src/brapi_methods/seedlots.js @@ -0,0 +1,139 @@ +/** `GET /seedlots` + * @alias BrAPINode.prototype.seedlots + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function seedlots (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/seedlots', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `POST /seedlots` +* @alias BrAPINode.prototype.seedlots_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function seedlots_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/seedlots', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /seedlots/{seedLotDbId}` + * @alias BrAPINode.prototype.seedlots_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.seedLotDbId seedLotDbId + * @return {BrAPI_Behavior_Node} + */ +export function seedlots_detail (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/seedlots/{seedLotDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `PUT /seedlots/{seedLotDbId}` +* @alias BrAPINode.prototype.seedlots_modify +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function seedlots_modify (params,behavior){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/seedlots/{seedLotDbId}', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /seedlots/transactions` + * @alias BrAPINode.prototype.seedlots_transactions + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function seedlots_transactions (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/seedlots/transactions', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `POST /seedlots/transactions` +* @alias BrAPINode.prototype.seedlots_transactions_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ + +export function seedlots_transactions_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/seedlots/transactions', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /seedlots/{seedLotDbId}/transactions` + * @alias BrAPINode.prototype.seedlots_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.seedLotDbId seedLotDbId + * @return {BrAPI_Behavior_Node} + */ + +export function seedlots_detail_transactions (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/seedlots/{seedLotDbId}/transactions', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} diff --git a/src/brapi_methods/variants.js b/src/brapi_methods/variants.js new file mode 100644 index 0000000..3089040 --- /dev/null +++ b/src/brapi_methods/variants.js @@ -0,0 +1,70 @@ +/** `GET /variants` + * @alias BrAPINode.prototype.variants + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function variants (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/variants', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /variants/{variantDbId}` + * @alias BrAPINode.prototype.variants_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.variantDbId variantDbId + * @return {BrAPI_Behavior_Node} + */ +export function variants_detail (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/variants/{variantDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /variants/{variantDbId}/calls` + * @alias BrAPINode.prototype.variants_calls + * @param {Object} params Parameters to provide to the call + * @param {String} params.variantDbId variantDbId + * @return {BrAPI_Behavior_Node} + */ +export function variants_calls (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/variants/{variantDbId}/calls', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `POST /search/variants -> GET /search/variants` +* @alias BrAPINode.prototype.search_variants +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function search_variants(params,behavior){ + this.version.check("POST /search/variants -> GET /search/variants",{ + introduced:"v2.0" + }); + return this.search("variants",params,behavior); +}; diff --git a/src/brapi_methods/variantsets.js b/src/brapi_methods/variantsets.js new file mode 100644 index 0000000..d584f7b --- /dev/null +++ b/src/brapi_methods/variantsets.js @@ -0,0 +1,134 @@ +/** `GET /variantsets` + * @alias BrAPINode.prototype.variantsets + * @param {Object} params Parameters to provide to the call + * @param {String} [behavior="fork"] Behavior of the node + * @return {BrAPI_Behavior_Node} + */ +export function variantsets (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/variantsets', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `POST /variantsets/extract` +* @alias BrAPINode.prototype.variantsets_extract_store +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function variantsets_extract_store (params,behavior){ + var call = { + 'defaultMethod': 'post', + 'urlTemplate': '/variantsets/extract', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /variantsets/{variantSetDbId}` + * @alias BrAPINode.prototype.variantsets_detail + * @param {Object} params Parameters to provide to the call + * @param {String} params.variantSetDbId variantSetDbId + * @return {BrAPI_Behavior_Node} + */ +export function variantsets_detail (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/variantsets/{variantSetDbId}', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /variantsets/{variantSetDbId}/calls` +* @alias BrAPINode.prototype.variantsets_calls +* @param {Object} params Parameters to provide to the call +* @param {String} params.variantSetDbId variantSetDbId +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function variantsets_calls (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/variantsets/{variantSetDbId}/calls', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /variantsets/{variantSetDbId}/callsets` +* @alias BrAPINode.prototype.variantsets_callsets +* @param {Object} params Parameters to provide to the call +* @param {String} params.variantSetDbId variantSetDbId +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function variantsets_callsets (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/variantsets/{variantSetDbId}/callsets', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `GET /variantsets/{variantSetDbId}/variants` +* @alias BrAPINode.prototype.variantsets_variants +* @param {Object} params Parameters to provide to the call +* @param {String} params.variantSetDbId variantSetDbId +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function variantsets_variants (params,behavior){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/variantsets/{variantSetDbId}/variants', + 'params': params, + 'behaviorOptions': ['fork','map'], + 'behavior': behavior, + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + +/** `POST /search/variantsets -> GET /search/variantsets` +* @alias BrAPINode.prototype.search_variantsets +* @param {Object} params Parameters to provide to the call +* @param {String} [behavior="fork"] Behavior of the node +* @return {BrAPI_Behavior_Node} +*/ +export function search_variantsets(params,behavior){ + this.version.check("POST /search/variantsets -> GET /search/variantsets",{ + introduced:"v2.0" + }); + return this.search("variantsets",params,behavior); +}; From a9373de82e5b355713c966cba912cd3578290516 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Thu, 18 Mar 2021 17:05:42 -0400 Subject: [PATCH 27/31] fix duplicated function names --- src/brapi_methods/callsets.js | 4 ++-- src/brapi_methods/observations.js | 6 +++--- src/brapi_methods/observationunits.js | 2 +- src/brapi_methods/phenotypes.js | 6 +++--- src/brapi_methods/references.js | 4 ++-- src/brapi_methods/samples.js | 2 +- src/brapi_methods/seedlots.js | 2 +- src/brapi_methods/studies.js | 2 +- src/brapi_methods/vendor.js | 4 ++-- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/brapi_methods/callsets.js b/src/brapi_methods/callsets.js index 29a8754..8fb630c 100644 --- a/src/brapi_methods/callsets.js +++ b/src/brapi_methods/callsets.js @@ -40,12 +40,12 @@ export function callsets_detail (params){ /** `GET /callsets/{callSetDbId}/calls` - * @alias BrAPINode.prototype.callsets_detail_calls + * @alias BrAPINode.prototype.callsets_calls * @param {Object} params Parameters to provide to the call * @param {String} params.callSetDbId callSetDbId * @return {BrAPI_Behavior_Node} */ -export function callsets_detail_calls (params){ +export function callsets_calls (params){ var call = { 'defaultMethod': 'get', 'urlTemplate': '/callsets/{callSetDbId}/calls', diff --git a/src/brapi_methods/observations.js b/src/brapi_methods/observations.js index 97c1c92..f128130 100644 --- a/src/brapi_methods/observations.js +++ b/src/brapi_methods/observations.js @@ -19,7 +19,7 @@ export function observations (params,behavior){ } /** `POST /observations` - * @alias BrAPINode.prototype.observations + * @alias BrAPINode.prototype.observations_store * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} @@ -38,7 +38,7 @@ export function observations_store (params,behavior){ } /** `PUT /observations` - * @alias BrAPINode.prototype.observations + * @alias BrAPINode.prototype.observations_modify * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} @@ -78,7 +78,7 @@ export function observations_detail (params){ /** `PUT /observations/{observationDbId}` -* @alias BrAPINode.prototype.observations_modify +* @alias BrAPINode.prototype.observations_detail_modify * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} diff --git a/src/brapi_methods/observationunits.js b/src/brapi_methods/observationunits.js index 1d4dc02..7916eaf 100644 --- a/src/brapi_methods/observationunits.js +++ b/src/brapi_methods/observationunits.js @@ -78,7 +78,7 @@ export function observationunits_detail (params){ } /** `PUT /observationunits/{observationUnitDbId}` -* @alias BrAPINode.prototype.observationunits_modify +* @alias BrAPINode.prototype.observationunits_detail_modify * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} diff --git a/src/brapi_methods/phenotypes.js b/src/brapi_methods/phenotypes.js index db9b2fb..f7415ac 100644 --- a/src/brapi_methods/phenotypes.js +++ b/src/brapi_methods/phenotypes.js @@ -40,7 +40,7 @@ export function phenotypes_search (params,behavior){ } /** `POST /phenotypes-search/csv` - * @alias BrAPINode.prototype.phenotypes_search + * @alias BrAPINode.prototype.phenotypes_search_csv * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} @@ -61,7 +61,7 @@ export function phenotypes_search_csv (params,behavior){ } /** `POST /phenotypes-search/table` - * @alias BrAPINode.prototype.phenotypes_search + * @alias BrAPINode.prototype.phenotypes_search_table * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} @@ -82,7 +82,7 @@ export function phenotypes_search_table (params,behavior){ } /** `POST /phenotypes-search/tsv` - * @alias BrAPINode.prototype.phenotypes_search + * @alias BrAPINode.prototype.phenotypes_search_tsv * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} diff --git a/src/brapi_methods/references.js b/src/brapi_methods/references.js index 95f68fd..8bb1972 100644 --- a/src/brapi_methods/references.js +++ b/src/brapi_methods/references.js @@ -38,12 +38,12 @@ export function references_detail (params){ } /** `GET /references/{referenceDbId}/bases` - * @alias BrAPINode.prototype.references_detail + * @alias BrAPINode.prototype.references_bases * @param {Object} params Parameters to provide to the call * @param {String} params.referenceDbId referenceDbId * @return {BrAPI_Behavior_Node} */ -export function references_detail_bases (params){ +export function references_bases (params){ var call = { 'defaultMethod': 'get', 'urlTemplate': '/references/{referenceDbId}/bases', diff --git a/src/brapi_methods/samples.js b/src/brapi_methods/samples.js index 1cf1895..dfbb301 100644 --- a/src/brapi_methods/samples.js +++ b/src/brapi_methods/samples.js @@ -56,7 +56,7 @@ export function samples_detail (params){ } /** `PUT /samples/{sampleDbId}` - * @alias BrAPINode.prototype.samples_detail + * @alias BrAPINode.prototype.samples_modify * @param {Object} params Parameters to provide to the call * @param {String} params.sampleDbId sampleDbId * @return {BrAPI_Behavior_Node} diff --git a/src/brapi_methods/seedlots.js b/src/brapi_methods/seedlots.js index 0553530..470024f 100644 --- a/src/brapi_methods/seedlots.js +++ b/src/brapi_methods/seedlots.js @@ -119,7 +119,7 @@ export function seedlots_transactions_store (params,behavior){ } /** `GET /seedlots/{seedLotDbId}/transactions` - * @alias BrAPINode.prototype.seedlots_detail + * @alias BrAPINode.prototype.seedlots_detail_transactions * @param {Object} params Parameters to provide to the call * @param {String} params.seedLotDbId seedLotDbId * @return {BrAPI_Behavior_Node} diff --git a/src/brapi_methods/studies.js b/src/brapi_methods/studies.js index f99ec07..1acf263 100644 --- a/src/brapi_methods/studies.js +++ b/src/brapi_methods/studies.js @@ -221,7 +221,7 @@ export function studies_observations_modify (params){ } /** `POST /studies/{studyDbId}/observations/zip` - * @alias BrAPINode.prototype.studies_observations_modify + * @alias BrAPINode.prototype.studies_observations_zip * @param {Object} params Parameters to provide to the call * @param {String} params.studyDbId studyDbId * @return {BrAPI_Behavior_Node} diff --git a/src/brapi_methods/vendor.js b/src/brapi_methods/vendor.js index b6e4a39..ac1441e 100644 --- a/src/brapi_methods/vendor.js +++ b/src/brapi_methods/vendor.js @@ -112,11 +112,11 @@ export function vendor_orders (params){ } /** `POST /vendor/orders` - * @alias BrAPINode.prototype.vendor_orders + * @alias BrAPINode.prototype.vendor_orders_store * @param {Object} params Parameters to provide to the call * @return {BrAPI_Behavior_Node} */ -export function vendor_orders (params){ +export function vendor_orders_store (params){ var call = { 'defaultMethod': 'post', 'urlTemplate': '/vendor/orders', From 5fdb7f6a4f7446e26663ab2f0b537ef1dd362c55 Mon Sep 17 00:00:00 2001 From: Mirella Flores Date: Fri, 19 Mar 2021 11:56:58 -0400 Subject: [PATCH 28/31] Readme --- docs/README.md | 303 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 207 insertions(+), 96 deletions(-) diff --git a/docs/README.md b/docs/README.md index 594e153..7fc5f4b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -194,99 +194,210 @@ This method registers a callback function which is called once a node has loaded ### Available BrAPI Methods -| BrAPI.js Method | BrAPI Call | Default HTTPMethod | -| --------------- | ---------- | ------------------ | -| _node_.allelematrices_search(_params_,...) | `/allelematrices-search`(>=v1.2) or `/allelematrix-search`(=v1.2) or `/crops`(=v1.2) or `/observationLevels`(GET` | -| _node_.search_images(_params_,...) | `/search/images` | `POST-->GET` | -| _node_.search_markers(_params_,...) | `/markers-search`, `/search/markers` | `POST-->GET` | -| _node_.search_observationtables(_params_,...) | `/search/observationtables` | `POST-->GET` | -| _node_.search_observationunits(_params_,...) | `/search/observationunits` | `POST-->GET` | -| _node_.search_programs(_params_,...) | `/programs-search`, `/search/programs` | `POST-->GET` | -| _node_.search_samples(_params_,...) | `/samples-search`, `/search/samples` | `POST-->GET` | -| _node_.search_studies(_params_,...) | `/studies-search`, `/search/studies` | `POST-->GET` | -| _node_.search_variables(_params_,...) | `/variables-search`, `/search/variables` | `POST-->GET` | -| _node_.search(_entity_, _params_,...) | `/search/{entity-->search/{entity}/{searchResultDbId}` | `POST-->GET` | -| _node_.search_POST(_entity_, _params_,...)| `/search/{entity}` | `POST` | -| _node_.search_GET(_entity_, _params_,...)| `/search/{entity}/{searchResultDbId}` | `GET` | -| _node_.seasons(_params_,...) | `/seasons` | `GET` | -| _node_.studies_detail(_params_,...) | `/studies/{studyDbId}` | `GET` | -| _node_.studies_germplasm(_params_,...) | `/studies/{studyDbId}/germplasm` | `GET` | -| _node_.studies_layouts(_params_,...) | `/studies/{studyDbId}/layouts`, `/studies/{studyDbId}/layout` | `GET` | -| _node_.studies_observations_modify(_params_,...) | `/studies/{studyDbId}/observations/zip` | `POST` | -| _node_.studies_observations_modify(_params_,...) | `PUT /studies/{studyDbId}/observations`(>=v1.1) or `/studies/{studyDbId}/observations`(=v1.1) or `/studyTypes`(=v1.2) or `/vendor/plate-search`(=v1.2) or `/allelematrix-search`(=v1.2) or `/crops`(=v1.2)|| +| _node_.crosses_modify(_params_,...)||| +| _node_.crosses_store(_params_,...)|| `/crosses`|| +| _node_.crosses(_params_,...)|| `/crosses`|| +| _node_.crossingprojects_detail(_params_,...)|| `/crossingprojects/{crossingProjectDbId}`|| +| _node_.crossingprojects_modify(_params_,...)||| +| _node_.crossingprojects_store(_params_,...)|| `/crossingprojects`|| +| _node_.crossingprojects(_params_,...)|| `/crossingprojects`|| +| _node_.events(_params_,...)|| `/events`|| +| _node_.germplasm_attributes(_params_,...) | `/germplasm/{germplasmDbId}/attributes` || | +| _node_.germplasm_detail(_params_,...) | `/germplasm/{germplasmDbId}| /germplasm/{germplasmDbId}`|| +| _node_.germplasm_markerprofiles(_params_,...) | `/germplasm/{germplasmDbId}/markerprofiles` || | +| _node_.germplasm_mcpd(_params_,...) | `/germplasm/{germplasmDbId}/mcpd` || | +| _node_.germplasm_modify(_params_,...)||| +| _node_.germplasm_pedigree(_params_,...) | `/germplasm/{germplasmDbId}/pedigree| /germplasm/{germplasmDbId}/pedigree`|| +| _node_.germplasm_progeny(_params_,...) | `/germplasm/{germplasmDbId}/progeny| /germplasm/{germplasmDbId}/progeny`|| +| _node_.germplasm_search(_params_,...) | `/germplasm-search` || `POST` +| _node_.germplasm_store(_params_,...)|| `/germplasm`|| +| _node_.germplasm(_params_,...) | `/germplasm| /germplasm`|| +| _node_.images_detail(_params_,...) | `/images/{imageDbId}| /images/{imageDbId}`|| +| _node_.images_imagecontent(_params_,...) | `/images/{imageDbId}/imagecontent` || | +| _node_.images_modify(_params_,...)||| +| _node_.images_store(_params_,...)|| `/images`|| +| _node_.images(_params_,...) | `/images| /images`|| +| _node_.lists_detail(_params_,...) | `/lists/{listDbId}| /lists/{listDbId}`|| +| _node_.lists_items(_params_,...) | `/lists/{listDbId}/items` || | +| _node_.lists_modify(_params_,...)||| +| _node_.lists_search(_params_,...)||| +| _node_.lists_store_items(_params_,...)||`/lists/{listDbId}/items`|| +| _node_.lists_store(_params_,...)|| `/lists`|| +| _node_.lists(_params_,...) | `/lists| /lists`|| +| _node_.locations_detail(_params_,...) | `/locations/{locationDbId}| /locations/{locationDbId}`|| +| _node_.locations_modify(_params_,...)||| +| _node_.locations_search(_params_,...)||| +| _node_.locations_store(_params_,...)|| `/locations`|| +| _node_.locations(_params_,...) | `/locations| /locations`|| +| _node_.maps_detail(_params_,...) | `/maps/{mapDbId}| /maps/{mapDbId}`|| +| _node_.maps_linkagegroups_detail(_params_,...) | `/maps/{mapsDbId}/positions/{linkageGroupId}` || | +| _node_.maps_linkagegroups(_params_,...)||| +| _node_.maps_positions(_params_,...) | `/maps/{mapsDbId}/positions` || | +| _node_.maps(_params_,...) | `/maps| /maps`|| +| _node_.markerpositions(_params_,...)||| +| _node_.markerprofiles_detail(_params_,...) | `/markerprofiles/{markerprofileDbId}` || | +| _node_.markerprofiles_search(_params_,...) | `/markerprofiles-search` || `POST` +| _node_.markerprofiles(_params_,...) | `/markerprofiles` || | +| _node_.markers_detail(_params_,...) | `/markers/{markerDbId}` || | +| _node_.markers_search(_params_,...) | `/markers-search` || `POST` +| _node_.markers(_params_,...) | `/markers` || | +| _node_.methods_detail(_params_,...) | `/methods/{methodDbId}| /methods/{methodDbId}`|| +| _node_.methods_modify(_params_,...)||| +| _node_.methods_store(_params_,...)||| +| _node_.methods(_params_,...) | `/methods| /methods`|| +| _node_.observationlevels(_params_,...) | `/observationlevels`(>=v1.2) or `/observationLevels`(GET` +| _node_.search_attributevalues(_params_,...)|| `/search/attributevalues`, `POST-->GET` +| _node_.search_calls(_params_,...)|| `/search/calls`, `POST-->GET` +| _node_.search_callsets(_params_,...)|| `/search/callsets`, `POST-->GET` +| _node_.search_germplasm(_params_,...) || `/germplasm-search`, `/search/germplasm` || `POST-->GET` +| _node_.search_GET(_entity_, _params_,...)| `/search/{entity}/{searchResultDbId}` || | +| _node_.search_images(_params_,...) | `/search/images| /search/images`, `POST-->GET` +| _node_.search_lists(_params_,...)|| `/search/lists`, `POST-->GET` +| _node_.search_locations(_params_,...)|| `/search/locations`, `POST-->GET` +| _node_.search_markerpositions(_params_,...)|| `/search/markerpositions`, `POST-->GET` +| _node_.search_markers(_params_,...) || `/markers-search`, `/search/markers` || `POST-->GET` +| _node_.search_observations(_params_,...)|| `/search/observations`, +| _node_.search_observationtables(_params_,...) | `/search/observationtables` || `POST-->GET` +| _node_.search_observationunits(_params_,...) | `/search/observationunits| /search/observationunits`, `POST-->GET` +| _node_.search_people(_params_,...)|| `/search/people`, `POST-->GET` +| _node_.search_POST(_entity_, _params_,...)| `/search/{entity}` || `POST` +| _node_.search_programs(_params_,...) || `/programs-search`, `/search/programs` || `POST-->GET` +| _node_.search_references(_params_,...)|| `/search/references`, `POST-->GET` +| _node_.search_referencesets(_params_,...)|| `/search/referencesets`, `POST-->GET` +| _node_.search_samples(_params_,...) || `/samples-search`, `/search/samples` || `POST-->GET` +| _node_.search_studies(_params_,...) || `/studies-search`, `/search/studies` || `POST-->GET` +| _node_.search_trials(_params_,...)|| `/search/trials`, `POST-->GET` +| _node_.search_variables(_params_,...) || `/variables-search`, `/search/variables` || `POST-->GET` +| _node_.search_variants(_params_,...)|| `/search/variants`, `POST-->GET` +| _node_.search_variantsets(_params_,...)|| `/search/variantsets`, `POST-->GET` +| _node_.search(_entity_, _params_,...) | `/search/{entity-->search/{entity}/{searchResultDbId}` || `POST-->GET` +| _node_.seasons_detail(_params_,...)||| +| _node_.seasons_modify(_params_,...)|| `/seasons/{seasonDbId}`,`PUT` +| _node_.seasons_store(_params_,...)|| `/seasons`|| +| _node_.seasons(_params_,...) | `/seasons| /seasons`|| +| _node_.seedlots_detail_transactions(_params_,...)||| +| _node_.seedlots_detail(_params_,...)||| +| _node_.seedlots_modify(_params_,...)|| `/seedlots/{seedLotDbId}`,`PUT` +| _node_.seedlots_store(_params_,...)|| `/seedlots`|| +| _node_.seedlots_transactions_store(_params_,...)|| `/seedlots/transactions`|| +| _node_.seedlots_transactions(_params_,...)||| +| _node_.seedlots(_params_,...)||| +| _node_.serverinfo(_params_,...)||| +| _node_.studies_detail(_params_,...) | `/studies/{studyDbId}` || | +| _node_.studies_germplasm(_params_,...) | `/studies/{studyDbId}/germplasm` || | +| _node_.studies_layouts(_params_,...) || `/studies/{studyDbId}/layouts`, `/studies/{studyDbId}/layout` || | +| _node_.studies_modify(_params_,...)|| `/studies/{studyDbId}`,`PUT` +| _node_.studies_observations_modify(_params_,...) | `/studies/{studyDbId}/observations/zip` || `POST` +| _node_.studies_observations_modify(_params_,...) | `PUT /studies/{studyDbId}/observations`(>=v1.1) or `/studies/{studyDbId}/observations`(=v1.1) or `/studyTypes`(=v1.2) or `/vendor/plate-search`( Date: Fri, 19 Mar 2021 12:47:29 -0400 Subject: [PATCH 29/31] update readme --- docs/README.md | 388 ++++++++++++++++++++++++------------------------- 1 file changed, 194 insertions(+), 194 deletions(-) diff --git a/docs/README.md b/docs/README.md index 7fc5f4b..f07391c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -194,210 +194,210 @@ This method registers a callback function which is called once a node has loaded ### Available BrAPI Methods -| BrAPI.js Method | BrAPI Call | BrAPI V2 Call | Default HTTPMethod | -| --------------- | ---------- | ------------- | ------------------ | -| _node_.allelematrices_search(_params_,...) | `/allelematrices-search`(>=v1.2) or `/allelematrix-search`(=v1.2) or `/crops`(=v1.2)|| -| _node_.crosses_modify(_params_,...)||| -| _node_.crosses_store(_params_,...)|| `/crosses`|| -| _node_.crosses(_params_,...)|| `/crosses`|| -| _node_.crossingprojects_detail(_params_,...)|| `/crossingprojects/{crossingProjectDbId}`|| -| _node_.crossingprojects_modify(_params_,...)||| -| _node_.crossingprojects_store(_params_,...)|| `/crossingprojects`|| -| _node_.crossingprojects(_params_,...)|| `/crossingprojects`|| -| _node_.events(_params_,...)|| `/events`|| -| _node_.germplasm_attributes(_params_,...) | `/germplasm/{germplasmDbId}/attributes` || | -| _node_.germplasm_detail(_params_,...) | `/germplasm/{germplasmDbId}| /germplasm/{germplasmDbId}`|| -| _node_.germplasm_markerprofiles(_params_,...) | `/germplasm/{germplasmDbId}/markerprofiles` || | -| _node_.germplasm_mcpd(_params_,...) | `/germplasm/{germplasmDbId}/mcpd` || | -| _node_.germplasm_modify(_params_,...)||| -| _node_.germplasm_pedigree(_params_,...) | `/germplasm/{germplasmDbId}/pedigree| /germplasm/{germplasmDbId}/pedigree`|| -| _node_.germplasm_progeny(_params_,...) | `/germplasm/{germplasmDbId}/progeny| /germplasm/{germplasmDbId}/progeny`|| -| _node_.germplasm_search(_params_,...) | `/germplasm-search` || `POST` -| _node_.germplasm_store(_params_,...)|| `/germplasm`|| -| _node_.germplasm(_params_,...) | `/germplasm| /germplasm`|| -| _node_.images_detail(_params_,...) | `/images/{imageDbId}| /images/{imageDbId}`|| -| _node_.images_imagecontent(_params_,...) | `/images/{imageDbId}/imagecontent` || | -| _node_.images_modify(_params_,...)||| -| _node_.images_store(_params_,...)|| `/images`|| -| _node_.images(_params_,...) | `/images| /images`|| -| _node_.lists_detail(_params_,...) | `/lists/{listDbId}| /lists/{listDbId}`|| -| _node_.lists_items(_params_,...) | `/lists/{listDbId}/items` || | -| _node_.lists_modify(_params_,...)||| +| BrAPI.js Method | BrAPI Call (<= v1.3) | BrAPI Call (v2.0) | Default HTTPMethod | +| --------------- | -------------------- | --------------- | ------------------ | +| _node_.allelematrices_search(_params_,...) | `/allelematrices-search`(>=v1.2) or `/allelematrix-search`(=v1.2) or `/crops`(=v1.2), `GET` | +| _node_.crosses_modify(_params_,...)||`/crosses` | `PUT` | +| _node_.crosses_store(_params_,...)||`/crosses` | `POST` | +| _node_.crosses(_params_,...)||`/crosses` | `GET` | +| _node_.crossingprojects_detail(_params_,...)||`/crossingprojects/{crossingProjectDbId}` | `GET` | +| _node_.crossingprojects_modify(_params_,...)||`/crossingprojects/{crossingProjectDbId}` | `PUT` | +| _node_.crossingprojects_store(_params_,...)||`/crossingprojects` | `POST` | +| _node_.crossingprojects(_params_,...)||`/crossingprojects` | `GET` | +| _node_.events(_params_,...)||`/events` | `GET` | +| _node_.germplasm_attributes(_params_,...) | `/germplasm/{germplasmDbId}/attributes` | | `GET` | +| _node_.germplasm_detail(_params_,...) | `/germplasm/{germplasmDbId}` | `/germplasm/{germplasmDbId}` | `GET` | +| _node_.germplasm_markerprofiles(_params_,...) | `/germplasm/{germplasmDbId}/markerprofiles` | | `GET` | +| _node_.germplasm_mcpd(_params_,...) | `/germplasm/{germplasmDbId}/mcpd` | | `GET` | +| _node_.germplasm_modify(_params_,...)||`/germplasm/{germplasmDbId}` | `PUT` | +| _node_.germplasm_pedigree(_params_,...) | `/germplasm/{germplasmDbId}/pedigree` | `/germplasm/{germplasmDbId}/pedigree` | `GET` | +| _node_.germplasm_progeny(_params_,...) | `/germplasm/{germplasmDbId}/progeny` | `/germplasm/{germplasmDbId}/progeny` | `GET` | +| _node_.germplasm_search(_params_,...) | `/germplasm-search` | | `POST` | +| _node_.germplasm_store(_params_,...)||`/germplasm` | `POST` | +| _node_.germplasm(_params_,...) | `/germplasm` | `/germplasm` | `GET` | +| _node_.images_detail(_params_,...) | `/images/{imageDbId}` | `/images/{imageDbId}` | `GET` | +| _node_.images_imagecontent(_params_,...) | `/images/{imageDbId}/imagecontent` | | `PUT` | +| _node_.images_modify(_params_,...)||`/images/{imageDbId}` | `PUT` | +| _node_.images_store(_params_,...)||`/images` | `POST` | +| _node_.images(_params_,...) | `/images` | `/images` | `GET` | +| _node_.lists_detail(_params_,...) | `/lists/{listDbId}` | `/lists/{listDbId}` | `GET` | +| _node_.lists_items(_params_,...) | `/lists/{listDbId}/items` | `/lists/{listDbId}/items` | `PUT` | +| _node_.lists_modify(_params_,...)||`/lists/{listDbId}` | `PUT` | | _node_.lists_search(_params_,...)||| -| _node_.lists_store_items(_params_,...)||`/lists/{listDbId}/items`|| -| _node_.lists_store(_params_,...)|| `/lists`|| -| _node_.lists(_params_,...) | `/lists| /lists`|| -| _node_.locations_detail(_params_,...) | `/locations/{locationDbId}| /locations/{locationDbId}`|| -| _node_.locations_modify(_params_,...)||| +| _node_.lists_store_items(_params_,...)||`/lists/{listDbId}/items` | `POST` | +| _node_.lists_store(_params_,...)||`/lists` | `POST` | +| _node_.lists(_params_,...) | `/lists` | `/lists` | `GET` | +| _node_.locations_detail(_params_,...) | `/locations/{locationDbId}` | `/locations/{locationDbId}` | `GET` | +| _node_.locations_modify(_params_,...)||`/locations/{locationDbId}` | `PUT` | | _node_.locations_search(_params_,...)||| -| _node_.locations_store(_params_,...)|| `/locations`|| -| _node_.locations(_params_,...) | `/locations| /locations`|| -| _node_.maps_detail(_params_,...) | `/maps/{mapDbId}| /maps/{mapDbId}`|| -| _node_.maps_linkagegroups_detail(_params_,...) | `/maps/{mapsDbId}/positions/{linkageGroupId}` || | +| _node_.locations_store(_params_,...)||`/locations` | `POST` | +| _node_.locations(_params_,...) | `/locations` | `/locations` | `GET` | +| _node_.maps_detail(_params_,...) | `/maps/{mapDbId}` | `/maps/{mapDbId}` | `GET` | +| _node_.maps_linkagegroups_detail(_params_,...) | `/maps/{mapsDbId}/positions/{linkageGroupId}` | | `GET` | | _node_.maps_linkagegroups(_params_,...)||| -| _node_.maps_positions(_params_,...) | `/maps/{mapsDbId}/positions` || | -| _node_.maps(_params_,...) | `/maps| /maps`|| +| _node_.maps_positions(_params_,...) | `/maps/{mapsDbId}/positions` | | `GET` | +| _node_.maps(_params_,...) | `/maps` | `/maps` | `GET` | | _node_.markerpositions(_params_,...)||| -| _node_.markerprofiles_detail(_params_,...) | `/markerprofiles/{markerprofileDbId}` || | -| _node_.markerprofiles_search(_params_,...) | `/markerprofiles-search` || `POST` -| _node_.markerprofiles(_params_,...) | `/markerprofiles` || | -| _node_.markers_detail(_params_,...) | `/markers/{markerDbId}` || | -| _node_.markers_search(_params_,...) | `/markers-search` || `POST` -| _node_.markers(_params_,...) | `/markers` || | -| _node_.methods_detail(_params_,...) | `/methods/{methodDbId}| /methods/{methodDbId}`|| -| _node_.methods_modify(_params_,...)||| -| _node_.methods_store(_params_,...)||| -| _node_.methods(_params_,...) | `/methods| /methods`|| -| _node_.observationlevels(_params_,...) | `/observationlevels`(>=v1.2) or `/observationLevels`(=v1.2) or `/observationLevels`(GET` -| _node_.search_attributevalues(_params_,...)|| `/search/attributevalues`, `POST-->GET` -| _node_.search_calls(_params_,...)|| `/search/calls`, `POST-->GET` -| _node_.search_callsets(_params_,...)|| `/search/callsets`, `POST-->GET` -| _node_.search_germplasm(_params_,...) || `/germplasm-search`, `/search/germplasm` || `POST-->GET` -| _node_.search_GET(_entity_, _params_,...)| `/search/{entity}/{searchResultDbId}` || | -| _node_.search_images(_params_,...) | `/search/images| /search/images`, `POST-->GET` -| _node_.search_lists(_params_,...)|| `/search/lists`, `POST-->GET` -| _node_.search_locations(_params_,...)|| `/search/locations`, `POST-->GET` -| _node_.search_markerpositions(_params_,...)|| `/search/markerpositions`, `POST-->GET` -| _node_.search_markers(_params_,...) || `/markers-search`, `/search/markers` || `POST-->GET` -| _node_.search_observations(_params_,...)|| `/search/observations`, -| _node_.search_observationtables(_params_,...) | `/search/observationtables` || `POST-->GET` -| _node_.search_observationunits(_params_,...) | `/search/observationunits| /search/observationunits`, `POST-->GET` -| _node_.search_people(_params_,...)|| `/search/people`, `POST-->GET` -| _node_.search_POST(_entity_, _params_,...)| `/search/{entity}` || `POST` -| _node_.search_programs(_params_,...) || `/programs-search`, `/search/programs` || `POST-->GET` -| _node_.search_references(_params_,...)|| `/search/references`, `POST-->GET` -| _node_.search_referencesets(_params_,...)|| `/search/referencesets`, `POST-->GET` -| _node_.search_samples(_params_,...) || `/samples-search`, `/search/samples` || `POST-->GET` -| _node_.search_studies(_params_,...) || `/studies-search`, `/search/studies` || `POST-->GET` -| _node_.search_trials(_params_,...)|| `/search/trials`, `POST-->GET` -| _node_.search_variables(_params_,...) || `/variables-search`, `/search/variables` || `POST-->GET` -| _node_.search_variants(_params_,...)|| `/search/variants`, `POST-->GET` -| _node_.search_variantsets(_params_,...)|| `/search/variantsets`, `POST-->GET` -| _node_.search(_entity_, _params_,...) | `/search/{entity-->search/{entity}/{searchResultDbId}` || `POST-->GET` -| _node_.seasons_detail(_params_,...)||| -| _node_.seasons_modify(_params_,...)|| `/seasons/{seasonDbId}`,`PUT` -| _node_.seasons_store(_params_,...)|| `/seasons`|| -| _node_.seasons(_params_,...) | `/seasons| /seasons`|| -| _node_.seedlots_detail_transactions(_params_,...)||| -| _node_.seedlots_detail(_params_,...)||| -| _node_.seedlots_modify(_params_,...)|| `/seedlots/{seedLotDbId}`,`PUT` -| _node_.seedlots_store(_params_,...)|| `/seedlots`|| -| _node_.seedlots_transactions_store(_params_,...)|| `/seedlots/transactions`|| -| _node_.seedlots_transactions(_params_,...)||| -| _node_.seedlots(_params_,...)||| -| _node_.serverinfo(_params_,...)||| -| _node_.studies_detail(_params_,...) | `/studies/{studyDbId}` || | -| _node_.studies_germplasm(_params_,...) | `/studies/{studyDbId}/germplasm` || | -| _node_.studies_layouts(_params_,...) || `/studies/{studyDbId}/layouts`, `/studies/{studyDbId}/layout` || | -| _node_.studies_modify(_params_,...)|| `/studies/{studyDbId}`,`PUT` -| _node_.studies_observations_modify(_params_,...) | `/studies/{studyDbId}/observations/zip` || `POST` -| _node_.studies_observations_modify(_params_,...) | `PUT /studies/{studyDbId}/observations`(>=v1.1) or `/studies/{studyDbId}/observations`(GET` | +| _node_.search_attributevalues(_params_,...)||`/search/attributevalues` | `POST-->GET` | +| _node_.search_calls(_params_,...)||`/search/calls` | `POST-->GET` | +| _node_.search_callsets(_params_,...)||`/search/callsets` | `POST-->GET` | +| _node_.search_germplasm(_params_,...) |" `/germplasm-search` | `/search/germplasm` || `POST-->GET` | +| _node_.search_GET(_entity_, _params_,...)| `/search/{entity}/{searchResultDbId}` | | `GET` | +| _node_.search_images(_params_,...) | `/search/images` | `/search/images` | `POST-->GET` | +| _node_.search_lists(_params_,...)||`/search/lists` | `POST-->GET` | +| _node_.search_locations(_params_,...)||`/search/locations` | `POST-->GET` | +| _node_.search_markerpositions(_params_,...)||`/search/markerpositions` | `POST-->GET` | +| _node_.search_markers(_params_,...) |" `/markers-search` | `/search/markers` || `POST-->GET` | +| _node_.search_observations(_params_,...)||`/search/observations`, +| _node_.search_observationtables(_params_,...) | `/search/observationtables` | | `POST-->GET` | +| _node_.search_observationunits(_params_,...) | `/search/observationunits` | `/search/observationunits` | `POST-->GET` | +| _node_.search_people(_params_,...)||`/search/people` | `POST-->GET` | +| _node_.search_POST(_entity_, _params_,...)| `/search/{entity}` | | `POST` | +| _node_.search_programs(_params_,...) |" `/programs-search` | `/search/programs` || `POST-->GET` | +| _node_.search_references(_params_,...)||`/search/references` | `POST-->GET` | +| _node_.search_referencesets(_params_,...)||`/search/referencesets` | `POST-->GET` | +| _node_.search_samples(_params_,...) |" `/samples-search` | `/search/samples` || `POST-->GET` | +| _node_.search_studies(_params_,...) |" `/studies-search` | `/search/studies` || `POST-->GET` | +| _node_.search_trials(_params_,...)||`/search/trials` | `POST-->GET` | +| _node_.search_variables(_params_,...) |" `/variables-search` | `/search/variables` || `POST-->GET` | +| _node_.search_variants(_params_,...)||`/search/variants` | `POST-->GET` | +| _node_.search_variantsets(_params_,...)||`/search/variantsets` | `POST-->GET` | +| _node_.search(_entity_, _params_,...) | `/search/{entity-->search/{entity}/{searchResultDbId}` | | `POST-->GET` | +| _node_.seasons_detail(_params_,...)||`/seasons/{seasonDbId}` | `GET` | +| _node_.seasons_modify(_params_,...)||`/seasons/{seasonDbId}` | `PUT` | +| _node_.seasons_store(_params_,...)||`/seasons` | `POST` | +| _node_.seasons(_params_,...) | `/seasons` | `/seasons` | `GET` | +| _node_.seedlots_detail_transactions(_params_,...)||`/seedlots/{seedLotDbId}/transactions` | `GET` | +| _node_.seedlots_detail(_params_,...)||`/seedlots/{seedLotDbId}` | `GET` | +| _node_.seedlots_modify(_params_,...)||`/seedlots/{seedLotDbId}` | `PUT` | +| _node_.seedlots_store(_params_,...)||`/seedlots` | `POST` | +| _node_.seedlots_transactions_store(_params_,...)||`/seedlots/transactions` | `POST` | +| _node_.seedlots_transactions(_params_,...)||`/seedlots/transactions` | `GET` | +| _node_.seedlots(_params_,...)||`/seedlots` | `GET` | +| _node_.serverinfo(_params_,...)||`/serverinfo` | `GET` | +| _node_.studies_detail(_params_,...) | `/studies/{studyDbId}` | `/studies/{studyDbId}` | `GET` | +| _node_.studies_germplasm(_params_,...) | `/studies/{studyDbId}/germplasm` | | `GET` | +| _node_.studies_layouts(_params_,...) |" `/studies/{studyDbId}/layouts` | `/studies/{studyDbId}/layout` || `GET` | +| _node_.studies_modify(_params_,...)||`/studies/{studyDbId}` | `PUT` | +| _node_.studies_observations_modify(_params_,...) | `/studies/{studyDbId}/observations/zip` | | `POST` | +| _node_.studies_observations_modify(_params_,...) | `PUT /studies/{studyDbId}/observations`(>=v1.1) or `/studies/{studyDbId}/observations`(=v1.1) or `/studyTypes`(=v1.1) or `/studyTypes`(=v1.2) or `/vendor/plate-search`(=v1.2) or `/vendor/plate-search`( Date: Mon, 29 Mar 2021 11:38:16 -0400 Subject: [PATCH 30/31] add calls --- docs/README.md | 65 ++++++++++++++++++++------------------------------ 1 file changed, 26 insertions(+), 39 deletions(-) diff --git a/docs/README.md b/docs/README.md index f07391c..c99fec4 100644 --- a/docs/README.md +++ b/docs/README.md @@ -198,7 +198,7 @@ This method registers a callback function which is called once a node has loaded | --------------- | -------------------- | --------------- | ------------------ | | _node_.allelematrices_search(_params_,...) | `/allelematrices-search`(>=v1.2) or `/allelematrix-search`(=v1.2) or `/crops`(=v1.2), `GET` | +| _node_.commoncropnames(_params_,...) | `/commoncropnames`(>=v1.2) or `/crops`(GET` | | _node_.germplasm_store(_params_,...)||`/germplasm` | `POST` | | _node_.germplasm(_params_,...) | `/germplasm` | `/germplasm` | `GET` | | _node_.images_detail(_params_,...) | `/images/{imageDbId}` | `/images/{imageDbId}` | `GET` | -| _node_.images_imagecontent(_params_,...) | `/images/{imageDbId}/imagecontent` | | `PUT` | +| _node_.images_imagecontent(_params_,...) | `/images/{imageDbId}/imagecontent` | `/images/{imageDbId}/imagecontent` | `PUT` | | _node_.images_modify(_params_,...)||`/images/{imageDbId}` | `PUT` | | _node_.images_store(_params_,...)||`/images` | `POST` | | _node_.images(_params_,...) | `/images` | `/images` | `GET` | | _node_.lists_detail(_params_,...) | `/lists/{listDbId}` | `/lists/{listDbId}` | `GET` | | _node_.lists_items(_params_,...) | `/lists/{listDbId}/items` | `/lists/{listDbId}/items` | `PUT` | | _node_.lists_modify(_params_,...)||`/lists/{listDbId}` | `PUT` | -| _node_.lists_search(_params_,...)||| | _node_.lists_store_items(_params_,...)||`/lists/{listDbId}/items` | `POST` | | _node_.lists_store(_params_,...)||`/lists` | `POST` | | _node_.lists(_params_,...) | `/lists` | `/lists` | `GET` | | _node_.locations_detail(_params_,...) | `/locations/{locationDbId}` | `/locations/{locationDbId}` | `GET` | | _node_.locations_modify(_params_,...)||`/locations/{locationDbId}` | `PUT` | -| _node_.locations_search(_params_,...)||| | _node_.locations_store(_params_,...)||`/locations` | `POST` | | _node_.locations(_params_,...) | `/locations` | `/locations` | `GET` | | _node_.maps_detail(_params_,...) | `/maps/{mapDbId}` | `/maps/{mapDbId}` | `GET` | | _node_.maps_linkagegroups_detail(_params_,...) | `/maps/{mapsDbId}/positions/{linkageGroupId}` | | `GET` | -| _node_.maps_linkagegroups(_params_,...)||| +| _node_.maps_linkagegroups(_params_,...)||`/maps/{mapDbId}/linkagegroups `| `GET` | | _node_.maps_positions(_params_,...) | `/maps/{mapsDbId}/positions` | | `GET` | | _node_.maps(_params_,...) | `/maps` | `/maps` | `GET` | -| _node_.markerpositions(_params_,...)||| +| _node_.markerpositions(_params_,...)||`/markerpositions`|`GET`| | _node_.markerprofiles_detail(_params_,...) | `/markerprofiles/{markerprofileDbId}` | | `GET` | | _node_.markerprofiles_search(_params_,...) | `/markerprofiles-search` | | `POST` | | _node_.markerprofiles(_params_,...) | `/markerprofiles` | | `GET` | @@ -265,31 +263,27 @@ This method registers a callback function which is called once a node has loaded | _node_.methods_modify(_params_,...)||`/methods/{methodDbId}` | `PUT` | | _node_.methods_store(_params_,...)||`/methods` | `POST` | | _node_.methods(_params_,...) | `/methods` | `/methods` | `GET` | -| _node_.observationlevels(_params_,...) | `/observationlevels`(>=v1.2) or `/observationLevels`(=v1.2) or `/observationLevels`(GET` | | _node_.search_calls(_params_,...)||`/search/calls` | `POST-->GET` | | _node_.search_callsets(_params_,...)||`/search/callsets` | `POST-->GET` | -| _node_.search_germplasm(_params_,...) |" `/germplasm-search` | `/search/germplasm` || `POST-->GET` | +| _node_.search_germplasm(_params_,...) | `/germplasm-search` | `/search/germplasm` | `POST-->GET` | | _node_.search_GET(_entity_, _params_,...)| `/search/{entity}/{searchResultDbId}` | | `GET` | | _node_.search_images(_params_,...) | `/search/images` | `/search/images` | `POST-->GET` | | _node_.search_lists(_params_,...)||`/search/lists` | `POST-->GET` | | _node_.search_locations(_params_,...)||`/search/locations` | `POST-->GET` | | _node_.search_markerpositions(_params_,...)||`/search/markerpositions` | `POST-->GET` | -| _node_.search_markers(_params_,...) |" `/markers-search` | `/search/markers` || `POST-->GET` | -| _node_.search_observations(_params_,...)||`/search/observations`, +| _node_.search_markers(_params_,...) | `/markers-search` | `/search/markers` | `POST-->GET` | +| _node_.search_observations(_params_,...)||`/search/observations` | `POST-->GET` | | _node_.search_observationtables(_params_,...) | `/search/observationtables` | | `POST-->GET` | | _node_.search_observationunits(_params_,...) | `/search/observationunits` | `/search/observationunits` | `POST-->GET` | | _node_.search_people(_params_,...)||`/search/people` | `POST-->GET` | | _node_.search_POST(_entity_, _params_,...)| `/search/{entity}` | | `POST` | -| _node_.search_programs(_params_,...) |" `/programs-search` | `/search/programs` || `POST-->GET` | +| _node_.search_programs(_params_,...) | `/programs-search` | `/search/programs` | `POST-->GET` | | _node_.search_references(_params_,...)||`/search/references` | `POST-->GET` | | _node_.search_referencesets(_params_,...)||`/search/referencesets` | `POST-->GET` | -| _node_.search_samples(_params_,...) |" `/samples-search` | `/search/samples` || `POST-->GET` | -| _node_.search_studies(_params_,...) |" `/studies-search` | `/search/studies` || `POST-->GET` | +| _node_.search_samples(_params_,...) | `/samples-search` | `/search/samples` | `POST-->GET` | +| _node_.search_studies(_params_,...) | `/studies-search` | `/search/studies` | `POST-->GET` | | _node_.search_trials(_params_,...)||`/search/trials` | `POST-->GET` | -| _node_.search_variables(_params_,...) |" `/variables-search` | `/search/variables` || `POST-->GET` | | _node_.search_variants(_params_,...)||`/search/variants` | `POST-->GET` | | _node_.search_variantsets(_params_,...)||`/search/variantsets` | `POST-->GET` | | _node_.search(_entity_, _params_,...) | `/search/{entity-->search/{entity}/{searchResultDbId}` | | `POST-->GET` | @@ -354,38 +345,34 @@ This method registers a callback function which is called once a node has loaded | _node_.serverinfo(_params_,...)||`/serverinfo` | `GET` | | _node_.studies_detail(_params_,...) | `/studies/{studyDbId}` | `/studies/{studyDbId}` | `GET` | | _node_.studies_germplasm(_params_,...) | `/studies/{studyDbId}/germplasm` | | `GET` | -| _node_.studies_layouts(_params_,...) |" `/studies/{studyDbId}/layouts` | `/studies/{studyDbId}/layout` || `GET` | +| _node_.studies_layouts(_params_,...) | `/studies/{studyDbId}/layouts` | `/studies/{studyDbId}/layout` | `GET` | | _node_.studies_modify(_params_,...)||`/studies/{studyDbId}` | `PUT` | -| _node_.studies_observations_modify(_params_,...) | `/studies/{studyDbId}/observations/zip` | | `POST` | | _node_.studies_observations_modify(_params_,...) | `PUT /studies/{studyDbId}/observations`(>=v1.1) or `/studies/{studyDbId}/observations`(=v1.1) or `/studyTypes`(=v1.1) or `/studyTypes`( Date: Wed, 7 Apr 2021 14:40:16 -0400 Subject: [PATCH 31/31] fix revisions comments --- docs/README.md | 25 +++++++++++++------------ src/brapi_methods/attributevalues.js | 6 +++--- src/brapi_methods/commoncropnames.js | 10 ++-------- src/brapi_methods/images.js | 19 +++++++++++++++++++ src/brapi_methods/lists.js | 27 ++++----------------------- src/brapi_methods/locations.js | 2 +- src/brapi_methods/observations.js | 8 ++++---- src/brapi_methods/observationunits.js | 8 ++++---- src/brapi_methods/people.js | 12 +----------- src/brapi_methods/trials.js | 2 +- 10 files changed, 52 insertions(+), 67 deletions(-) diff --git a/docs/README.md b/docs/README.md index c99fec4..4359cb4 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,7 +2,7 @@ BrAPI.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. -BrAPI.js supports BrAPI versions `v1.0`-`v1.3`. Currently, it expects a server to use a single version. +BrAPI.js supports BrAPI versions `v1.0`-`v2.0`. Currently, it expects a server to use a single version. ### Contents @@ -41,7 +41,7 @@ import BrAPI from './build/BrAPI.js'; ``` ```js // Node.js -const BrAPI = require('BrAPI.js'); +const BrAPI = require('./BrAPI.js'); ``` ## How it Works @@ -198,7 +198,7 @@ This method registers a callback function which is called once a node has loaded | --------------- | -------------------- | --------------- | ------------------ | | _node_.allelematrices_search(_params_,...) | `/allelematrices-search`(>=v1.2) or `/allelematrix-search`(=v1.2) or `/observationLevels`( GET /search/attributevalues",{ - introduced:"v1.3" + introduced:"v2.0" }); return this.search("attributevalues",params,behavior); }; diff --git a/src/brapi_methods/commoncropnames.js b/src/brapi_methods/commoncropnames.js index 1d20bd6..19ae353 100644 --- a/src/brapi_methods/commoncropnames.js +++ b/src/brapi_methods/commoncropnames.js @@ -11,19 +11,13 @@ export function commoncropnames (params,behavior){ 'behaviorOptions': ['fork','map'], 'behavior': behavior, } - if (this.version.predates("v1.2")){ + if (this.version.predates("v1.3")){ call.urlTemplate = "/crops" this.version.check(call.urlTemplate,{ introduced:"v1.0", - deprecated:"v1.2", + deprecated:"v1.3", deprecated:"v2.0" }); - } else if (this.version.predates("v1.3")){ - call.urlTemplate = "/commonCropNames" - this.version.check(call.urlTemplate,{ - introduced:"v1.2", - deprecated:"v1.3" - }); } else { call.urlTemplate = "/commoncropnames" this.version.check(call.urlTemplate,{ diff --git a/src/brapi_methods/images.js b/src/brapi_methods/images.js index 6a97b8f..90d3400 100644 --- a/src/brapi_methods/images.js +++ b/src/brapi_methods/images.js @@ -96,6 +96,25 @@ export function images_imagecontent (params){ return this.simple_brapi_call(call); } +/** `PUT /images/{imageDbId}/imagecontent` + * @alias BrAPINode.prototype.images_imagecontent_modify + * @param {Object} params Parameters to provide to the call + * @param {String} params.imageDbId imageDbId + * @return {BrAPI_Behavior_Node} + */ +export function images_imagecontent_modify (params){ + var call = { + 'defaultMethod': 'put', + 'urlTemplate': '/images/{imageDbId}/imagecontent', + 'params': params, + 'behavior': 'map', + } + this.version.check(call.urlTemplate,{ + introduced:"v2.0" + }); + return this.simple_brapi_call(call); +} + /** `POST /search/images -> GET /search/images` * @alias BrAPINode.prototype.search_images * @param {Object} params Parameters to provide to the call diff --git a/src/brapi_methods/lists.js b/src/brapi_methods/lists.js index 4abdcc7..6055776 100644 --- a/src/brapi_methods/lists.js +++ b/src/brapi_methods/lists.js @@ -77,33 +77,13 @@ export function lists_modify (params,behavior){ return this.simple_brapi_call(call); } -/** `PUT /lists/{listDbId}/items` - * @alias BrAPINode.prototype.lists_items - * @param {Object} params Parameters to provide to the call - * @param {String} params.imageDbId imageDbId - * @return {BrAPI_Behavior_Node} - */ -export function lists_items (params){ - var call = { - 'defaultMethod': 'put', - 'urlTemplate': '/lists/{listDbId}/items', - 'params': params, - 'behavior': 'map', - } - this.version.check(call.urlTemplate,{ - introduced:"v1.3", - deprecated:"v2.0" - }); - return this.simple_brapi_call(call); -} - /** `POST /lists/{listDbId}/items` - * @alias BrAPINode.prototype.lists_store_items + * @alias BrAPINode.prototype.lists_items_store * @param {Object} params Parameters to provide to the call * @param {String} params.imageDbId imageDbId * @return {BrAPI_Behavior_Node} */ -export function lists_store_items (params){ +export function lists_items_store (params){ var call = { 'defaultMethod': 'post', 'urlTemplate': '/lists/{listDbId}/items', @@ -111,6 +91,7 @@ export function lists_store_items (params){ 'behavior': 'map', } this.version.check(call.urlTemplate,{ + introduced:"v1.3", introduced:"v2.0" }); return this.simple_brapi_call(call); @@ -133,7 +114,7 @@ export function lists_search(params,behavior){ * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} */ -export function search_lists(params,behavior,useOld){ +export function search_lists(params,behavior){ this.version.check("POST /search/lists -> GET /search/lists",{ introduced:"v2.0" }); diff --git a/src/brapi_methods/locations.js b/src/brapi_methods/locations.js index 2bdaf0c..52c2ab5 100644 --- a/src/brapi_methods/locations.js +++ b/src/brapi_methods/locations.js @@ -94,7 +94,7 @@ export function locations_search(params,behavior){ * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} */ -export function search_locations(params,behavior,useOld){ +export function search_locations(params,behavior){ this.version.check("POST /search/locations -> GET /search/locations",{ introduced:"v2.0" }); diff --git a/src/brapi_methods/observations.js b/src/brapi_methods/observations.js index f128130..a26c06b 100644 --- a/src/brapi_methods/observations.js +++ b/src/brapi_methods/observations.js @@ -38,12 +38,12 @@ export function observations_store (params,behavior){ } /** `PUT /observations` - * @alias BrAPINode.prototype.observations_modify + * @alias BrAPINode.prototype.observations_modify_multiple * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} */ -export function observations_modify (params,behavior){ +export function observations_modify_multiple (params,behavior){ var call = { 'defaultMethod': 'put', 'urlTemplate': '/observations', @@ -78,12 +78,12 @@ export function observations_detail (params){ /** `PUT /observations/{observationDbId}` -* @alias BrAPINode.prototype.observations_detail_modify +* @alias BrAPINode.prototype.observations_modify * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} */ -export function observations_detail_modify (params,behavior){ +export function observations_modify (params,behavior){ var call = { 'defaultMethod': 'put', 'urlTemplate': '/observations/{observationDbId}', diff --git a/src/brapi_methods/observationunits.js b/src/brapi_methods/observationunits.js index 7916eaf..ccf0c39 100644 --- a/src/brapi_methods/observationunits.js +++ b/src/brapi_methods/observationunits.js @@ -39,12 +39,12 @@ export function observationunits_store (params,behavior){ } /** `PUT /observationunits` -* @alias BrAPINode.prototype.observationunits_modify +* @alias BrAPINode.prototype.observationunits_modify_multiple * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} */ -export function observationunits_modify (params,behavior){ +export function observationunits_modify_multiple (params,behavior){ var call = { 'defaultMethod': 'put', 'urlTemplate': '/observationunits', @@ -78,12 +78,12 @@ export function observationunits_detail (params){ } /** `PUT /observationunits/{observationUnitDbId}` -* @alias BrAPINode.prototype.observationunits_detail_modify +* @alias BrAPINode.prototype.observationunits_modify * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} */ -export function observationunits_detail_modify (params,behavior){ +export function observationunits_modify (params,behavior){ var call = { 'defaultMethod': 'put', 'urlTemplate': '/observationunits/{observationUnitDbId}', diff --git a/src/brapi_methods/people.js b/src/brapi_methods/people.js index 62ee08e..a1b5052 100644 --- a/src/brapi_methods/people.js +++ b/src/brapi_methods/people.js @@ -78,23 +78,13 @@ export function people_modify (params,behavior){ return this.simple_brapi_call(call); } -/** `POST /search/people` -* @alias BrAPINode.prototype.people_search -* @param {Object} params Parameters to provide to the call -* @param {String} [behavior="fork"] Behavior of the node -* @return {BrAPI_Behavior_Node} -*/ -export function people_search(params,behavior){ - return this.search_people(params,behavior,true); -}; - /** `POST /search/people -> GET /search/people` * @alias BrAPINode.prototype.search_people * @param {Object} params Parameters to provide to the call * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} */ -export function search_people(params,behavior,useOld){ +export function search_people(params,behavior){ this.version.check("POST /search/people -> GET /search/people",{ introduced:"v2.0" }); diff --git a/src/brapi_methods/trials.js b/src/brapi_methods/trials.js index 0ecf3c7..5847719 100644 --- a/src/brapi_methods/trials.js +++ b/src/brapi_methods/trials.js @@ -94,7 +94,7 @@ export function trials_search(params,behavior){ * @param {String} [behavior="fork"] Behavior of the node * @return {BrAPI_Behavior_Node} */ -export function search_trials(params,behavior,useOld){ +export function search_trials(params,behavior){ this.version.check("POST /search/trials -> GET /search/trials",{ introduced:"v2.0" });