1
0
mirror of https://gitlab.com/MisterBiggs/multi-bot-tutorial.git synced 2025-06-15 22:56:45 +00:00

added docstring to nextLaunch

This commit is contained in:
Anson 2019-07-11 21:34:33 -07:00
parent 808f24ec16
commit f8e8ba7eaa

View File

@ -3,6 +3,18 @@ from datetime import datetime
def nextLaunch():
"""Uses the launchlibrary.net api to get the next rocket launch and returns
a dictionary with all the important information.
Example Output:
{
"rocket": "Proton-M/Blok DM-03 ",
"mission": " Spektr-RG",
"date": "July 12, 2019 12:31:00 UTC",
"countdown": "15:00:03.884469",
"video": "https://www.youtube.com/watch?v=Dy1nkGghEVk",
}
"""
url = "https://launchlibrary.net/1.4/launch/next/1?mode=list"
response = requests.get(url)