Separating NASA's API from the main code and adding some guards to prevent the application from crashing.
A file called APIManager was created to contain the API managers, in this case only the NASA API (NasaAPI) was created, but in the future we can support new APIs.
Added guard if no API_KEY has been defined in the .env file
Added guard in case the request response does not have what it takes to form the README.txt file
Some refactorings and also a guardian to ensure only python 3 and above can run.
APIManager
was created to contain the API managers, in this case only the NASA API (NasaAPI
) was created, but in the future we can support new APIs.API_KEY
has been defined in the .env fileREADME.txt
fileTo test the application just type:
python3 main.py