ncbi-eutil-server
v0.0.4
Published
ncbi-eutils-server with Node
Downloads
3
Readme
ncbi-eutils-server.js
ncbi-eutils-server is a utility module which provides straight-forward way of transforming NCBI eutil XML documents into RESTFUL JSON format
Quick Examples
var ncbiEutilService = require("./index");
// Set up our routes and start the server
ncbiEutilService.server.get('/ncbi/:db/:term', ncbiEutilService.processncbieutilrequest);
ncbiEutilService.server.get('/', function(req, res, next) {
res.send("hi there, you reached a page that it doesn't exists. ");
});
ncbiEutilService.server.listen(process.env.VMC_APP_PORT || 1337, function() {
console.log('%s listening at %s, love & peace', ncbiEutilService.server.name, ncbiEutilService.server.url);
});
Sample JSON Output
{
"success": true,
"responseHeader": {
"count": "2",
"retmax": "0",
"retstart": "0",
"querykey": "1",
"webenv": "NCID_1_35062342_165.112.9.24_5555_1358039612_282655023",
"idlist": null,
"translationset": null,
"translationstack": {
"termset": {
"term": "11231 12[UID]",
"field": "UID",
"count": "-1",
"explode": "Y"
},
"op": "GROUP"
},
"querytranslation": "11231 12[UID]"
},
"response": [
{
"pubdate": "1976 Mar-Apr",
"epubdate": null,
"source": "J Dent Assoc Thai",
"authors": {
"author": {
"name": "Chavalit N",
"authtype": "Author",
"clusterid": "1278757"
}
},
"lastauthor": "Chavalit N",
"title": "[Influence of low concentration fluoride on the rate of dissolution of hydroxyapatite in acid buffer solution].",
"sorttitle": "influence of low concentration fluoride on the rate of dissolution of hydroxyapatite in acid buffer solution",
"volume": "26",
"issue": "2",
"pages": "35-40",
"lang": {
"string": "tha"
},
"nlmuniqueid": "7505601",
"issn": "0045-9917",
"essn": null,
"pubtype": {
"flag": "Journal Article"
},
"recordstatus": "PubMed - indexed for MEDLINE",
"pubstatus": "4",
"articleids": {
"articleid": [
{
"idtype": "pubmed",
"idtypen": "1",
"value": "11231"
}, {
"idtype": "eid",
"idtypen": "8",
"value": "11231"
}, {
"idtype": "rid",
"idtypen": "8",
"value": "11231"
}
]
},
"history": {
"pubmedpubdate": [
{
"pubstatus": "pubmed",
"date": "1976/03/01 00:00"
}, {
"pubstatus": "medline",
"date": "1976/03/01 00:01"
}, {
"pubstatus": "entrez",
"date": "1976/03/01 00:00"
}
]
},
"references": null,
"attributes": null,
"pmcrefcount": "0",
"fulljournalname": "The Journal of the Dental Association of Thailand",
"elocationid": null,
"viewcount": "0",
"doctype": "citation",
"srccontriblist": null,
"booktitle": null,
"medium": null,
"edition": null,
"publisherlocation": null,
"publishername": null,
"srcdate": null,
"reportnumber": null,
"availablefromurl": null,
"locationlabel": null,
"doccontriblist": null,
"docdate": null,
"bookname": null,
"chapter": null,
"sortpubdate": "1976/03/01 00:00",
"sortfirstauthor": "Chavalit N"
}, {
"pubdate": "1975 Sep 15",
"epubdate": null,
"source": "Biochem Pharmacol",
"authors": {
"author": {
"name": "Stein JM",
"authtype": "Author",
"clusterid": "6355762"
}
},
"lastauthor": "Stein JM",
"title": "The effect of adrenaline and of alpha- and beta-adrenergic blocking agents on ATP concentration and on incorporation of 32Pi into ATP in rat fat cells.",
"sorttitle": "effect of adrenaline and of alpha and beta adrenergic blocking agents on atp concentration and on incorporation of 32pi into atp in rat fat cells",
"volume": "24",
"issue": "18",
"pages": "1659-62",
"lang": {
"string": "eng"
},
"nlmuniqueid": "0101032",
"issn": "0006-2952",
"essn": "1873-2968",
"pubtype": {
"flag": "Journal Article"
},
"recordstatus": "PubMed - indexed for MEDLINE",
"pubstatus": "4",
"articleids": {
"articleid": [
{
"idtype": "pubmed",
"idtypen": "1",
"value": "12"
}, {
"idtype": "pii",
"idtypen": "4",
"value": "0006-2952(75)90002-7"
}, {
"idtype": "eid",
"idtypen": "8",
"value": "12"
}, {
"idtype": "rid",
"idtypen": "8",
"value": "12"
}
]
},
"history": {
"pubmedpubdate": [
{
"pubstatus": "pubmed",
"date": "1975/09/15 00:00"
}, {
"pubstatus": "medline",
"date": "1975/09/15 00:01"
}, {
"pubstatus": "entrez",
"date": "1975/09/15 00:00"
}
]
},
"references": null,
"attributes": null,
"pmcrefcount": "5",
"fulljournalname": "Biochemical pharmacology",
"elocationid": null,
"viewcount": "223",
"doctype": "citation",
"srccontriblist": null,
"booktitle": null,
"medium": null,
"edition": null,
"publisherlocation": null,
"publishername": null,
"srcdate": null,
"reportnumber": null,
"availablefromurl": null,
"locationlabel": null,
"doccontriblist": null,
"docdate": null,
"bookname": null,
"chapter": null,
"sortpubdate": "1975/09/15 00:00",
"sortfirstauthor": "Stein JM"
}
]
}