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

Builder pattern #454

Closed ashnaw closed 3 years ago

ashnaw commented 3 years ago

The location class mentioned in the init file of location folder had too many arguments passed. Whenever the programmer has to add a new serialise structure or add new arguments, they would have to change at many files to implement this. To enable this extensibility builder pattern has been implemented, which allows the programmer to create new serial structures, add more variables to location and pass very few arguments.