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 320 forks source link

Apply Structural Design - Composite #443

Closed david-yorku closed 3 years ago

david-yorku commented 3 years ago

What?

--> Apply structural design to nyt.py file in app/location so that similar location functions can be grouped

Why?

--> Have the functions depend on one another since they should be some dependencies, since some functions don't make sense without others that are similar.

How?

--> Created a class that deploys the composite pattern that has similar functions in it.