Skip to content

Commit 2e8aa8d

Browse files
authored
Merge pull request #560 from cmu-delphi/sgratzl/js-client2
add all endpoints to JS client
2 parents 41f85d2 + 441ea3b commit 2e8aa8d

File tree

14 files changed

+335
-206
lines changed

14 files changed

+335
-206
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ __pycache__/
55
/.env
66
*.db
77
/build
8-
/node_modules
8+
/node_modules
9+
.mypy_cache

docs/api/client_libraries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ For anyone looking for COVIDCast data, please visit our [COVIDCast Libraries](co
2424
<script src="delphi_epidata.js"></script>
2525
<!-- Fetch data -->
2626
<script>
27-
EpidataAsync.covidcast('fb-survey', 'smoothed_cli', 'day', 'county', [20200401, Epidata.range(20200405, 20200414)], '06001').then((res) => {
27+
EpidataAsync.covidcast('fb-survey', 'smoothed_cli', 'day', 'county', [20200401, EpidataAsync.range(20200405, 20200414)], '06001').then((res) => {
2828
console.log(res.result, res.message, res.epidata != null ? res.epidata.length : 0);
2929
});
3030
</script>

docs/api/flusurv.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ The following samples show how to import the library and fetch CA FluView Clinic
115115
<script src="delphi_epidata.js"></script>
116116
<!-- Fetch data -->
117117
<script>
118-
EpidataAsync.flusurv(['ca'], [201940, Epidata.range(202001, 202010)]).then((res) => {
118+
EpidataAsync.flusurv('ca', [201940, Epidata.range(202001, 202010)]).then((res) => {
119119
console.log(res.result, res.message, res.epidata != null ? res.epidata.length : 0);
120120
});
121121
</script>

docs/api/fluview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ The following samples show how to import the library and fetch national FluView
131131
<script src="delphi_epidata.js"></script>
132132
<!-- Fetch data -->
133133
<script>
134-
EpidataAsync.fluview(['nat'], [201440, Epidata.range(201501, 201510)]).then((res) => {
134+
EpidataAsync.fluview('nat', [201440, EpidataAsync.range(201501, 201510)]).then((res) => {
135135
console.log(res.result, res.message, res.epidata != null ? res.epidata.length : 0);
136136
});
137137
</script>

docs/api/fluview_clinical.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ The following samples show how to import the library and fetch national FluView
104104
<script src="delphi_epidata.js"></script>
105105
<!-- Fetch data -->
106106
<script>
107-
EpidataAsync.fluview_clinical(['nat'], [201940, Epidata.range(202001, 202010)]).then((res) => {
107+
EpidataAsync.fluview_clinical('nat', [201940, EpidataAsync.range(202001, 202010)]).then((res) => {
108108
console.log(res.result, res.message, res.epidata != null ? res.epidata.length : 0);
109109
});
110110
</script>

docs/api/gft.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The following samples show how to import the library and fetch Google Flu Trends
7979
<script src="delphi_epidata.js"></script>
8080
<!-- Fetch data -->
8181
<script>
82-
EpidataAsync.gft(['nat'], [201440, Epidata.range(201501, 201510)]).then((res) => {
82+
EpidataAsync.gft('nat', [201440, EpidataAsync.range(201501, 201510)]).then((res) => {
8383
console.log(res.result, res.message, res.epidata != null ? res.epidata.length : 0);
8484
});
8585
</script>

docs/api/nidss_dengue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The following samples show how to import the library and fetch national NIDSS De
7979
<script src="delphi_epidata.js"></script>
8080
<!-- Fetch data -->
8181
<script>
82-
EpidataAsync.nidss_dengue(['nationwide'], [201440, Epidata.range(201501, 201510)]).then((res) => {
82+
EpidataAsync.nidss_dengue('nationwide', [201440, EpidataAsync.range(201501, 201510)]).then((res) => {
8383
console.log(res.result, res.message, res.epidata != null ? res.epidata.length : 0);
8484
});
8585
</script>

docs/api/nidss_flu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The following samples show how to import the library and fetch national NIDSS Fl
100100
<script src="delphi_epidata.js"></script>
101101
<!-- Fetch data -->
102102
<script>
103-
EpidataAsync.nidss_flu(['nationwide'], [201440, Epidata.range(201501, 201510)]).then((res) => {
103+
EpidataAsync.nidss_flu('nationwide', [201440, EpidataAsync.range(201501, 201510)]).then((res) => {
104104
console.log(res.result, res.message, res.epidata != null ? res.epidata.length : 0);
105105
});;
106106
</script>

docs/api/nowcast.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The following samples show how to import the library and fetch national ILI Near
8383
<script src="delphi_epidata.js"></script>
8484
<!-- Fetch data -->
8585
<script>
86-
EpidataAsync.nowcast(['nat'], [201940, Epidata.range(202001, 202010)]).then((res) => {
86+
EpidataAsync.nowcast('nat', [201940, EpidataAsync.range(202001, 202010)]).then((res) => {
8787
console.log(res.result, res.message, res.epidata != null ? res.epidata.length : 0);
8888
});
8989
</script>

docs/api/sensors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The following samples show how to import the library and fetch national Delphi's
100100
<script src="delphi_epidata.js"></script>
101101
<!-- Fetch data -->
102102
<script>
103-
EpidataAsync.sensors(['nat'], ['sar3'], [201940, Epidata.range(202001, 202010)]).then((res) => {
103+
EpidataAsync.sensors('nat', 'sar3', [201940, EpidataAsync.range(202001, 202010)]).then((res) => {
104104
console.log(res.result, res.message, res.epidata != null ? res.epidata.length : 0);
105105
});
106106
</script>

0 commit comments

Comments
 (0)