From ffa4b29637e1ef0963793e110c53d03ffb007f2a Mon Sep 17 00:00:00 2001 From: Kumi Date: Tue, 19 Apr 2022 14:58:44 +0200 Subject: [PATCH] Start file for Hafas API class --- classes/hafas.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 classes/hafas.py diff --git a/classes/hafas.py b/classes/hafas.py new file mode 100644 index 0000000..bc59e93 --- /dev/null +++ b/classes/hafas.py @@ -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)