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

Structural_Adapter_Design_Pattern #474

Closed Billa32 closed 3 years ago

Billa32 commented 3 years ago

Why I did it? Within the Structural Patterns I decided to use Adapter Design Method to allow objects with incompatible interfaces to collaborate

How I did it? I Created a Replica of location class because serializer function has different behavior for CSBS LOCATION Class thus we created a class Location adapter "making changes in "init_py" and using the Csbs.py i had to update serializer response and removed it from csbslocation class.