1
0
mirror of https://github.com/norohind/FDEV-CAPI-Handler.git synced 2025-04-14 14:47:13 +03:00

32 lines
860 B
Python

import os
import requests
from os import getenv
CLIENT_ID = getenv('client_id')
assert CLIENT_ID, "No client_id in env"
log_level = os.getenv('LOG_LEVEL', 'DEBUG').upper()
access_key = os.getenv('access_key')
db_location = os.getenv('db_location', 'companion-api.sqlite')
default_failure_tolerance = os.getenv('default_failure_tolerance', 'True').lower() == 'true'
REDIRECT_URL = requests.utils.quote(os.getenv('REDIRECT_URL', ''))
AUTH_URL = 'https://auth.frontierstore.net/auth'
TOKEN_URL = 'https://auth.frontierstore.net/token'
PROPER_USER_AGENT = 'EDCD-a31-0.3'
REDIRECT_HTML_TEMPLATE = """
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="refresh" content="0; url={link}">
</head>
<body>
<a href="{link}">
You should be redirected shortly...
</a>
</body>
</html>
"""