Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions app/location/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,13 @@ class Location: # pylint: disable=too-many-instance-attributes
"""

def __init__(
self, id, country, province, coordinates, last_updated, confirmed, deaths, recovered,
): # pylint: disable=too-many-arguments
self, id, country, province, coordinates): # pylint: disable=too-many-arguments
# General info.
self.id = id
self.country = country.strip()
self.province = province.strip()
self.coordinates = coordinates

# Last update.
self.last_updated = last_updated

# Statistics.
self.confirmed = confirmed
self.deaths = deaths
self.recovered = recovered

@property
def country_code(self):
"""
Expand Down Expand Up @@ -73,6 +64,20 @@ def serialize(self):
},
}


class Last_Updated:
def __init__(last_updated):
self.last_updated = last_updated

def set_updated(self):

class Latest:
def __init__(confirmed, deaths, recovered):
self.confirmed = confirmed
self.deaths = deaths
self.recovered = recovered

def set_latest(self):

class TimelinedLocation(Location):
"""
Expand Down