mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-22 22:59:35 +02:00
add todos; readme: link to kpublictransport 📝
This commit is contained in:
parent
f6733d937a
commit
95d2c61fbd
4 changed files with 4 additions and 0 deletions
|
@ -47,6 +47,7 @@ const randomizeUserAgent = (userAgent) => {
|
|||
|
||||
const md5 = input => createHash('md5').update(input).digest()
|
||||
|
||||
// todo [breaking]: remove userAgent parameter
|
||||
const request = (ctx, userAgent, reqData) => {
|
||||
const {profile, opt} = ctx
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ const parseJourneyLeg = (ctx, pt, date) => { // pt = raw leg
|
|||
// todo: pull `public` value from `profile.products`
|
||||
res.tripId = pt.jny.jid
|
||||
res.line = pt.jny.line || null
|
||||
// todo [breaking]: don't call parseStationName() here, add parseDirection() hook
|
||||
res.direction = pt.jny.dirTxt && profile.parseStationName(ctx, pt.jny.dirTxt) || null
|
||||
|
||||
if (pt.jny.pos) {
|
||||
|
|
|
@ -124,6 +124,7 @@ const parseLocation = (ctx, l) => {
|
|||
}
|
||||
|
||||
// We use a "visited list" to prevent endless recursion.
|
||||
// todo: can we use a WeakMap here?
|
||||
const seen = Symbol('parseLocation seen items')
|
||||
const parseLocationWithoutCycles = (ctx, l, ...args) => {
|
||||
if (ctx[seen] && ctx[seen].includes(l)) return null
|
||||
|
|
|
@ -220,6 +220,7 @@ While `hafas-client` itself should work in the browser via a bundler like [Webpa
|
|||
- [`BahnhofsAbfahrten`](https://github.com/marudor/BahnhofsAbfahrten) a.k.a. [`marudor.de`](https://marudor.de/) – A very detailed public transport website for Germany. Uses HAFAS underneath, [has an API](https://docs.marudor.de).
|
||||
- [`public-transport-enabler`](https://github.com/schildbach/public-transport-enabler) – Java equivalent to `hafas-client`, with support for more types of public transport APIs; Used by [Öffi](https://play.google.com/store/apps/details?id=de.schildbach.oeffi) & [Transportr](https://transportr.app).
|
||||
- [`TripKit`](https://github.com/alexander-albers/tripkit) – Swift equivalent to `hafas-client`, with support for more types of public transport APIs; Used by [ÖPNV Navigator](https://apps.apple.com/de/app/öpnv-navigator/id1239908782).
|
||||
- [`kpublictransport`](https://github.com/KDE/kpublictransport) – C++ equivalent to `hafas-client`, with support for more types of public transport APIs; Used by [KDE Itinerary](https://apps.kde.org/itinerary/).
|
||||
- [`pyhafas`](https://github.com/n0emis/pyhafas) – Python equivalent to `hafas-client`, with support for more types of public transport APIs.
|
||||
- [*Friendly Public Transport Format*](https://github.com/public-transport/friendly-public-transport-format#friendly-public-transport-format-fptf) – A format for APIs, libraries and datasets containing and working with public transport data.
|
||||
- [`observe-hafas-client`](https://github.com/public-transport/observe-hafas-client) – Observe all departures/arrivals/etc. returned by `hafas-client`.
|
||||
|
|
Loading…
Add table
Reference in a new issue