mirror of
https://gitlab.com/MisterBiggs/multi-bot-tutorial.git
synced 2025-06-16 15:17:25 +00:00
added docstring to nextLaunch
This commit is contained in:
parent
808f24ec16
commit
f8e8ba7eaa
12
functions.py
12
functions.py
@ -3,6 +3,18 @@ from datetime import datetime
|
|||||||
|
|
||||||
|
|
||||||
def nextLaunch():
|
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"
|
url = "https://launchlibrary.net/1.4/launch/next/1?mode=list"
|
||||||
response = requests.get(url)
|
response = requests.get(url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user