Commit graph

1256 commits

Author SHA1 Message Date
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
92310ebdab
2.8.1 2018-06-07 12:04:48 +02:00
Jannis R
769f2e33f6
send Accept: application/json 🐛 2018-06-07 12:04:21 +02:00
Jannis R
7ec8540db4
changelog for 2.7.x and 2.8.0 📝 2018-06-04 19:11:59 +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
f3d8304db8 INSA, Nah.sh: HTTPS 🔒 2018-05-30 16:05:05 +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
Jannis R
634b044bc5
nah.sh tests: fix products validation 🐛 2018-05-28 20:37:19 +02:00
Jannis R
57f3cdb7e0 parseLocation: null as fallback station name 2018-05-25 16:08:17 +02:00
Jannis R
7541bcae66 adapt nah.sh radar test to #34 2018-05-25 16:08:17 +02:00
Jannis R
187d2ac04e Nah.sh: enable radar despite failing test
see #34 for more details
2018-05-25 16:08:17 +02:00
Jannis R
deb88297a0 journeys: whenRepresents option 2018-05-24 22:06:46 +02:00
Jannis R
6063fa6651
journeys: fix polylines option 🐛 2018-05-24 21:54:25 +02:00
Jannis R
e479619387
cherry-pick 16c3f01: DB: 1.16 protocol, journeyLeg, fix polylines 🐛 2018-05-24 14:06:53 +02:00
Jannis R
16c3f01118
DB: 1.16 protocol, enable journeyLeg, 2.8.0
Although `journeyLeg()` can be unreliable for DB (#49), I enabled
it here. This is not a breaking change because, previously, you
were not able to use `journeyLeg()` in the first place. Let's hope
that it works for people. 🙈

By changing to the 1.16 protocol, we support the `polyline` option
of `journeyLeg()` as well.
2018-05-24 13:50:53 +02:00
Jannis R
908d53189a
DB journeys: fix polylines parsing 🐛, 2.7.5 2018-05-24 13:44:47 +02:00
Jannis R
709b7b4e32
luxon@1, vbb-short-station-name@1, 2.7.4 2018-05-24 10:52:18 +02:00
Jannis R
00b1eb387c
crypto.createHash -> create-hash, 2.7.3
closes #52
2018-05-24 10:29:50 +02:00
Jannis Redmann
c5aab72e71
merge #45 from format-location-err-msg
formatLocation: more helpful error messages
2018-05-24 10:28:50 +02:00
Jannis Redmann
bebb975584
Merge branch 'next' into format-location-err-msg 2018-05-24 10:28:18 +02:00
Jannis R
03b9ab9a83 expect parsePolyline in lib/validate-profile 2018-05-24 10:26:24 +02:00
Jannis R
8c896fe8c1 docs for new polyline format 📝 2018-05-24 10:26:24 +02:00
Jannis R
431574b756 parseJourneyLeg, parseMovement: use parsePolyline 💥, refactor 2018-05-24 10:26:24 +02:00
Jannis R
deefeb1f64 add parsePolyline to default profile 2018-05-24 10:26:24 +02:00
Jannis R
0ef03015e0
validate opt.when 💥 2018-05-21 17:10:42 +02:00
Jannis R
ef42edbfd7
crypto.createHash -> create-hash, 2.7.3
closes #52
2018-05-21 12:18:57 +02:00
Jannis R
0840d69ee9
radar: assert north > south & east > west 2018-05-16 21:53:33 +02:00
Jannis R
c9e77f3050
merge master into next 2018-05-16 19:41:45 +02:00
Jannis R
48f2cefb5b
parseMovement: expose journey (leg) id 2018-05-16 19:32:11 +02:00
Jannis R
a97e0d31e7
radar: fix polylines parsing 🐛, 2.7.2 2018-05-16 00:43:08 +02:00