Skip to content

Commit

Permalink
await coro and wtf is request_client.client
Browse files Browse the repository at this point in the history
  • Loading branch information
apex2504 committed Jan 19, 2021
1 parent ad0f1c7 commit 2eff0fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diseaseapi/covid.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ async def vaccine_countries(self, last_days='all') -> List[VaccineCountry]:
"""
endpoint = COVERAGE_COUNTRIES.format(self.api_url)
params = {'lastdays': last_days}
data = await self.request_client.client.make_request(endpoint, params=params)
data = await self.request_client.make_request(endpoint, params=params)

return [self._compile_vax_country(country) for country in data]

Expand All @@ -891,7 +891,7 @@ async def vaccine_country(self, country, last_days='all') -> VaccineCountry:
"""
endpoint = COVERAGE_COUNTRY.format(self.api_url, country)
params = {'lastdays': last_days}
data = self.request_client.make_request(endpoint, params=params)
data = await self.request_client.make_request(endpoint, params=params)

return self._compile_vax_country(data)

Expand Down

0 comments on commit 2eff0fd

Please sign in to comment.