1.3.9 • Published 3 years ago
smartapi-parser v1.3.9
smartapi-parser
A NodeJS library for parsing SmartAPI specifications
Install
$ npm install smartapi-parser
Usage
The package requires SmartAPI specification in JSON format as its input. You can use fs or API fetch libraries such as node-fetch, axios to load a SmartAPI file from local or remote desitiniations.
const parser = require('smartapi-parser');
// need to install node-fetch libary first using npm i node-fetch
const fetch = require('node-fetch');
fetch('https://smart-api.info/api/metadata/81955d376a10505c1c69cd06dbda3047')
.then(response => response.json())
.then(spec => {
let api = new parser(spec);
console.log(api.metadata);
});
// // {
// "title": "SEMMED Gene API",
// "tags": ["disease", "annotation", "query", "translator", "biothings", "semmed"],
// "url": "https://biothings.ncats.io/semmedgene",
// "operations": [
// "query_operation": ...,
// "association": ...,
// "response_mapping": ...,
// "id": ...
// ]
// // }
Related
- @biothings-explorer/smartapi-kg - Organize SmartAPI Specifications into a meta knowledge graph.
1.3.9
3 years ago
1.3.8
3 years ago
1.3.7
3 years ago
1.3.6
3 years ago
1.3.5
3 years ago
1.3.4
3 years ago
1.3.1
3 years ago
1.3.0
3 years ago
1.2.0
3 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.1.0
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago