Skip to content

Commit

Permalink
Merge pull request #7 from virtualcell/UpdateAPI
Browse files Browse the repository at this point in the history
Change API to the new VCell v0 API
  • Loading branch information
vcellmike authored Feb 4, 2025
2 parents 47bd9d6 + 65e39dc commit 9245b1e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
18 changes: 9 additions & 9 deletions views/model.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
<div class="reactionDiagram" id="diagram">
{{#each data.vcml.BioModel}}
{{#each this.Version}}
<img class="model-page-diagram" src="https://vcellapi.cam.uchc.edu/biomodel/{{this.$.KeyValue}}/diagram"
<img class="model-page-diagram" src="https://vcell.cam.uchc.edu/api/v0/biomodel/{{this.$.KeyValue}}/diagram"
alt="reactionDiagram" draggable="false" />
{{/each}}
{{/each}}
Expand Down Expand Up @@ -1440,15 +1440,15 @@
<tr>
<td>Virtual Cell Markup Language</td>
<td data-label="File" class="File">
<a href="https://vcellapi.cam.uchc.edu/biomodel/{{this.Version.[0].$.KeyValue}}/biomodel.vcml">
<a href="https://vcell.cam.uchc.edu/api/v0/biomodel/{{this.Version.[0].$.KeyValue}}/biomodel.vcml">
VCML File
</a>
</td>
</tr>
<tr>
<td>PDF Report</td>
<td data-label="File" class="File">
<a href="https://vcellapi.cam.uchc.edu/biomodel/{{this.Version.[0].$.KeyValue}}/biomodel.pdf">
<a href="https://vcell.cam.uchc.edu/api/v0/biomodel/{{this.Version.[0].$.KeyValue}}/biomodel.pdf">
Report
</a>
</td>
Expand All @@ -1457,7 +1457,7 @@
<td>COMBINE Archive</td>
<td data-label="File" class="File">
<a href=
"https://vcellapi.cam.uchc.edu/biomodel/
"https://vcell.cam.uchc.edu/api/v0/biomodel/
{{~this.Version.[0].$.KeyValue~}}
/biomodel.omex?appname={{convertSpace this.SimulationSpec.[0].$.Name}}"
>
Expand All @@ -1469,7 +1469,7 @@
<td>SEDML</td>
<td data-label="File" class="File">
<a href=
"https://vcellapi.cam.uchc.edu/biomodel/
"https://vcell.cam.uchc.edu/api/v0/biomodel/
{{~this.Version.[0].$.KeyValue~}}
/biomodel.sedml?appname={{convertSpace this.SimulationSpec.[0].$.Name}}"
>
Expand Down Expand Up @@ -1499,7 +1499,7 @@
<td data-label="File" class="File">
{{#each SimulationSpec}}
<a href=
"https://vcellapi.cam.uchc.edu/biomodel/
"https://vcell.cam.uchc.edu/api/v0/biomodel/
{{~../this.Version.[0].$.KeyValue~}}
/biomodel.bngl?appname={{convertSpace this.$.Name}}"
>
Expand All @@ -1516,7 +1516,7 @@
<td data-label="File" class="File">
{{#each SimulationSpec}}
<a href=
"https://vcellapi.cam.uchc.edu/biomodel/
"https://vcell.cam.uchc.edu/api/v0/biomodel/
{{~../this.Version.[0].$.KeyValue~}}
/biomodel.sbml?appname={{convertSpace this.$.Name}}"
>
Expand All @@ -1533,7 +1533,7 @@
<td data-label="File" class="File">
{{#each SimulationSpec}}
<a href=
"https://vcellapi.cam.uchc.edu/biomodel/
"https://vcell.cam.uchc.edu/api/v0/biomodel/
{{~../this.Version.[0].$.KeyValue~}}
/biomodel.m?appname={{convertSpace this.$.Name}}"
>
Expand All @@ -1550,7 +1550,7 @@
<td data-label="File" class="File">
{{#each SimulationSpec}}
<a href=
"https://vcellapi.cam.uchc.edu/biomodel/
"https://vcell.cam.uchc.edu/api/v0/biomodel/
{{~../this.Version.[0].$.KeyValue~}}
/biomodel.xml?appname={{convertSpace this.$.Name}}"
>
Expand Down
2 changes: 1 addition & 1 deletion views/printModel.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<h2 class="sectionTitle">Reaction Diagram</h2>
{{#each data.vcml.BioModel}}
{{#each this.Version}}
<img class="image-zoom-available" src="https://vcellapi.cam.uchc.edu/biomodel/{{this.$.KeyValue}}/diagram"
<img class="image-zoom-available" src="https://vcell.cam.uchc.edu/api/v0/biomodel/{{this.$.KeyValue}}/diagram"
alt="reactionDiagram" draggable="false" />
{{/each}}
{{/each}}
Expand Down

0 comments on commit 9245b1e

Please sign in to comment.