From 5f6c3a223b40fd600cbb14abc96c2c4f407aae3a Mon Sep 17 00:00:00 2001 From: Kaaninchen <124433727+kaaninchen@users.noreply.github.com> Date: Sat, 15 Aug 2026 14:19:57 +0200 Subject: [PATCH] transitous: add bruno --- bruno/Gleiswechsel-API/.gitignore | 9 ++++++ .../Gleiswechsel-API/Geocode München HBF.yml | 29 +++++++++++++++++ .../Stoptimes for Station.yml | 32 +++++++++++++++++++ bruno/Gleiswechsel-API/Trip Details.yml | 22 +++++++++++++ .../environments/Transitous API.yml | 6 ++++ bruno/Gleiswechsel-API/opencollection.yml | 10 ++++++ 6 files changed, 108 insertions(+) create mode 100644 bruno/Gleiswechsel-API/.gitignore create mode 100644 bruno/Gleiswechsel-API/Geocode München HBF.yml create mode 100644 bruno/Gleiswechsel-API/Stoptimes for Station.yml create mode 100644 bruno/Gleiswechsel-API/Trip Details.yml create mode 100644 bruno/Gleiswechsel-API/environments/Transitous API.yml create mode 100644 bruno/Gleiswechsel-API/opencollection.yml diff --git a/bruno/Gleiswechsel-API/.gitignore b/bruno/Gleiswechsel-API/.gitignore new file mode 100644 index 0000000..e19311f --- /dev/null +++ b/bruno/Gleiswechsel-API/.gitignore @@ -0,0 +1,9 @@ +# Secrets +.env* + +# Dependencies +node_modules + +# OS files +.DS_Store +Thumbs.db \ No newline at end of file diff --git a/bruno/Gleiswechsel-API/Geocode München HBF.yml b/bruno/Gleiswechsel-API/Geocode München HBF.yml new file mode 100644 index 0000000..865c048 --- /dev/null +++ b/bruno/Gleiswechsel-API/Geocode München HBF.yml @@ -0,0 +1,29 @@ +info: + name: Geocode München HBF + type: http + seq: 1 + +http: + method: GET + url: https://api.transitous.org/api/v1/geocode?text=München Hbf + headers: + - name: User-Agent + value: Gleiswechsel-Discord-Bot + params: + - name: text + value: München Hbf + type: query + auth: inherit + +runtime: + scripts: + - type: after-response + code: |- + const data = res.getBody(); + bru.setEnvVar("stop_id", data[0].id); + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/bruno/Gleiswechsel-API/Stoptimes for Station.yml b/bruno/Gleiswechsel-API/Stoptimes for Station.yml new file mode 100644 index 0000000..29a2ef7 --- /dev/null +++ b/bruno/Gleiswechsel-API/Stoptimes for Station.yml @@ -0,0 +1,32 @@ +info: + name: Stoptimes for Station + type: http + seq: 3 + +http: + method: GET + url: https://api.transitous.org/api/v1/stoptimes?stopId={{stop_id}}&n=10 + headers: + - name: User-Agent + value: Gleiswechsel-Discord-Bot + params: + - name: stopId + value: "{{stop_id}}" + type: query + - name: n + value: "10" + type: query + auth: inherit + +runtime: + scripts: + - type: after-response + code: |- + const data = res.getBody(); + bru.setEnvVar("trip_id", data.stopTimes[0].tripId); + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/bruno/Gleiswechsel-API/Trip Details.yml b/bruno/Gleiswechsel-API/Trip Details.yml new file mode 100644 index 0000000..1d45b12 --- /dev/null +++ b/bruno/Gleiswechsel-API/Trip Details.yml @@ -0,0 +1,22 @@ +info: + name: Trip Details + type: http + seq: 4 + +http: + method: GET + url: https://api.transitous.org/api/v2/trip?tripId={{trip_id}} + headers: + - name: User-Agent + value: Gleiswechsel-Discord-Bot + params: + - name: tripId + value: "{{trip_id}}" + type: query + auth: inherit + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/bruno/Gleiswechsel-API/environments/Transitous API.yml b/bruno/Gleiswechsel-API/environments/Transitous API.yml new file mode 100644 index 0000000..0662ac7 --- /dev/null +++ b/bruno/Gleiswechsel-API/environments/Transitous API.yml @@ -0,0 +1,6 @@ +name: Transitous API +variables: + - name: stop_id + value: at-Railway-Current-Reference-Data-2026_de:09162:100:11:11 + - name: trip_id + value: 20260815_11:52_de-DELFI_3338623109 diff --git a/bruno/Gleiswechsel-API/opencollection.yml b/bruno/Gleiswechsel-API/opencollection.yml new file mode 100644 index 0000000..43d1edd --- /dev/null +++ b/bruno/Gleiswechsel-API/opencollection.yml @@ -0,0 +1,10 @@ +opencollection: 1.0.0 + +info: + name: Gleiswechsel-API +bundled: false +extensions: + bruno: + ignore: + - node_modules + - .git