mirror of
https://github.com/kaaninchen/Gleiswechsel.git
synced 2026-09-17 16:52:47 +00:00
Compare commits
2
Commits
5f6c3a223b
..
dbf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
199cedb8b1 | ||
|
|
172d6d5cf1 |
@@ -1,4 +1,8 @@
|
||||
# Gleiswechsel
|
||||
|
||||
## THIS BRANCH IS NO LONGER MAINTAINED
|
||||
## This is the code for the legacy Gleiswechsel bot, based on the much simpler dbf API.
|
||||
|
||||
Gleiswechel ist ein Discord Bot, welcher einen Sprachkanal zu einer real-existierenden, aktuell befahrenden Zugverbindung umbenennt. Diesen Namen behält der Kanal so lange, wie die Verbindung in echt dauert.
|
||||
|
||||

|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# Secrets
|
||||
.env*
|
||||
|
||||
# Dependencies
|
||||
node_modules
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
@@ -1,29 +0,0 @@
|
||||
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
|
||||
@@ -1,32 +0,0 @@
|
||||
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
|
||||
@@ -1,22 +0,0 @@
|
||||
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
|
||||
@@ -1,6 +0,0 @@
|
||||
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
|
||||
@@ -1,10 +0,0 @@
|
||||
opencollection: 1.0.0
|
||||
|
||||
info:
|
||||
name: Gleiswechsel-API
|
||||
bundled: false
|
||||
extensions:
|
||||
bruno:
|
||||
ignore:
|
||||
- node_modules
|
||||
- .git
|
||||
Reference in New Issue
Block a user