Support for list of countries
This commit is contained in:
parent
15c9feee9c
commit
9d0f43707a
1 changed files with 5 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue