Support for list of countries

This commit is contained in:
Fabio Manganiello 2020-04-30 22:45:04 +02:00
parent 15c9feee9c
commit 9d0f43707a

View file

@ -57,8 +57,11 @@ class Covid19Plugin(Plugin):
:param country: Default country override.
"""
country = self._get_countries(country)[0]
return requests.get('{}/total/dayone/country/{}'.format(self.base_url, country)).json()
countries = self._get_countries(country)
ret = []
for country in countries:
ret += requests.get('{}/total/dayone/country/{}'.format(self.base_url, country)).json()
return ret
# vim:sw=4:ts=4:et: