diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8b6be7b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Breedbase and Solgenomics - BrAPI-js + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/package.json b/package.json index 8324f30..d334aaa 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,29 @@ { "name": "@solgenomics/brapijs", - "version": "2.0.2", + "version": "2.0.3", "description": "BrAPI.js is a JavaScript client library for [BrAPI](https://brapi.org). It can be used either in the browser or within Node.js. It uses the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) (or [node-fetch]() in Node.js) for AJAX calls. BrAPI.js also uses ES6 classes.", "bugs": { "url": "https://github.com/solgenomics/BrAPI.js/issues" }, - "repository": "github:solgenomics/BrAPI.js", + "repository": { + "type": "git", + "url": "git+https://github.com/solgenomics/BrAPI.js.git" + }, "license": "MIT", "main": "build/BrAPI.js", "scripts": { "prepare": "rm -rf build && mkdir build && rollup -f umd -n BrAPI -o build/BrAPI.js -- main.js" }, - "author": "David Lyon ", + "author": "Mirella Flores ", "dependencies": { - "node-fetch": "2.6.1", - "rollup": "0.40" - } + "node-fetch": "2.6.7", + "rollup": "^0.40.2" + }, + "homepage": "https://github.com/solgenomics/BrAPI.js#readme", + "directories": { + "doc": "docs" + }, + "keywords": [ + "brapiv2" + ] } diff --git a/src/brapi_methods.js b/src/brapi_methods.js index 15dcb25..2b444c4 100644 --- a/src/brapi_methods.js +++ b/src/brapi_methods.js @@ -23,6 +23,7 @@ export * from "./brapi_methods/ontologies"; export * from "./brapi_methods/people"; export * from "./brapi_methods/phenotypes"; export * from "./brapi_methods/plannedcrosses"; +export * from "./brapi_methods/pedigree"; export * from "./brapi_methods/programs"; export * from "./brapi_methods/references"; export * from "./brapi_methods/referencesets"; diff --git a/src/brapi_methods/pedigree.js b/src/brapi_methods/pedigree.js new file mode 100644 index 0000000..cf4045c --- /dev/null +++ b/src/brapi_methods/pedigree.js @@ -0,0 +1,19 @@ +/** `GET /pedigree/{germplasmDbId}` + * @alias BrAPINode.prototype.pedigree + * @param {Object} params Parameters to provide to the call + * @param {String} params.germplasmDbId germplasmDbId + * @return {BrAPI_Behavior_Node} + */ + +export function pedigree (params){ + var call = { + 'defaultMethod': 'get', + 'urlTemplate': '/pedigree/', + 'params': params, + 'behavior': 'map', + }; + this.version.check(call.urlTemplate,{ + introduced:"v2.1" + }); + return this.simple_brapi_call(call); +}