Skip to content

Commit 8a48c4f

Browse files
authored
Merge pull request #1075 from cmu-delphi/krivard/epidata-sensors-auth
Make Epidata.sensors.auth optional
2 parents b877dbc + 45c7827 commit 8a48c4f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/client/delphi_epidata.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -503,16 +503,17 @@ def delphi(system, epiweek):
503503
def sensors(auth, names, locations, epiweeks):
504504
"""Fetch Delphi's digital surveillance sensors."""
505505
# Check parameters
506-
if auth is None or names is None or locations is None or epiweeks is None:
507-
raise Exception('`auth`, `names`, `locations`, and `epiweeks` are all required')
506+
if names is None or locations is None or epiweeks is None:
507+
raise Exception('`names`, `locations`, and `epiweeks` are all required')
508508
# Set up request
509509
params = {
510510
'endpoint': 'sensors',
511-
'auth': auth,
512511
'names': Epidata._list(names),
513512
'locations': Epidata._list(locations),
514513
'epiweeks': Epidata._list(epiweeks),
515514
}
515+
if auth is not None:
516+
params['auth'] = auth
516517
# Make the API call
517518
return Epidata._request(params)
518519

0 commit comments

Comments
 (0)