Skip to content

Commit 9245b1e

Browse files
authored
Merge pull request #7 from virtualcell/UpdateAPI
Change API to the new VCell v0 API
2 parents 47bd9d6 + 65e39dc commit 9245b1e

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ async function getModelList(termMap) {
296296

297297
//create link and fetch from API
298298
const api_url =
299-
"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"];
299+
"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"];
300300
const fetch_response = await fetch(api_url);
301301
json = await fetch_response.json();
302302
}
@@ -423,7 +423,7 @@ app.get("/testCuratedList/:search", async (req, res) => {
423423
// main Dashboard for dynamic models selected from curated list page
424424
app.get("/curatedList/model/:name", (req, res) => {
425425
const api_url =
426-
'https://vcellapi.cam.uchc.edu/biomodel/' + req.params.name + '/biomodel.vcml';
426+
'https://vcell.cam.uchc.edu/api/v0/biomodel/' + req.params.name + '/biomodel.vcml';
427427
var parser = new xml2js.Parser();
428428
fetch(api_url).then(function(response) {
429429
return response.text().then(function(text) {
@@ -479,7 +479,7 @@ app.get("/test/:name", (req, res) => {
479479
app.get("/curatedList/printModel/:name", (req, res) => {
480480
modelName = req.params.name;
481481
const api_url =
482-
'https://vcellapi.cam.uchc.edu/biomodel/' + modelName + '/biomodel.vcml';
482+
'https://vcell.cam.uchc.edu/api/v0/biomodel/' + modelName + '/biomodel.vcml';
483483
var parser = new xml2js.Parser();
484484
fetch(api_url).then(function(response) {
485485
return response.text().then(function(text) {

views/model.hbs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
<div class="reactionDiagram" id="diagram">
164164
{{#each data.vcml.BioModel}}
165165
{{#each this.Version}}
166-
<img class="model-page-diagram" src="https://vcellapi.cam.uchc.edu/biomodel/{{this.$.KeyValue}}/diagram"
166+
<img class="model-page-diagram" src="https://vcell.cam.uchc.edu/api/v0/biomodel/{{this.$.KeyValue}}/diagram"
167167
alt="reactionDiagram" draggable="false" />
168168
{{/each}}
169169
{{/each}}
@@ -1440,15 +1440,15 @@
14401440
<tr>
14411441
<td>Virtual Cell Markup Language</td>
14421442
<td data-label="File" class="File">
1443-
<a href="https://vcellapi.cam.uchc.edu/biomodel/{{this.Version.[0].$.KeyValue}}/biomodel.vcml">
1443+
<a href="https://vcell.cam.uchc.edu/api/v0/biomodel/{{this.Version.[0].$.KeyValue}}/biomodel.vcml">
14441444
VCML File
14451445
</a>
14461446
</td>
14471447
</tr>
14481448
<tr>
14491449
<td>PDF Report</td>
14501450
<td data-label="File" class="File">
1451-
<a href="https://vcellapi.cam.uchc.edu/biomodel/{{this.Version.[0].$.KeyValue}}/biomodel.pdf">
1451+
<a href="https://vcell.cam.uchc.edu/api/v0/biomodel/{{this.Version.[0].$.KeyValue}}/biomodel.pdf">
14521452
Report
14531453
</a>
14541454
</td>
@@ -1457,7 +1457,7 @@
14571457
<td>COMBINE Archive</td>
14581458
<td data-label="File" class="File">
14591459
<a href=
1460-
"https://vcellapi.cam.uchc.edu/biomodel/
1460+
"https://vcell.cam.uchc.edu/api/v0/biomodel/
14611461
{{~this.Version.[0].$.KeyValue~}}
14621462
/biomodel.omex?appname={{convertSpace this.SimulationSpec.[0].$.Name}}"
14631463
>
@@ -1469,7 +1469,7 @@
14691469
<td>SEDML</td>
14701470
<td data-label="File" class="File">
14711471
<a href=
1472-
"https://vcellapi.cam.uchc.edu/biomodel/
1472+
"https://vcell.cam.uchc.edu/api/v0/biomodel/
14731473
{{~this.Version.[0].$.KeyValue~}}
14741474
/biomodel.sedml?appname={{convertSpace this.SimulationSpec.[0].$.Name}}"
14751475
>
@@ -1499,7 +1499,7 @@
14991499
<td data-label="File" class="File">
15001500
{{#each SimulationSpec}}
15011501
<a href=
1502-
"https://vcellapi.cam.uchc.edu/biomodel/
1502+
"https://vcell.cam.uchc.edu/api/v0/biomodel/
15031503
{{~../this.Version.[0].$.KeyValue~}}
15041504
/biomodel.bngl?appname={{convertSpace this.$.Name}}"
15051505
>
@@ -1516,7 +1516,7 @@
15161516
<td data-label="File" class="File">
15171517
{{#each SimulationSpec}}
15181518
<a href=
1519-
"https://vcellapi.cam.uchc.edu/biomodel/
1519+
"https://vcell.cam.uchc.edu/api/v0/biomodel/
15201520
{{~../this.Version.[0].$.KeyValue~}}
15211521
/biomodel.sbml?appname={{convertSpace this.$.Name}}"
15221522
>
@@ -1533,7 +1533,7 @@
15331533
<td data-label="File" class="File">
15341534
{{#each SimulationSpec}}
15351535
<a href=
1536-
"https://vcellapi.cam.uchc.edu/biomodel/
1536+
"https://vcell.cam.uchc.edu/api/v0/biomodel/
15371537
{{~../this.Version.[0].$.KeyValue~}}
15381538
/biomodel.m?appname={{convertSpace this.$.Name}}"
15391539
>
@@ -1550,7 +1550,7 @@
15501550
<td data-label="File" class="File">
15511551
{{#each SimulationSpec}}
15521552
<a href=
1553-
"https://vcellapi.cam.uchc.edu/biomodel/
1553+
"https://vcell.cam.uchc.edu/api/v0/biomodel/
15541554
{{~../this.Version.[0].$.KeyValue~}}
15551555
/biomodel.xml?appname={{convertSpace this.$.Name}}"
15561556
>

views/printModel.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<h2 class="sectionTitle">Reaction Diagram</h2>
1515
{{#each data.vcml.BioModel}}
1616
{{#each this.Version}}
17-
<img class="image-zoom-available" src="https://vcellapi.cam.uchc.edu/biomodel/{{this.$.KeyValue}}/diagram"
17+
<img class="image-zoom-available" src="https://vcell.cam.uchc.edu/api/v0/biomodel/{{this.$.KeyValue}}/diagram"
1818
alt="reactionDiagram" draggable="false" />
1919
{{/each}}
2020
{{/each}}

0 commit comments

Comments
 (0)