Code Cleanup

This commit is contained in:
Robert 2020-01-08 02:26:36 +01:00
parent d2622e25e8
commit fa34f8510d
13 changed files with 98 additions and 50 deletions

View file

@ -1,9 +1,14 @@
'''
A module that sits between the API and the cog
and provides functions for easy communication
with the NASA API
'''
import requests
from util import config, logging
api_key = config.settings["api_keys"]["nasa"]
def image_of_the_day():
def image_of_the_day() -> str:
url = f"https://api.nasa.gov/planetary/apod?api_key={api_key}"
response = requests.get(url)