nat236919 / covid19-api

API for exploring COVID-19 cases around the globe
https://nuttaphat.com/covid19-api/
MIT License
119 stars 63 forks source link

Behavioural Pattern 1 - Observer Pattern in Integrator #285

Closed hsalehi100 closed 3 years ago

hsalehi100 commented 3 years ago

Proposed Changes

In this covid19_api_v2_integrator.py file I added an observer behavioural pattern by implementing an observer_trigger method that will help the API observe when there is a change in the request. I also created an add_observer method to add the observer to the end of the get_current, get_current_US, and get_country method to showcase the functionality of the observer.