ExpDev07 / coronavirus-tracker-api

🦠 A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the 🔥 FastAPI framework. Supports multiple sources!
https://coronavirus-tracker-api.herokuapp.com
GNU General Public License v3.0
1.59k stars 323 forks source link

Add Structural Design Pattern #449

Closed dengrf96 closed 3 years ago

dengrf96 commented 3 years ago

What: Applied decorator design pattern on to the Location class and its child

Why: Location, TimelinedLocation, and NYTLocation are having a hierarchical order of inheritance and causing the code to not to very readable and inconsistent

How: Removed TimelinedLocation class and added JHULocation. Modified Location class to make it compatible with JHULocation and NYTLocation