Get the APOD(Astronomical Picture of the day) data Get your API Key from: https://api.nasa.gov/
(api_key: str)
| 9 | |
| 10 | |
| 11 | def get_apod_data(api_key: str) -> dict: |
| 12 | """ |
| 13 | Get the APOD(Astronomical Picture of the day) data |
| 14 | Get your API Key from: https://api.nasa.gov/ |
| 15 | """ |
| 16 | url = "https://api.nasa.gov/planetary/apod" |
| 17 | return httpx.get(url, params={"api_key": api_key}, timeout=10).json() |
| 18 | |
| 19 | |
| 20 | def save_apod(api_key: str, path: str = ".") -> dict: |