Commit graph

424 commits

Author SHA1 Message Date
Jannis R
1d5f4ff31c parse arrivals 2018-06-26 18:13:41 +02:00
Jannis R
00ea10d9c8 journey leg, departure, movement: journeyId -> tripId 💥 2018-06-26 18:13:41 +02:00
Jannis R
f5eceafdf3
merge refactor-parse-fns into next 2018-06-26 13:07:06 +02:00
Jannis R
479bac428f
parse fn signatures: bugfix 🐛 2018-06-26 12:25:30 +02:00
Jannis R
b02f012b18
parse fn signatures: bugfixes 🐛 2018-06-26 11:48:30 +02:00
Jannis R
4c86b625c7
parse fn signatures: bugfixes 🐛 2018-06-26 11:47:44 +02:00
Jannis R
9305a129a8
journeys: startWithWalking with default true 2018-06-25 18:34:10 +02:00
Jannis R
6e60cc8bda
parse Komfort-Checkin & ICE Sprinter hints 2018-06-25 13:59:42 +02:00
Jannis R
a8aa2652df
parseJourneyLeg: fix remarks indices 🐛 2018-06-25 13:54:30 +02:00
Jannis R
0db84ce644
merge remarks into next 2018-06-25 13:20:13 +02:00
Jannis R
6d9ffeda94
readme: how to use with react-native 📝
Hopefully prevents situations like in #56 in the future.

https://github.com/public-transport/hafas-client/issues/56#issuecomment-399915315
2018-06-25 13:12:14 +02:00
Jannis R
3c00ed29d0
fix test broken by 3e672ee 💚 2018-06-25 11:48:30 +02:00
Jannis R
108eda4450
fix tests broken by 3e672ee 💚 2018-06-25 11:39:21 +02:00
Jannis R
8c726dce01
changelog for 3.0.0 📝 2018-06-25 11:36:05 +02:00
Jannis R
ce880c06bd
adapt tests & docs to 021ae45 & 3e672ee 📝 2018-06-25 11:35:01 +02:00
Jannis R
3e672eeabd
stopover.type, stopover.station -> stopover.stop 💥
To be compatible with `friendly-public-transport-format@1.1.1`.
2018-06-25 11:34:25 +02:00
Jannis R
96f9f93957
parseStopover: arrivalPlatform, departurePlatform 2018-06-22 13:42:01 +02:00
Jannis R
ebe4fa64d8 opt.passedStations -> opt.stopovers 💥 2018-06-19 08:23:49 +02:00
Jannis R
6611f262bf leg.passed -> leg.stopovers 💥
Some didn't unterstand what "passed" means in this context.
"stopovers" is a lot less ambiguous; Also, it aligns with
`parseStopover` and FPTF.
2018-06-19 08:23:49 +02:00
Jannis R
3e18f5d415
gitignore lockfile, add & remove todos, minor changes 2018-06-13 20:25:56 +02:00
Jannis R
b6fbaa5825
parse fns: opt param 💥
- parseLine
- parseDeparture
- parseJourney
- parseJourneyLeg
- parseLocation
- parseMovement
- parseNearby
- parseStopover
2018-06-13 20:05:33 +02:00
Jannis R
6ca7924f7b
parsePolyline: profile param 💥 2018-06-13 20:05:33 +02:00
Jannis R
a45d640272
request fn: opt param 💥 2018-06-13 20:05:33 +02:00
Jannis R
8881d8a1a4
parse fns: individual params -> data object 💥
From now on, all higher-level parse fns will be able to access more
of the response data while keeping their signature.

