mirror of
https://github.com/kaaninchen/Gleiswechsel.git
synced 2026-09-17 16:52:47 +00:00
transitous: add bruno
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# Secrets
|
||||
.env*
|
||||
|
||||
# Dependencies
|
||||
node_modules
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -0,0 +1,10 @@
|
||||
opencollection: 1.0.0
|
||||
|
||||
info:
|
||||
name: Gleiswechsel-API
|
||||
bundled: false
|
||||
extensions:
|
||||
bruno:
|
||||
ignore:
|
||||
- node_modules
|
||||
- .git
|
||||
Reference in New Issue
Block a user