What I added was two classes COUNTRIES and ALT_SOURCE. COUNTRIES stores a list of countries which can have their covid19 data requested all at once. ALT_SOURCE stores an instance of COVID19 where you can provide a different url and data_source for information. The goal with connecting these two classes by the bridge pattern is so you can have any combination of countries, requesting data through any data_source. This should help if a user wants to switch data sources if response times are low or not working on one data source. Being able to request information from a list of countries is also a convenience. A dictionary of entities called _country_lists stores instances of COUNTRIES identified by a string name. createCountryList allows for the creation of a new country list, and getMultipleCountries returns the data for a list of countries from an existing COUNTRIES entitiy in _country_lists. Please note as stated in my pull request cfd86a5, where I applied the singleton pattern this pull request is not compatible as it creates multiple instance of COVID19.
What I added was two classes
COUNTRIES
andALT_SOURCE
.COUNTRIES
stores a list of countries which can have their covid19 data requested all at once.ALT_SOURCE
stores an instance ofCOVID19
where you can provide a different url and data_source for information. The goal with connecting these two classes by the bridge pattern is so you can have any combination of countries, requesting data through any data_source. This should help if a user wants to switch data sources if response times are low or not working on one data source. Being able to request information from a list of countries is also a convenience. A dictionary of entities called_country_lists
stores instances ofCOUNTRIES
identified by a stringname
.createCountryList
allows for the creation of a new country list, andgetMultipleCountries
returns the data for a list of countries from an existingCOUNTRIES
entitiy in_country_lists
. Please note as stated in my pull request cfd86a5, where I applied the singleton pattern this pull request is not compatible as it creates multiple instance of COVID19.