@@ -6,13 +6,16 @@ class Location:
66 A location in the world affected by the coronavirus.
77 """
88
9- def __init__ (self , id , country , province , coordinates , confirmed , deaths , recovered ):
9+ def __init__ (self , id , country , province , coordinates , last_updated , confirmed , deaths , recovered ):
1010 # General info.
1111 self .id = id
1212 self .country = country .strip ()
1313 self .province = province .strip ()
1414 self .coordinates = coordinates
1515
16+ # Last update.
17+ self .last_updated = last_updated
18+
1619 # Statistics.
1720 self .confirmed = confirmed
1821 self .deaths = deaths
@@ -42,6 +45,9 @@ def serialize(self):
4245 # Coordinates.
4346 'coordinates' : self .coordinates .serialize (),
4447
48+ # Last updated.
49+ 'last_updated' : self .last_updated ,
50+
4551 # Latest data (statistics).
4652 'latest' : {
4753 'confirmed' : self .confirmed ,
@@ -55,10 +61,10 @@ class TimelinedLocation(Location):
5561 A location with timelines.
5662 """
5763
58- def __init__ (self , id , country , province , coordinates , timelines ):
64+ def __init__ (self , id , country , province , coordinates , last_updated , timelines ):
5965 super ().__init__ (
6066 # General info.
61- id , country , province , coordinates ,
67+ id , country , province , coordinates , last_updated ,
6268
6369 # Statistics (retrieve latest from timelines).
6470 confirmed = timelines .get ('confirmed' ).latest or 0 ,
0 commit comments