From 65e39dce03f78b55bb81f7cafaaae667706bf28f Mon Sep 17 00:00:00 2001 From: vcellmike Date: Tue, 4 Feb 2025 17:20:16 -0500 Subject: [PATCH] Change API to the new VCell v0 API The old API was moved. --- app.js | 6 +++--- views/model.hbs | 18 +++++++++--------- views/printModel.hbs | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app.js b/app.js index 158abb4..0a77b65 100644 --- a/app.js +++ b/app.js @@ -296,7 +296,7 @@ async function getModelList(termMap) { //create link and fetch from API const api_url = - "https://vcellapi.cam.uchc.edu/biomodel?bmName=" + termMap["bmName"] + "&bmId=" + termMap["bmId"] + "&category=" + termMap["category"] + "&owner=" + termMap["owner"] + "&savedLow=" + termMap["savedLow"] + "&savedHigh=" + termMap["savedHigh"] + "&startRow=" + APIrow + "&maxRows=" + termMap['maxModels'] + "&orderBy=" + termMap["orderBy"]; + "https://vcell.cam.uchc.edu/api/v0/biomodel?bmName=" + termMap["bmName"] + "&bmId=" + termMap["bmId"] + "&category=" + termMap["category"] + "&owner=" + termMap["owner"] + "&savedLow=" + termMap["savedLow"] + "&savedHigh=" + termMap["savedHigh"] + "&startRow=" + APIrow + "&maxRows=" + termMap['maxModels'] + "&orderBy=" + termMap["orderBy"]; const fetch_response = await fetch(api_url); json = await fetch_response.json(); } @@ -423,7 +423,7 @@ app.get("/testCuratedList/:search", async (req, res) => { // main Dashboard for dynamic models selected from curated list page app.get("/curatedList/model/:name", (req, res) => { const api_url = - 'https://vcellapi.cam.uchc.edu/biomodel/' + req.params.name + '/biomodel.vcml'; + 'https://vcell.cam.uchc.edu/api/v0/biomodel/' + req.params.name + '/biomodel.vcml'; var parser = new xml2js.Parser(); fetch(api_url).then(function(response) { return response.text().then(function(text) { @@ -479,7 +479,7 @@ app.get("/test/:name", (req, res) => { app.get("/curatedList/printModel/:name", (req, res) => { modelName = req.params.name; const api_url = - 'https://vcellapi.cam.uchc.edu/biomodel/' + modelName + '/biomodel.vcml'; + 'https://vcell.cam.uchc.edu/api/v0/biomodel/' + modelName + '/biomodel.vcml'; var parser = new xml2js.Parser(); fetch(api_url).then(function(response) { return response.text().then(function(text) { diff --git a/views/model.hbs b/views/model.hbs index 34b8ec1..6d5b772 100644 --- a/views/model.hbs +++ b/views/model.hbs @@ -163,7 +163,7 @@
{{#each data.vcml.BioModel}} {{#each this.Version}} - reactionDiagram {{/each}} {{/each}} @@ -1440,7 +1440,7 @@ Virtual Cell Markup Language - + VCML File @@ -1448,7 +1448,7 @@ PDF Report - + Report @@ -1457,7 +1457,7 @@ COMBINE Archive @@ -1469,7 +1469,7 @@ SEDML @@ -1499,7 +1499,7 @@ {{#each SimulationSpec}} @@ -1516,7 +1516,7 @@ {{#each SimulationSpec}} @@ -1533,7 +1533,7 @@ {{#each SimulationSpec}} @@ -1550,7 +1550,7 @@ {{#each SimulationSpec}} diff --git a/views/printModel.hbs b/views/printModel.hbs index 3097b12..8ff34ad 100644 --- a/views/printModel.hbs +++ b/views/printModel.hbs @@ -14,7 +14,7 @@

Reaction Diagram

{{#each data.vcml.BioModel}} {{#each this.Version}} - reactionDiagram {{/each}} {{/each}}