Skip to content

Commit 233824f

Browse files
committed
check dots empty in endpoints
1 parent 83e986b commit 233824f

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

R/endpoints.R

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ pub_covid_hosp_facility_lookup <- function(
8989
zip = NULL,
9090
fips_code = NULL,
9191
fetch_args = fetch_args_list()) {
92+
rlang::check_dots_empty()
93+
9294
assert_character_param("state", state, len = 1, required = FALSE)
9395
assert_character_param("ccn", ccn, len = 1, required = FALSE)
9496
assert_character_param("city", city, len = 1, required = FALSE)
@@ -171,6 +173,8 @@ pub_covid_hosp_facility <- function(
171173
...,
172174
publication_dates = NULL,
173175
fetch_args = fetch_args_list()) {
176+
rlang::check_dots_empty()
177+
174178
assert_character_param("hospital_pks", hospital_pks)
175179
assert_timeset_param("collection_weeks", collection_weeks)
176180
assert_timeset_param("publication_dates", publication_dates, required = FALSE)
@@ -465,6 +469,8 @@ pub_covid_hosp_facility <- function(
465469
#' @export
466470
#
467471
pub_covid_hosp_state_timeseries <- function(states, dates, ..., issues = NULL, fetch_args = fetch_args_list()) {
472+
rlang::check_dots_empty()
473+
468474
assert_character_param("states", states)
469475
assert_timeset_param("dates", dates)
470476
assert_timeset_param("issues", issues, required = FALSE)
@@ -711,6 +717,8 @@ pub_covidcast <- function(
711717
issues = NULL,
712718
lag = NULL,
713719
fetch_args = fetch_args_list()) {
720+
rlang::check_dots_empty()
721+
714722
# Check parameters
715723
if (
716724
missing(source) ||
@@ -918,6 +926,8 @@ pvt_dengue_sensors <- function(auth, names, locations, epiweeks, fetch_args = fe
918926
#' @keywords endpoint
919927
#' @export
920928
pub_ecdc_ili <- function(regions, epiweeks, ..., issues = NULL, lag = NULL, fetch_args = fetch_args_list()) {
929+
rlang::check_dots_empty()
930+
921931
assert_character_param("regions", regions)
922932
assert_timeset_param("epiweeks", epiweeks)
923933
assert_timeset_param("issues", issues, required = FALSE)
@@ -975,6 +985,8 @@ pub_ecdc_ili <- function(regions, epiweeks, ..., issues = NULL, lag = NULL, fetc
975985
#' @keywords endpoint
976986
#' @export
977987
pub_flusurv <- function(locations, epiweeks, ..., issues = NULL, lag = NULL, fetch_args = fetch_args_list()) {
988+
rlang::check_dots_empty()
989+
978990
assert_character_param("locations", locations)
979991
assert_timeset_param("epiweeks", epiweeks)
980992
assert_timeset_param("issues", issues, required = FALSE)
@@ -1031,6 +1043,8 @@ pub_flusurv <- function(locations, epiweeks, ..., issues = NULL, lag = NULL, fet
10311043
#' @keywords endpoint
10321044
#' @export
10331045
pub_fluview_clinical <- function(regions, epiweeks, ..., issues = NULL, lag = NULL, fetch_args = fetch_args_list()) {
1046+
rlang::check_dots_empty()
1047+
10341048
assert_character_param("regions", regions)
10351049
assert_timeset_param("epiweeks", epiweeks)
10361050
assert_timeset_param("issues", issues, required = FALSE)
@@ -1134,6 +1148,8 @@ pub_fluview <- function(
11341148
lag = NULL,
11351149
auth = NULL,
11361150
fetch_args = fetch_args_list()) {
1151+
rlang::check_dots_empty()
1152+
11371153
assert_character_param("regions", regions)
11381154
assert_timeset_param("epiweeks", epiweeks)
11391155
assert_timeset_param("issues", issues, required = FALSE)
@@ -1284,6 +1300,8 @@ pvt_ght <- function(auth, locations, epiweeks, query, fetch_args = fetch_args_li
12841300
#' @keywords endpoint
12851301
#' @export
12861302
pub_kcdc_ili <- function(regions, epiweeks, ..., issues = NULL, lag = NULL, fetch_args = fetch_args_list()) {
1303+
rlang::check_dots_empty()
1304+
12871305
assert_character_param("regions", regions)
12881306
assert_timeset_param("epiweeks", epiweeks)
12891307
assert_timeset_param("issues", issues, required = FALSE)
@@ -1413,6 +1431,8 @@ pub_nidss_dengue <- function(locations, epiweeks, fetch_args = fetch_args_list()
14131431
#' @keywords endpoint
14141432
#' @export
14151433
pub_nidss_flu <- function(regions, epiweeks, ..., issues = NULL, lag = NULL, fetch_args = fetch_args_list()) {
1434+
rlang::check_dots_empty()
1435+
14161436
assert_character_param("regions", regions)
14171437
assert_timeset_param("epiweeks", epiweeks)
14181438
assert_timeset_param("issues", issues, required = FALSE)
@@ -1544,6 +1564,8 @@ pub_nowcast <- function(locations, epiweeks, fetch_args = fetch_args_list()) {
15441564
#' @keywords endpoint
15451565
#' @export
15461566
pub_paho_dengue <- function(regions, epiweeks, ..., issues = NULL, lag = NULL, fetch_args = fetch_args_list()) {
1567+
rlang::check_dots_empty()
1568+
15471569
assert_character_param("regions", regions)
15481570
assert_timeset_param("epiweeks", epiweeks)
15491571
assert_timeset_param("issues", issues, required = FALSE)
@@ -1699,6 +1721,8 @@ pvt_sensors <- function(auth, names, locations, epiweeks, fetch_args = fetch_arg
16991721
#' @keywords endpoint
17001722
#' @export
17011723
pvt_twitter <- function(auth, locations, ..., dates = NULL, epiweeks = NULL, fetch_args = fetch_args_list()) {
1724+
rlang::check_dots_empty()
1725+
17021726
assert_character_param("auth", auth, len = 1)
17031727
assert_character_param("locations", locations)
17041728
assert_timeset_param("dates", dates, required = FALSE)
@@ -1767,6 +1791,8 @@ pub_wiki <- function(
17671791
hours = NULL,
17681792
language = "en",
17691793
fetch_args = fetch_args_list()) {
1794+
rlang::check_dots_empty()
1795+
17701796
assert_character_param("articles", articles)
17711797
assert_timeset_param("dates", dates, required = FALSE)
17721798
assert_timeset_param("epiweeks", epiweeks, required = FALSE)

R/epidatacall.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ fetch_args_list <- function(
144144
dry_run = FALSE,
145145
debug = FALSE,
146146
format_type = c("json", "classic", "csv")) {
147+
rlang::check_dots_empty()
148+
147149
assert_character(fields, null.ok = TRUE, any.missing = FALSE)
148150
assert_logical(disable_date_parsing, null.ok = FALSE, len = 1L, any.missing = FALSE)
149151
assert_logical(disable_data_frame_parsing, null.ok = FALSE, len = 1L, any.missing = FALSE)

0 commit comments

Comments
 (0)