- parseLine
- parseDeparture
- parseJourney
- parseJourneyLeg
- parseLocation
- parseMovement
- parsePolyline
- parseNearby
- parseStopover
2018-06-13 20:05:24 +02:00
Jannis R
1299d7f04f
parse more hints 2018-06-11 21:37:13 +02:00
Jannis R
871db25bc9
parse more hints, add todos 2018-06-11 19:50:44 +02:00
Jannis R
3556130f6b
parse more hints 2018-06-11 18:41:53 +02:00
Jannis R
d3d23140fd
(more) remarks for journeys, journey legs & stopovers 2018-06-11 11:37:00 +02:00
Jannis Redmann
47155cdb83
merge #57: rewrite the tests 2018-06-10 15:06:08 +02:00
Jannis R
b419477a7d
merge next into tests-rewrite 2018-06-10 14:57:51 +02:00
Jannis R
46c05eba05 adapt tests to 3c9c5cb 2018-06-10 14:47:29 +02:00
Jannis R
2d11cfae1e adapt docs to 3c9c5cb 📝 2018-06-10 14:47:29 +02:00
Jannis R
665bed9f79 rename location(id) -> station(id) 💥
see #17 for reasons
closes #17
2018-06-10 14:47:29 +02:00
Jannis R
21c273cec7
journey leg passed stations: parse & expose delays 2018-06-07 18:52:47 +02:00
Jannis R
fa2cdc5177
pass warnings into parsers, apply warnings to journey legs 2018-06-07 18:48:45 +02:00
Jannis R
d909be3b65
parseWarning 2018-06-07 18:46:44 +02:00
Jannis R
b6e37595a5
remarks for journey legs 2018-06-07 16:39:07 +02:00
Jannis R
d2257c26ff
rename d.remarks -> d.hints, parseRemark -> parseHint
HAFAS returns notes for journey legs, stopovers and departures.

There are two kinds of notes: "remarks" (in `remL`) and HAFAS
Information Manager (HIM) notes (in `himL`). The former describe
the regular operating situation, e.g. "bicycles allows", whereas
the latter describe cancellations, construction work, etc.

The planned naming scheme for hafas-client:
- hints: notes from `remL` for regular operation
- warnings: notes from `himL` for cancellations, construction, etc
- remarks: both "notes" and "warnings"

This commit prepares the new naming scheme by renaming the
existing parsing logic of `remL` to "hints". Follow-up commits
will add `parseWarning`.
2018-06-07 16:34:50 +02:00
Jannis R
f3609ebd80
WIP parse remarks 2018-06-07 15:41:00 +02:00
Jannis R
0136189aa4
tests: fix isRoughlyEqual calls 2018-06-07 12:59:50 +02:00
Jannis R
a7c550ab69
send Accept: application/json 🐛 2018-06-07 12:13:31 +02:00
Jannis R
0775a27d1d
WIP parse remarks 2018-06-01 11:12:54 +02:00
Jannis R
938195753c
merge next into tests-rewrite 2018-05-31 14:00:58 +02:00
Jannis R
856a751b51 journeys: make opt.departure & opt.arrival mutually exclusive 2018-05-30 16:39:51 +02:00
Jannis R
0169e83731 journeys: add test for opt.arrival 2018-05-30 16:39:51 +02:00
Jannis R
a59b340d67 adapt tests to 1c467cd 2018-05-30 16:39:51 +02:00
Jannis R
c82ad234e0 journeys: opt.when -> opt.departure/opt.arrival 💥 2018-05-30 16:39:51 +02:00
Jannis R
a17123401d
fix tests failing because of weird endpoints
- DB: `journeyLeg()` sometimes doesn't give the `direction` #49
- nah.sh: `departures()` at "Kiel Hbf" includes neighboring stations
- ÖBB: the endpoint always returns IDs of individual stops

Although these hacks make the tests less strict, we will finally be
able to use the more thorough tests from the `tests-rewrite` branch.
2018-05-30 15:51:59 +02:00
Jannis R
1bb1ce4f8b
merge next into tests-rewrite 2018-05-30 14:22:23 +02:00
Jannis R
a356a26e2f
throw if 0 products enabled 💥
This should have been the case previously, but the test didn't fail.
2018-05-28 20:37:19 +02:00