Skip to content

Commit 9eb559c

Browse files
committed
revert to previous behavior, and mark deprecated ( not fully tested)
1 parent 832b25c commit 9eb559c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/client/delphi_epidata.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -691,14 +691,17 @@ def covidcast_nowcast(
691691
return Epidata._request("covidcast_nowcast", params)
692692

693693
@staticmethod
694-
def async_epidata(endpoint, param_list, batch_size=50):
695-
"""Make asynchronous Epidata calls for a list of parameters."""
694+
def async_epidata(param_list, batch_size=50):
695+
"""[DEPRECATED] Make asynchronous Epidata calls for a list of parameters."""
696696

697-
request_url = f"{Epidata.BASE_URL}/{endpoint}"
697+
import warnings
698+
warnings.filterwarnings("once", category=DeprecationWarning, module="delphi_epidata")
699+
warnings.warn("Method `Epidata.async_epidata()` is deprecated and will be removed in a future version.",
700+
category=DeprecationWarning)
698701

699702
async def async_get(params, session):
700703
"""Helper function to make Epidata GET requests."""
701-
async with session.get(request_url, params=params) as response:
704+
async with session.get(f"{Epidata.BASE_URL}/api.php", params=params) as response:
702705
response.raise_for_status()
703706
return await response.json(), params
704707

0 commit comments

Comments
 (0)