Start file for Hafas API class

This commit is contained in:
Kumi 2022-04-19 14:58:44 +02:00
parent 3593e5d95d
commit ffa4b29637
Signed by: kumi
GPG key ID: 5D1CE6AF1805ECA2

26
classes/hafas.py Normal file
View file

@ -0,0 +1,26 @@
from datetime import datetime
class Hafas:
API_URL = "https://fahrplan.oebb.at/bin/mgate.exe?rnd=%i"
BASE_CONTENT = {
"id": "h7iqfi6m2eskyk8x",
"ver": "1.32",
"lang": "deu",
"auth": {
"type": "AID",
"aid": "5vHavmuWPWIfetEe"
},
"client": {
"id": "OEBB",
"type": "WEB",
"name": "webapp",
"l": "vs_webapp"
},
"formatted": False,
"ext": "OEBB.11",
}
def __init__(self):
self.timestamp = int(datetime.now().timestamp() * 1000)