Skip to content

Commit e4b1ee0

Browse files
committed
fix: mutually exclusive args #98
1 parent 5de5a03 commit e4b1ee0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

R/endpoints.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ covid_hosp_facility_lookup <- function(state = NULL, ccn = NULL, city = NULL, zi
9191
stop("one of `state`, `ccn`, `city`, `zip`, or `fips_code` is required")
9292
}
9393

94+
if (sum(missing(state), missing(ccn), missing(city), missing(zip), missing(fips_code)) > 1) {
95+
stop("only one of `state`, `ccn`, `city`, `zip`, or `fips_code` can be specified")
96+
}
97+
9498
create_epidata_call(
9599
"covid_hosp_facility_lookup/",
96100
list(

0 commit comments

Comments
 (0)