diff --git a/docs/api.md b/docs/api.md index ede9fd13..d51600a0 100644 --- a/docs/api.md +++ b/docs/api.md @@ -12,7 +12,7 @@ Also see the [root readme](https://github.com/public-transport/db-vendo-client) - [`locations(query, [opt])`](locations.md) – find stations, POIs and addresses - [`stop(id, [opt])`](stop.md) – get details about a stop/station - [`nearby(location, [opt])`](nearby.md) – show stations & POIs around -- `radar(north, west, south, east, [opt])` – not supporteda +- `radar(north, west, south, east, [opt])` – not supported - `reachableFrom(address, [opt])` – not supported - `remarks([opt])` – not supported - `lines(query, [opt])` – not supported diff --git a/docs/journeys.md b/docs/journeys.md index b930f5bd..73466b55 100644 --- a/docs/journeys.md +++ b/docs/journeys.md @@ -28,7 +28,7 @@ longitude: 3.21 } -// an address, which is an FTPF `location` object +// an address, which is an FPTF `location` object { type: 'location', address: 'foo street 1', diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 3ff865d7..42e525d9 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.3 info: title: db-vendo-client - description: Schema for db-vendo-client/hafas-rest-api's Friendy Public Transport Format REST API + description: Schema for db-vendo-client/hafas-rest-api's Friendly Public Transport Format REST API contact: url: https://github.com/public-transport/db-vendo-client version: '6' @@ -275,7 +275,7 @@ paths: format: date-time - name: earlierThan in: query - description: Compute journeys "before" an `ealierRef`. + description: Compute journeys "before" an `earlierRef`. schema: type: string - name: laterThan diff --git a/docs/readme.md b/docs/readme.md index 2f6a3cc9..fb5bff7b 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -134,7 +134,7 @@ Unexpected errors – e.g. due to bugs in `db-vendo-client` itself – aside, it Each `HafasError` error has the following properties: -- `isHafasError` – Always `true`. Allows you to differente HAFAS-related errors from e.g. network errors. +- `isHafasError` – Always `true`. Allows you to distinguish HAFAS-related errors from e.g. network errors. - `code` – A string representing the error type for all other error classes, e.g. `INVALID_REQUEST` for `HafasInvalidRequestError`. `null` for plain `HafasError`s. - `isCausedByServer` – Boolean, telling you if the HAFAS endpoint says that it couldn't process your request because *it* is unavailable/broken. - `hafasCode` – A HAFAS-specific error code, if the HAFAS endpoint returned one; e.g. `H890` when no journeys could be found. `null` otherwise. diff --git a/lib/errors.js b/lib/errors.js index 31819070..981baaa7 100644 --- a/lib/errors.js +++ b/lib/errors.js @@ -111,7 +111,7 @@ const byErrorCode = Object.assign(Object.create(null), { }, PROBLEMS: { Error: HafasServerError, - message: 'an unknown problem occured during search', + message: 'an unknown problem occurred during search', props: { shouldRetry: true, }, @@ -212,7 +212,7 @@ const byErrorCode = Object.assign(Object.create(null), { }, H9230: { Error: HafasServerError, - message: 'journeys search: an internal error occured', + message: 'journeys search: an internal error occurred', props: { shouldRetry: true, }, diff --git a/p/dbweb/example.js b/p/dbweb/example.js index 2bdf0e6a..3661599e 100644 --- a/p/dbweb/example.js +++ b/p/dbweb/example.js @@ -12,7 +12,7 @@ const regensburgHbf = '8000309' let data = await client.locations('Berlin Jungfernheide') // let data = await client.locations('Atze Musiktheater', { // poi: true, -// addressses: false, +// addresses: false, // fuzzy: false, // }) // let data = await client.nearby({ diff --git a/parse/location.js b/parse/location.js index 6a1f5e10..5bf21d6b 100644 --- a/parse/location.js +++ b/parse/location.js @@ -28,7 +28,7 @@ const parseLocation = (ctx, l) => { res.longitude = lid.X / 1000000; } - // addresses and pois might also have fake evaNr sometimes! + // addresses and POIs might also have fake evaNr sometimes! if (l.type === STATION || l.extId || l.evaNumber || l.evaNo || lid.A == '1' || l.bahnhofsId) { let stop = { type: 'station', diff --git a/test/e2e/db.js b/test/e2e/db.js index f6604c24..2f705163 100644 --- a/test/e2e/db.js +++ b/test/e2e/db.js @@ -210,7 +210,7 @@ tap.test('Berlin Schwedter Str. to ATZE Musiktheater', async (t) => { }); tap.test('journeys: via works – with detour', async (t) => { - // Going from Westhafen to Wedding via Württembergalle without detour + // Going from Westhafen to Wedding via Württembergallee without detour // is currently impossible. We check if the routing engine computes a detour. const res = await client.journeys(westhafen, wedding, { via: württembergallee, diff --git a/test/e2e/dbnav.js b/test/e2e/dbnav.js index 7f8e45e3..3fd908bc 100644 --- a/test/e2e/dbnav.js +++ b/test/e2e/dbnav.js @@ -210,7 +210,7 @@ tap.test('Berlin Schwedter Str. to ATZE Musiktheater', async (t) => { }); tap.test('journeys: via works – with detour', async (t) => { - // Going from Westhafen to Wedding via Württembergalle without detour + // Going from Westhafen to Wedding via Württembergallee without detour // is currently impossible. We check if the routing engine computes a detour. const res = await client.journeys(westhafen, wedding, { via: württembergallee, diff --git a/test/e2e/dbregioguide.js b/test/e2e/dbregioguide.js index 9350f936..54d471a3 100644 --- a/test/e2e/dbregioguide.js +++ b/test/e2e/dbregioguide.js @@ -211,7 +211,7 @@ tap.test('Berlin Schwedter Str. to ATZE Musiktheater', async (t) => { }); tap.test('journeys: via works – with detour', async (t) => { - // Going from Westhafen to Wedding via Württembergalle without detour + // Going from Westhafen to Wedding via Württembergallee without detour // is currently impossible. We check if the routing engine computes a detour. const res = await client.journeys(westhafen, wedding, { via: württembergallee, diff --git a/test/e2e/dbweb.js b/test/e2e/dbweb.js index 4d2acbe8..9be3dd81 100644 --- a/test/e2e/dbweb.js +++ b/test/e2e/dbweb.js @@ -210,7 +210,7 @@ tap.test('Berlin Schwedter Str. to ATZE Musiktheater', async (t) => { }); tap.test('journeys: via works – with detour', async (t) => { - // Going from Westhafen to Wedding via Württembergalle without detour + // Going from Westhafen to Wedding via Württembergallee without detour // is currently impossible. We check if the routing engine computes a detour. const res = await client.journeys(westhafen, wedding, { via: württembergallee, diff --git a/test/e2e/lib/util.js b/test/e2e/lib/util.js index f0a6d842..c072889e 100644 --- a/test/e2e/lib/util.js +++ b/test/e2e/lib/util.js @@ -1,4 +1,4 @@ -// Polly's HTTP adapter uses nock [1] underneath, with currenctly monkey-patches the built-in `node:http` module. For this to work, it must be imported quite early, before many other parts of hafas-client. +// Polly's HTTP adapter uses nock [1] underneath, with currently monkey-patches the built-in `node:http` module. For this to work, it must be imported quite early, before many other parts of hafas-client. // Importing the adapter itself has no side effects (or rather: immediately undoes nock's monkey-patching, to re-patch when it is actually getting used). We activate it (by passing it into Polly's core) below. // remotely related: https://github.com/nock/nock/issues/2461 import NodeHttpAdapter from '@pollyjs/adapter-node-http';