Added .gitignore, Added Inspirobot
This commit is contained in:
parent
ca91cfddaf
commit
2f16876177
5 changed files with 61 additions and 8 deletions
11
api/inspirobot.py
Normal file
11
api/inspirobot.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
import requests
|
||||
from util import logging
|
||||
|
||||
def get_inspirational_quote() -> str:
|
||||
response = requests.get("http://inspirobot.me/api?generate=true")
|
||||
|
||||
if not response.ok:
|
||||
logging.error(f"Steam API response not OK: {response.status_code} [http://inspirobot.me/api?generate=true]")
|
||||
return None
|
||||
|
||||
return response.text
|
Loading…
Add table
Add a link
Reference in a new issue