Kamaropoulos / COVID19Py

A tiny Python package for easy access to up-to-date Coronavirus (COVID-19, SARS-CoV-2) cases data.
https://pypi.org/project/COVID19Py/
GNU General Public License v3.0
84 stars 57 forks source link

Case details creational pattern #119

Closed gvmiller closed 2 years ago

gvmiller commented 3 years ago

Changed the way that the covid case data is gathered and sent in the getLatestChanges function.

This enables the program to have a number of possible future uses, for example it could gather information on cases (confirmed, deaths, and recovered) per day, or for a specific location. This is made much easier with the Builder design pattern.

Using a constructor that can access a specified format, while following the builder design format. This way other constructors can reorder or change the functions used, but the format remains the same.