Code Cleanup
This commit is contained in:
parent
d2622e25e8
commit
fa34f8510d
13 changed files with 98 additions and 50 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue