diff --git a/docs/departures.md b/docs/departures.md index 79317bb5..fcb0909b 100644 --- a/docs/departures.md +++ b/docs/departures.md @@ -44,7 +44,7 @@ If you pass an object `opt.products`, its fields will partially override the def ```js import {createClient} from 'hafas-client' -import {vbbProfile} from 'hafas-client/p/vbb.js' +import {profile as vbbProfile} from 'hafas-client/p/vbb/index.js' const client = createClient(vbbProfile, 'my-awesome-program') @@ -62,7 +62,7 @@ As an example, we're going to use the [VBB profile](../p/vbb): ```js import {createClient} from 'hafas-client' -import {vbbProfile} from 'hafas-client/p/vbb.js' +import {profile as vbbProfile} from 'hafas-client/p/vbb/index.js' const client = createClient(vbbProfile, 'my-awesome-program') diff --git a/docs/journeys-from-trip.md b/docs/journeys-from-trip.md index 264679a9..8582bd33 100644 --- a/docs/journeys-from-trip.md +++ b/docs/journeys-from-trip.md @@ -23,7 +23,7 @@ As an example, we're going to use the [*Deutsche Bahn* profile](../p/db): ```js import {createClient} from 'hafas-client' -import {dbProfile} from 'hafas-client/p/db.js' +import {profile as dbProfile} from 'hafas-client/p/db/index.js' const berlinSüdkreuz = '8011113' const münchenHbf = '8000261' diff --git a/docs/journeys.md b/docs/journeys.md index 285f20a1..e9a1b9fb 100644 --- a/docs/journeys.md +++ b/docs/journeys.md @@ -86,7 +86,7 @@ As an example, we're going to use the [VBB profile](../p/vbb): ```js import {createClient} 'hafas-client' -import {vbbProfile} 'hafas-client/p/vbb.js' +import {profile as vbbProfile} from 'hafas-client/p/vbb/index.js' const client = createClient(vbbProfile, 'my-awesome-program') diff --git a/docs/lines.md b/docs/lines.md index 6b767e1f..76ad3664 100644 --- a/docs/lines.md +++ b/docs/lines.md @@ -8,7 +8,7 @@ As an example, we're going to use the [SVV profile](../p/svv): ```js import {createClient} from 'hafas-client' -import {svvProfile} from 'hafas-client/p/svv.js' +import {profileas svvProfile} from 'hafas-client/p/svv/index.js' const client = createClient(svvProfile, 'my-awesome-program') diff --git a/docs/locations.md b/docs/locations.md index 48bf4222..2903de56 100644 --- a/docs/locations.md +++ b/docs/locations.md @@ -24,7 +24,7 @@ As an example, we're going to use the [VBB profile](../p/vbb): ```js import {createClient} from 'hafas-client' -import {vbbProfile} from 'hafas-client/p/vbb.js' +import {profile as vbbProfile} from 'hafas-client/p/vbb/index.js' const client = createClient(vbbProfile, 'my-awesome-program') diff --git a/docs/nearby.md b/docs/nearby.md index e50cdc8e..d5fe0f6d 100644 --- a/docs/nearby.md +++ b/docs/nearby.md @@ -25,7 +25,7 @@ As an example, we're going to use the [VBB profile](../p/vbb): ```js import {createClient} from 'hafas-client' -import {vbbProfile} from 'hafas-client/p/vbb.js' +import {profile as vbbProfile} from 'hafas-client/p/vbb/index.js' const client = createClient(vbbProfile, 'my-awesome-program') diff --git a/docs/radar.md b/docs/radar.md index b2bcdc43..b3bc614d 100644 --- a/docs/radar.md +++ b/docs/radar.md @@ -26,7 +26,7 @@ As an example, we're going to use the [VBB profile](../p/vbb): ```js import {createClient} from 'hafas-client' -import {vbbProfile} from 'hafas-client/p/vbb.js' +import {profile as vbbProfile} from 'hafas-client/p/vbb/index.js' const client = createClient(vbbProfile, 'my-awesome-program') diff --git a/docs/reachable-from.md b/docs/reachable-from.md index f654ef48..403ca0dc 100644 --- a/docs/reachable-from.md +++ b/docs/reachable-from.md @@ -32,7 +32,7 @@ As an example, we're going to use the [VBB profile](../p/vbb): ```js import {createClient} from 'hafas-client' -import {vbbProfile} from 'hafas-client/p/vbb.js' +import {profile as vbbProfile} from 'hafas-client/p/vbb/index.js' const client = createClient(vbbProfile, 'my-awesome-program') diff --git a/docs/readme.md b/docs/readme.md index 3b80e49a..506ad1de 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -13,7 +13,7 @@ There's opt-in support for throttling requests to the endpoint. ```js import {createClient} from 'hafas-client' import {withThrottling} from 'hafas-client/throttle.js' -import {dbProfile} from 'hafas-client/p/db.js' +import {profile as dbProfile} from 'hafas-client/p/db/index.js' // create a throttled HAFAS client with Deutsche Bahn profile const client = createClient(withThrottling(dbProfile), 'my-awesome-program') @@ -37,7 +37,7 @@ There's opt-in support for retrying failed requests to the endpoint. ```js import {createClient} from 'hafas-client' import {withRetrying} from 'hafas-client/retry.js' -import {dbProfile} from 'hafas-client/p/db.js' +import {profile as dbProfile} from 'hafas-client/p/db/index.js' // create a client with Deutsche Bahn profile that will retry on HAFAS errors const client = createClient(withRetrying(dbProfile), 'my-awesome-program') @@ -86,12 +86,12 @@ You can use `profile.logRequest` and `profile.logResponse` to process the raw [F As an example, we can implement a custom logger: ```js -const createClient = require('hafas-client') -const dbProfile = require('hafas-client/p/db') +import {createClient} from 'hafas-client' +import {profile as dbProfile} from 'hafas-client/p/db/index.js' const logRequest = (ctx, fetchRequest, requestId) => { // ctx looks just like with the other profile.* hooks: - const {profile, opt} = ctx + const {dbProfile, opt} = ctx console.debug(requestId, fetchRequest.headers, fetchRequest.body + '') } diff --git a/docs/refresh-journey.md b/docs/refresh-journey.md index 86852945..301ac90c 100644 --- a/docs/refresh-journey.md +++ b/docs/refresh-journey.md @@ -22,7 +22,7 @@ As an example, we're going to use the [VBB profile](../p/vbb): ```js import {createClient} from 'hafas-client' -import {vbbProfile} from 'hafas-client/p/vbb.js' +import {profile as vbbProfile} from 'hafas-client/p/vbb/index.js' const client = createClient(vbbProfile) diff --git a/docs/remarks.md b/docs/remarks.md index 4aa0ad85..df372fdf 100644 --- a/docs/remarks.md +++ b/docs/remarks.md @@ -21,7 +21,7 @@ As an example, we're going to use the [SVV profile](../p/svv): ```js import {createClient} from 'hafas-client' -import {svvProfile} from 'hafas-client/p/svv.js' +import {profile as svvProfile} from 'hafas-client/p/svv/index.js' const client = createClient(svvProfile, 'my-awesome-program') diff --git a/docs/server-info.md b/docs/server-info.md index 2b8c8ee2..f0aa5ab9 100644 --- a/docs/server-info.md +++ b/docs/server-info.md @@ -17,7 +17,7 @@ As an example, we're going to use the [SVV profile](../p/svv): ```js import {createClient} from 'hafas-client' -import {svvProfile} from 'hafas-client/p/svv.js' +import {profile as svvProfile} from 'hafas-client/p/svv/index.js' const client = createClient(svvProfile, 'my-awesome-program') diff --git a/docs/stop.md b/docs/stop.md index de65116a..45d28584 100644 --- a/docs/stop.md +++ b/docs/stop.md @@ -36,7 +36,7 @@ As an example, we're going to use the [VBB profile](../p/vbb): ```js import {createClient} from 'hafas-client' -import {vbbProfile} from 'hafas-client/p/vbb.js' +import {profile as vbbProfile} from 'hafas-client/p/vbb/index.js' const client = createClient(vbbProfile, 'my-awesome-program') diff --git a/docs/trip.md b/docs/trip.md index d5d23d32..56e12ab8 100644 --- a/docs/trip.md +++ b/docs/trip.md @@ -8,7 +8,7 @@ Let's say you used [`journeys`](journeys.md) and now want to get more up-to-date ```js import {createClient} from 'hafas-client' -import {vbbProfile} from 'hafas-client/p/vbb.js' +import {profile as vbbProfile} from 'hafas-client/p/vbb/index.js' const client = createClient(vbbProfile, 'my-awesome-program') @@ -40,7 +40,7 @@ As an example, we're going to use the [VBB profile](../p/vbb): ```js import {createClient} from 'hafas-client' -import {vbbProfile} from 'hafas-client/p/vbb/index.js' +import {profile as vbbProfile} from 'hafas-client/p/vbb/index.js' const client = createClient(vbbProfile) diff --git a/docs/trips-by-name.md b/docs/trips-by-name.md index aac4a367..894fd2dd 100644 --- a/docs/trips-by-name.md +++ b/docs/trips-by-name.md @@ -8,7 +8,7 @@ As an example, we're going to use the [VBB profile](../p/vbb): ```js import {createClient} from 'hafas-client' -import {vbbProfile} from 'hafas-client/p/vbb.js' +import {profile as vbbProfile} from 'hafas-client/p/vbb/index.js' const client = createClient(vbbProfile, 'my-awesome-program') diff --git a/p/avv/example.js b/p/avv/example.js index 1b21a1c2..dfce1c7f 100644 --- a/p/avv/example.js +++ b/p/avv/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as avvProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(avvProfile, 'hafas-client-example') const rwth = '1057' const kronenberg = '1397' diff --git a/p/avv/readme.md b/p/avv/readme.md index f3e799f3..c69954de 100644 --- a/p/avv/readme.md +++ b/p/avv/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {avvProfile} from 'hafas-client/p/avv/index.js' +import {profile as avvProfile} from 'hafas-client/p/avv/index.js' // create a client with AVV profile const client = createClient(avvProfile, 'my-awesome-program') diff --git a/p/bart/example.js b/p/bart/example.js index 4e749d24..9ac768ad 100644 --- a/p/bart/example.js +++ b/p/bart/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as bartProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(bartProfile, 'hafas-client-example') const fremont = '100013296' const embarcadero = '100013295' diff --git a/p/bart/readme.md b/p/bart/readme.md index a305d237..b13210f4 100644 --- a/p/bart/readme.md +++ b/p/bart/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {bartProfile} from 'hafas-client/p/bart/index.js' +import {profile as bartProfile} from 'hafas-client/p/bart/index.js' // create a client with BART profile const client = createClient(bartProfile, 'my-awesome-program') diff --git a/p/bls/example.js b/p/bls/example.js index c077d9a8..6fe3b7ed 100644 --- a/p/bls/example.js +++ b/p/bls/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as blsProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(blsProfile, 'hafas-client-example') const bernDennigkofengässli = '8590093' const münsingenSpital = '8578932' diff --git a/p/bls/readme.md b/p/bls/readme.md index 5694540c..7c7ce04b 100644 --- a/p/bls/readme.md +++ b/p/bls/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {blsProfile} from 'hafas-client/p/bls/index.js' +import {profile as blsProfile} from 'hafas-client/p/bls/index.js' // create a client with BLS profile const client = createClient(blsProfile, 'my-awesome-program') diff --git a/p/bvg/example.js b/p/bvg/example.js index 06c97969..8597926a 100644 --- a/p/bvg/example.js +++ b/p/bvg/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as bvgProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(bvgProfile, 'hafas-client-example') // Hauptbahnhof to Charlottenburg client.journeys('900000003201', '900000024101', {results: 1, polylines: true}) diff --git a/p/bvg/readme.md b/p/bvg/readme.md index b69afeb5..7a040ae2 100644 --- a/p/bvg/readme.md +++ b/p/bvg/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {bvgProfile} from 'hafas-client/p/bvg/index.js' +import {profile as bvgProfile} from 'hafas-client/p/bvg/index.js' // create a client with BVG profile const client = createClient(bvgProfile, 'my-awesome-program') diff --git a/p/cfl/example.js b/p/cfl/example.js index cc1a3ca5..d94446be 100644 --- a/p/cfl/example.js +++ b/p/cfl/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as cflProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(cflProfile, 'hafas-client-example') const mersch = '9864348' const bruxellesCentral = '8800003' diff --git a/p/cfl/readme.md b/p/cfl/readme.md index d565b14e..fb4b004a 100644 --- a/p/cfl/readme.md +++ b/p/cfl/readme.md @@ -6,10 +6,10 @@ The [*Société Nationale des Chemins de Fer Luxembourgeois (CFL)*](https://en.w ```js import {createClient} from 'hafas-client' -import {cflProfile} from 'hafas-client/p/cfl/index.js' +import {profile as cflProfile} from 'hafas-client/p/cfl/index.js' // create a client with CFL profile -const client = createClient(cflProfile) +const client = createClient(cflProfile, 'my-awesome-program') ``` diff --git a/p/cmta/example.js b/p/cmta/example.js index 5935f6bd..a5cb3dda 100644 --- a/p/cmta/example.js +++ b/p/cmta/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as cmtaProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(cmtaProfile, 'hafas-client-example') // Broadie Oaks to Domain client.journeys('000002370', '000005919', {results: 1, polylines: true}) diff --git a/p/cmta/readme.md b/p/cmta/readme.md index e122254f..8e612895 100644 --- a/p/cmta/readme.md +++ b/p/cmta/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {cmtaProfile} from 'hafas-client/p/cmta/index.js' +import {profile as cmtaProfile} from 'hafas-client/p/cmta/index.js' // create a client with CMTA profile const client = createClient(cmtaProfile, 'my-awesome-program') diff --git a/p/dart/example.js b/p/dart/example.js index 2ce84967..c37fa83d 100644 --- a/p/dart/example.js +++ b/p/dart/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as dartProfile} from './index.js' -const client = createClient(profile, 'hafas-client example') +const client = createClient(dartProfile, 'hafas-client example') const mlkJrPkwyAdamsAveDsm2055 = '100002702' const se5thStEHackleyAveDsm2294 = '100004972' diff --git a/p/dart/readme.md b/p/dart/readme.md index a168a5d7..a185ecf4 100644 --- a/p/dart/readme.md +++ b/p/dart/readme.md @@ -8,7 +8,7 @@ ```js import {createClient} from 'hafas-client' -import {dartProfile} from 'hafas-client/p/dart/index.js' +import {profile as dartProfile} from 'hafas-client/p/dart/index.js' // create a client with DART profile const client = createClient(dartProfile, 'my-awesome-program') diff --git a/p/db-busradar-nrw/example.js b/p/db-busradar-nrw/example.js index 50c4d122..217bfdee 100644 --- a/p/db-busradar-nrw/example.js +++ b/p/db-busradar-nrw/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as dbbusradarnrwProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(dbbusradarnrwProfile, 'hafas-client-example') // Hagen Bauhaus to Schwerte Bahnhof // returns hafas error PARSE diff --git a/p/db-busradar-nrw/readme.md b/p/db-busradar-nrw/readme.md index b250ea59..59e212de 100644 --- a/p/db-busradar-nrw/readme.md +++ b/p/db-busradar-nrw/readme.md @@ -12,7 +12,7 @@ This profile adapts `hafas-client` to the HAFAS endpoint used by the application ```js import {createClient} from 'hafas-client' -import {dbbusradarnrwProfile} from 'hafas-client/p/db-busradar-nrw/index.js' +import {profile as dbbusradarnrwProfile} from 'hafas-client/p/db-busradar-nrw/index.js' // create a client with DB Busradar NRW profile const client = createClient(dbbusradarnrwProfile, 'my-awesome-program') diff --git a/p/db/example.js b/p/db/example.js index b85dc863..344a20a0 100644 --- a/p/db/example.js +++ b/p/db/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as dbProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(dbProfile, 'hafas-client-example') // Berlin Jungfernheide to München Hbf client.journeys('8011167', '8000261', {results: 1, tickets: true}) diff --git a/p/db/readme.md b/p/db/readme.md index e8ae66c7..9053f630 100644 --- a/p/db/readme.md +++ b/p/db/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {dbProfile} from 'hafas-client/p/db/index.js' +import {profile as dbProfile} from 'hafas-client/p/db/index.js' // create a client with DB profile const client = createClient(dbProfile, 'my-awesome-program') diff --git a/p/insa/example.js b/p/insa/example.js index 3f8c316a..4b6006e0 100644 --- a/p/insa/example.js +++ b/p/insa/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as insaProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(insaProfile, 'hafas-client-example') const hellestr1 = { type: 'location', diff --git a/p/insa/readme.md b/p/insa/readme.md index 5edcf327..19781e10 100644 --- a/p/insa/readme.md +++ b/p/insa/readme.md @@ -6,7 +6,7 @@ The [Nahverkehr Sachsen-Anhalt (NASA)](https://de.wikipedia.org/wiki/Nahverkehrs ```js import {createClient} from 'hafas-client' -import {insaProfile} from 'hafas-client/p/insa/index.js' +import {profile as insaProfile} from 'hafas-client/p/insa/index.js' // create a client with INSA profile const client = createClient(insaProfile, 'my-awesome-program') diff --git a/p/invg/example.js b/p/invg/example.js index abbacb18..0759de04 100644 --- a/p/invg/example.js +++ b/p/invg/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as invgProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(invgProfile, 'hafas-client-example') const ingolstadtHbf = '8000183' const audiParkplatz = '84999' diff --git a/p/invg/readme.md b/p/invg/readme.md index 6f2bab39..38ae2060 100644 --- a/p/invg/readme.md +++ b/p/invg/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {invgProfile} from 'hafas-client/p/invg/index.js' +import {profile as invgProfile} from 'hafas-client/p/invg/index.js' // create a client with INVG profile const client = createClient(invgProfile, 'my-awesome-program') diff --git a/p/irish-rail/example.js b/p/irish-rail/example.js index c58b588d..1cc60d9b 100644 --- a/p/irish-rail/example.js +++ b/p/irish-rail/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as irishProfile} from './index.js' -const client = createClient(profile, 'hafas-client example') +const client = createClient(irishProfile, 'hafas-client example') // from Dublin to Belfast Central client.journeys('9909002', '9990840', {results: 1}) diff --git a/p/irish-rail/readme.md b/p/irish-rail/readme.md index 31f63437..ca3e46c1 100644 --- a/p/irish-rail/readme.md +++ b/p/irish-rail/readme.md @@ -6,7 +6,7 @@ The [*Iarnród Éireann* (Irish Rail)](https://en.wikipedia.org/wiki/Iarnród_É ```js import {createClient} from 'hafas-client' -import {irishProfile} from 'hafas-client/p/irish-rail/index.js' +import {profile as irishProfile} from 'hafas-client/p/irish-rail/index.js' // create a client with Irish Rail profile const client = createClient(irishProfile, 'my-awesome-program') diff --git a/p/ivb/example.js b/p/ivb/example.js index eb79acd5..9b951594 100644 --- a/p/ivb/example.js +++ b/p/ivb/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as ivbProfile} from './index.js' -const client = createClient(profile, 'hafas-client example') +const client = createClient(ivbProfile, 'hafas-client example') const innsbruckGriesauweg = '476162400' const völsWest = '476431800' diff --git a/p/ivb/readme.md b/p/ivb/readme.md index d5c3ce54..4da3f276 100644 --- a/p/ivb/readme.md +++ b/p/ivb/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {ivbProfile} from 'hafas-client/p/ivb/index.js' +import {profile as ivbProfile} from 'hafas-client/p/ivb/index.js' // create a client with IVB profile const client = createClient(ivbProfile, 'my-awesome-program') diff --git a/p/kvb/example.js b/p/kvb/example.js index e2f8f184..326fb556 100644 --- a/p/kvb/example.js +++ b/p/kvb/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as kvbProfile} from './index.js' -const client = createClient(profile, 'hafas-client example') +const client = createClient(kvbProfile, 'hafas-client example') const heumarkt = '900000001' const poststr = '900000003' diff --git a/p/kvb/readme.md b/p/kvb/readme.md index 4e2c54ad..1a866de4 100644 --- a/p/kvb/readme.md +++ b/p/kvb/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {kvbProfile} from 'hafas-client/p/kvb/index.js' +import {profile as kvbProfile} from 'hafas-client/p/kvb/index.js' // create a client with KVB profile const client = createClient(kvbProfile, 'my-awesome-program') diff --git a/p/mobil-nrw/example.js b/p/mobil-nrw/example.js index 3ece0b20..c80e1a12 100644 --- a/p/mobil-nrw/example.js +++ b/p/mobil-nrw/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as mobilNrwProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(mobilNrwProfile, 'hafas-client-example') const soest = '8000076' const aachenHbf = '8000001' diff --git a/p/mobil-nrw/readme.md b/p/mobil-nrw/readme.md index dcff0d36..bf5dbd9b 100644 --- a/p/mobil-nrw/readme.md +++ b/p/mobil-nrw/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {mobilNrwProfile} from 'hafas-client/p/mobil-nrw/index.js' +import {profile as mobilNrwProfile} from 'hafas-client/p/mobil-nrw/index.js' // create a client with mobil.nrw profile const client = createClient(mobilNrwProfile) diff --git a/p/mobiliteit-lu/example.js b/p/mobiliteit-lu/example.js index 306e087d..0da84ffc 100644 --- a/p/mobiliteit-lu/example.js +++ b/p/mobiliteit-lu/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as mobiliteitluProfile} from './index.js' -const client = createClient(profile, 'hafas-client example') +const client = createClient(mobiliteitluProfile, 'hafas-client example') const mersch = '160904011' const luxembourgCentral = '200405060' diff --git a/p/mobiliteit-lu/readme.md b/p/mobiliteit-lu/readme.md index 12e4de59..4e76d556 100644 --- a/p/mobiliteit-lu/readme.md +++ b/p/mobiliteit-lu/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {mobiliteitProfile} from 'hafas-client/p/mobiliteit-lu/index.js' +import {profile as mobiliteitProfile} from 'hafas-client/p/mobiliteit-lu/index.js' // create a client with mobiliteit.lu profile const client = createClient(mobiliteitProfile, 'my-awesome-program') diff --git a/p/nahsh/example.js b/p/nahsh/example.js index d9aa8ae4..16cf3e5d 100644 --- a/p/nahsh/example.js +++ b/p/nahsh/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as nahshProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(nahshProfile, 'hafas-client-example') // Flensburg Hbf to Kiel Hbf client.journeys('8000103', '8000199', {results: 10, tickets: true}) diff --git a/p/nahsh/readme.md b/p/nahsh/readme.md index c2de85b7..dc63acee 100644 --- a/p/nahsh/readme.md +++ b/p/nahsh/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {nahshProfile} from 'hafas-client/p/nahsh/index.js' +import {profile as nahshProfile} from 'hafas-client/p/nahsh/index.js' // create a client with NAH.SH profile const client = createClient(nahshProfile, 'my-awesome-program') diff --git a/p/nvv/example.js b/p/nvv/example.js index 7374ccdf..bf480835 100644 --- a/p/nvv/example.js +++ b/p/nvv/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as nvvProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(nvvProfile, 'hafas-client-example') // Scheidemannplatz to Auestadion client.journeys('2200073', '2200042', {results: 1, polylines: true}) diff --git a/p/nvv/readme.md b/p/nvv/readme.md index d06119be..5469bff6 100644 --- a/p/nvv/readme.md +++ b/p/nvv/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {nvvProfile} from 'hafas-client/p/nvv/index.js' +import {profile as nvvProfile} from 'hafas-client/p/nvv/index.js' // create a client with NVV profile const client = createClient(nvvProfile, 'my-awesome-program') diff --git a/p/oebb/example.js b/p/oebb/example.js index 4082a613..b27d4fe1 100644 --- a/p/oebb/example.js +++ b/p/oebb/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as oebbProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(oebbProfile, 'hafas-client-example') // Wien Westbahnhof to Salzburg Hbf client.journeys('1291501', '8100002', {results: 1}) diff --git a/p/oebb/readme.md b/p/oebb/readme.md index ec8bc51b..0aae9b66 100644 --- a/p/oebb/readme.md +++ b/p/oebb/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {oebbProfile} from 'hafas-client/p/oebb/index.js' +import {profile as oebbProfile} from 'hafas-client/p/oebb/index.js' // create a client with ÖBB profile const client = createClient(oebbProfile, 'my-awesome-program') diff --git a/p/ooevv/example.js b/p/ooevv/example.js index ebc1a27d..d5349644 100644 --- a/p/ooevv/example.js +++ b/p/ooevv/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as ooevvProfile} from './index.js' -const client = createClient(profile, 'hafas-client example') +const client = createClient(ooevvProfile, 'hafas-client example') const linzTheatergasse = '444670100' const amstettenStadtbad = '431507400' diff --git a/p/ooevv/readme.md b/p/ooevv/readme.md index d7d53a49..a25dc856 100644 --- a/p/ooevv/readme.md +++ b/p/ooevv/readme.md @@ -6,10 +6,10 @@ ```js import {createClient} from 'hafas-client' -import {oövvProfile} from 'hafas-client/p/ooevv/index.js' +import {profile as ooevvProfile} from 'hafas-client/p/ooevv/index.js' // create a client with OÖVV profile -const client = createClient(oövvProfile, 'my-awesome-program') +const client = createClient(ooevvProfile, 'my-awesome-program') ``` Check out the [code examples](example.js). diff --git a/p/pkp/example.js b/p/pkp/example.js index d32787e6..cf356354 100644 --- a/p/pkp/example.js +++ b/p/pkp/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as pkpProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(pkpProfile, 'hafas-client-example') const wrocławGł = '5100069' const krakówGł = '5100028' diff --git a/p/pkp/readme.md b/p/pkp/readme.md index 7933003e..df0864e8 100644 --- a/p/pkp/readme.md +++ b/p/pkp/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {pkpProfile} from 'hafas-client/p/pkp/index.js' +import {profile as pkpProfile} from 'hafas-client/p/pkp/index.js' // create a client with PKP profile const client = createClient(pkpProfile, 'my-awesome-program') diff --git a/p/rejseplanen/example.js b/p/rejseplanen/example.js index a94c158f..a5202381 100644 --- a/p/rejseplanen/example.js +++ b/p/rejseplanen/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as rejseplanenProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(rejseplanenProfile, 'hafas-client-example') // from København Central to Aalborg // client.journeys('8600626', '8600020', {results: 1}) diff --git a/p/rejseplanen/readme.md b/p/rejseplanen/readme.md index 39c757a3..a58b79b3 100644 --- a/p/rejseplanen/readme.md +++ b/p/rejseplanen/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {rejseplanenProfile} from 'hafas-client/p/rejseplanen/index.js' +import {profile as rejseplanenProfile} from 'hafas-client/p/rejseplanen/index.js' // create a client with Rejseplanen profile const client = createClient(rejseplanenProfile) diff --git a/p/rmv/example.js b/p/rmv/example.js index 43df1333..d9161788 100644 --- a/p/rmv/example.js +++ b/p/rmv/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as rmvProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(rmvProfile, 'hafas-client-example') const marburgHbf = '3010011' const mainzGonsenheim = '3011332' diff --git a/p/rmv/readme.md b/p/rmv/readme.md index a549b157..edc23ab1 100644 --- a/p/rmv/readme.md +++ b/p/rmv/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {rmvProfile} from 'hafas-client/p/rmv/index.js' +import {profile as rmvProfile} from 'hafas-client/p/rmv/index.js' // create a client with RMV profile const client = createClient(rmvProfile, 'my-awesome-program') diff --git a/p/rsag/example.js b/p/rsag/example.js index 695302cc..e1a3ac01 100644 --- a/p/rsag/example.js +++ b/p/rsag/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as rsagProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(rsagProfile, 'hafas-client-example') const rostockHbf = '8010304' const güstrow = '8010153' diff --git a/p/rsag/readme.md b/p/rsag/readme.md index ec11d89d..29ae1b40 100644 --- a/p/rsag/readme.md +++ b/p/rsag/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {rsagProfile} from 'hafas-client/p/rsag/index.js' +import {profile as rsagProfile} from 'hafas-client/p/rsag/index.js' // create a client with RSAG profile const client = createClient(rsagProfile, 'my-awesome-program') diff --git a/p/saarfahrplan/example.js b/p/saarfahrplan/example.js index 680f8590..8fdf1617 100644 --- a/p/saarfahrplan/example.js +++ b/p/saarfahrplan/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as saarfahrplanProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(saarfahrplanProfile, 'hafas-client-example') client.journeys('15541', '10609', {results: 1}) // .then(({journeys}) => { diff --git a/p/saarfahrplan/readme.md b/p/saarfahrplan/readme.md index a64727c5..68b641f9 100644 --- a/p/saarfahrplan/readme.md +++ b/p/saarfahrplan/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {saarfahrplanProfile} from 'hafas-client/p/saarfahrplan/index.js' +import {profile as saarfahrplanProfile} from 'hafas-client/p/saarfahrplan/index.js' // create a client with Saarfahrplan profile const client = createClient(saarfahrplanProfile, 'my-awesome-program') diff --git a/p/salzburg/example.js b/p/salzburg/example.js index f0fc5308..0664c3cb 100644 --- a/p/salzburg/example.js +++ b/p/salzburg/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as salzburgProfile} from './index.js' -const client = createClient(profile, 'hafas-client example') +const client = createClient(salzburgProfile, 'hafas-client example') const salzburgGaswerkgasse = '455001300' const oberndorfKrankenhaus = '455110200' diff --git a/p/salzburg/readme.md b/p/salzburg/readme.md index a39cc5f2..2e43a08d 100644 --- a/p/salzburg/readme.md +++ b/p/salzburg/readme.md @@ -6,7 +6,7 @@ The government of [Salzburg](https://en.wikipedia.org/wiki/Salzburg) operates a ```js import {createClient} from 'hafas-client' -import {salzburgProfile} from 'hafas-client/p/salzburg/index.js' +import {profile as salzburgProfile} from 'hafas-client/p/salzburg/index.js' // create a client with Salzburg profile const client = createClient(salzburgProfile, 'my-awesome-program') diff --git a/p/sbahn-muenchen/example.js b/p/sbahn-muenchen/example.js index b47baaf3..420ff6b1 100644 --- a/p/sbahn-muenchen/example.js +++ b/p/sbahn-muenchen/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as sMuenchenProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(sMuenchenProfile, 'hafas-client-example') // Mittersendling to Charlottenburg // client.journeys('8004154', '0621790', {results: 1, polylines: true}) diff --git a/p/sbahn-muenchen/readme.md b/p/sbahn-muenchen/readme.md index 0acf4edb..53ada969 100644 --- a/p/sbahn-muenchen/readme.md +++ b/p/sbahn-muenchen/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {sMuenchenProfile} from 'hafas-client/p/sbahn-muenchen/index.js' +import {profile as sMuenchenProfile} from 'hafas-client/p/sbahn-muenchen/index.js' // create a client with S-Bahn München profile const client = createClient(sMuenchenProfile, 'my-awesome-program') diff --git a/p/sncb/example.js b/p/sncb/example.js index c2b15a0c..d4e16d99 100644 --- a/p/sncb/example.js +++ b/p/sncb/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as sncbProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(sncbProfile, 'hafas-client-example') const gentStPieters = '8892007' const bruxellesMidi = '8814001' diff --git a/p/sncb/readme.md b/p/sncb/readme.md index 867bfe57..c0ebffd5 100644 --- a/p/sncb/readme.md +++ b/p/sncb/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {sncbProfile} from 'hafas-client/p/sncb/index.js' +import {profile as sncbProfile} from 'hafas-client/p/sncb/index.js' // create a client with SNCB profile const client = createClient(sncbProfile, 'my-awesome-program') diff --git a/p/stv/example.js b/p/stv/example.js index 3488f12a..3298ca3e 100644 --- a/p/stv/example.js +++ b/p/stv/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as stvProfile} from './index.js' -const client = createClient(profile, 'hafas-client example') +const client = createClient(stvProfile, 'hafas-client example') const grazSonnenhang = '460413500' const grazHödlweg = '460415400' diff --git a/p/stv/readme.md b/p/stv/readme.md index e23ae8a7..77ee0dd9 100644 --- a/p/stv/readme.md +++ b/p/stv/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {stvProfile} from 'hafas-client/p/stv/index.js' +import {profile as stvProfile} from 'hafas-client/p/stv/index.js' // create a client with STV profile const client = createClient(stvProfile, 'my-awesome-program') diff --git a/p/svv/example.js b/p/svv/example.js index 3c85c617..d577b383 100644 --- a/p/svv/example.js +++ b/p/svv/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as svvProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(svvProfile, 'hafas-client-example') const sam = '455086100' const volksgarten = '455082100' diff --git a/p/svv/readme.md b/p/svv/readme.md index 76812a9e..92dba6c7 100644 --- a/p/svv/readme.md +++ b/p/svv/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {svvProfile} from 'hafas-client/p/svv/index.js' +import {profile as svvProfile} from 'hafas-client/p/svv/index.js' // create a client with SVV profile const client = createClient(svvProfile, 'my-awesome-program') diff --git a/p/tpg/example.js b/p/tpg/example.js index eb5d21f8..24140fd0 100644 --- a/p/tpg/example.js +++ b/p/tpg/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as tpgProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(tpgProfile, 'hafas-client-example') const miremont = '100449' const moillebeau = '100451' diff --git a/p/tpg/readme.md b/p/tpg/readme.md index e2a07389..67d8f0ab 100644 --- a/p/tpg/readme.md +++ b/p/tpg/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {tpgProfile} from 'hafas-client/p/tpg/index.js' +import {profile as tpgProfile} from 'hafas-client/p/tpg/index.js' // create a client with TPG profile const client = createClient(tpgProfile, 'my-awesome-program') diff --git a/p/vbb/example.js b/p/vbb/example.js index b4d2b5a8..b479a1d5 100644 --- a/p/vbb/example.js +++ b/p/vbb/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as vbnProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(vbnProfile, 'hafas-client-example') // Hauptbahnhof to Charlottenburg // client.journeys('900000003201', '900000024101', {results: 1, polylines: true}) diff --git a/p/vbb/readme.md b/p/vbb/readme.md index 93a6fa88..7c32b901 100644 --- a/p/vbb/readme.md +++ b/p/vbb/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {vbbProfile} from 'hafas-client/p/vbb/index.js' +import {profile as vbbProfile} from 'hafas-client/p/vbb/index.js' // create a client with VBB profile const client = createClient(vbbProfile, 'my-awesome-program') diff --git a/p/vbn/example.js b/p/vbn/example.js index d27b01ad..538f35ff 100644 --- a/p/vbn/example.js +++ b/p/vbn/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as vbnProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(vbnProfile, 'hafas-client-example') const bremerhavenHbf = '9014418' const verden = '9093627' diff --git a/p/vbn/readme.md b/p/vbn/readme.md index 92be393f..c99c25f4 100644 --- a/p/vbn/readme.md +++ b/p/vbn/readme.md @@ -6,7 +6,7 @@ The [*Verkehrsverbund Bremen/Niedersachsen (VBN)*](https://de.wikipedia.org/wiki ```js import {createClient} from 'hafas-client' -import {vbnProfile} from 'hafas-client/p/vbn/index.js' +import {profile as vbnProfile} from 'hafas-client/p/vbn/index.js' // create a client with VBN profile const client = createClient(vbnProfile, 'my-awesome-program') diff --git a/p/vkg/example.js b/p/vkg/example.js index f8948867..5c6f9046 100644 --- a/p/vkg/example.js +++ b/p/vkg/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as vkgProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(vkgProfile, 'hafas-client-example') const spittalMittelschule = '420512200' const klagenfurtSteingasse = '420649500' diff --git a/p/vkg/readme.md b/p/vkg/readme.md index 410e59af..967863cf 100644 --- a/p/vkg/readme.md +++ b/p/vkg/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {vkgProfile} from 'hafas-client/p/vkg/index.js' +import {profile as vkgProfile} from 'hafas-client/p/vkg/index.js' // create a client with VKG profile const client = createClient(vkgProfile, 'my-awesome-program') diff --git a/p/vmt/example.js b/p/vmt/example.js index aa665e93..262d24e6 100644 --- a/p/vmt/example.js +++ b/p/vmt/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as vmtProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(vmtProfile, 'hafas-client-example') const jena = '190014' const gothaZOB = '167280' diff --git a/p/vmt/readme.md b/p/vmt/readme.md index cb6c78ce..15e31fee 100644 --- a/p/vmt/readme.md +++ b/p/vmt/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {vmtProfile} from 'hafas-client/p/vmt/index.js' +import {profile as vmtProfile} from 'hafas-client/p/vmt/index.js' // create a client with VMT profile const client = createClient(vmtProfile, 'my-awesome-program') diff --git a/p/vor/example.js b/p/vor/example.js index 86ea82bd..5a704715 100644 --- a/p/vor/example.js +++ b/p/vor/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as vorProfile} from './index.js' -const client = createClient(profile, 'hafas-client example') +const client = createClient(vorProfile, 'hafas-client example') const stPöltenLinzerTor = '431277900' const eisenstadtSchlossplatz = '415003300' diff --git a/p/vor/readme.md b/p/vor/readme.md index 8b1cf86b..1b17ffcc 100644 --- a/p/vor/readme.md +++ b/p/vor/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {vorProfile} from 'hafas-client/p/vor/index.js' +import {profile as vorProfile} from 'hafas-client/p/vor/index.js' // create a client with VOR profile const client = createClient(vorProfile, 'my-awesome-program') diff --git a/p/vos/example.js b/p/vos/example.js index ef4c2889..9c4862d7 100644 --- a/p/vos/example.js +++ b/p/vos/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as vosProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(vosProfile, 'hafas-client-example') const saarplatz = '9071733' const finkenweg = '9071574' diff --git a/p/vos/readme.md b/p/vos/readme.md index 325e14db..ebca3b41 100644 --- a/p/vos/readme.md +++ b/p/vos/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {vosProfile} from 'hafas-client/p/vos/index.js' +import {profile as vosProfile} from 'hafas-client/p/vos/index.js' // create a client with VOS profile const client = createClient(vosProfile, 'my-awesome-program') diff --git a/p/vrn/example.js b/p/vrn/example.js index ed977c4d..e50fd2d5 100644 --- a/p/vrn/example.js +++ b/p/vrn/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as vrnProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(vrnProfile, 'hafas-client-example') const ludwigshafen = '8000236' const meckesheim = '8003932' diff --git a/p/vrn/readme.md b/p/vrn/readme.md index fa844ee3..1570bf4b 100644 --- a/p/vrn/readme.md +++ b/p/vrn/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {vrnProfile} from 'hafas-client/p/vrn/index.js' +import {profile as vrnProfile} from 'hafas-client/p/vrn/index.js' // create a client with VRN profile const client = createClient(vrnProfile, 'my-awesome-program') diff --git a/p/vsn/example.js b/p/vsn/example.js index e95ba854..fc96a0f4 100644 --- a/p/vsn/example.js +++ b/p/vsn/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as vsnProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(vsnProfile, 'hafas-client-example') client.journeys('9033961', '9033962', {results: 1, polylines: true}) diff --git a/p/vsn/readme.md b/p/vsn/readme.md index e7d5a2a3..27dedf72 100644 --- a/p/vsn/readme.md +++ b/p/vsn/readme.md @@ -4,7 +4,7 @@ ## Usage ```js import {createClient} from 'hafas-client' -import {vsnProfile} from 'hafas-client/p/vsn/index.js' +import {profile as vsnProfile} from 'hafas-client/p/vsn/index.js' // create a client with VSN profile const client = createClient(vsnProfile, 'my-awesome-program') diff --git a/p/vvt/example.js b/p/vvt/example.js index c60f4940..17a1eea0 100644 --- a/p/vvt/example.js +++ b/p/vvt/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as vvtProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(vvtProfile, 'hafas-client-example') const innsbruckMitterweg = '476152300' const kufsteinListstr = '476603100' diff --git a/p/vvt/readme.md b/p/vvt/readme.md index 0628c128..7ce9a988 100644 --- a/p/vvt/readme.md +++ b/p/vvt/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {vvtProfile} from 'hafas-client/p/vvt/index.js' +import {profile as vvtProfile} from 'hafas-client/p/vvt/index.js' // create a client with VVT profile const client = createClient(vvtProfile, 'my-awesome-program') diff --git a/p/vvv/example.js b/p/vvv/example.js index e86da3d8..f043edd6 100644 --- a/p/vvv/example.js +++ b/p/vvv/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as vvvProfile} from './index.js' -const client = createClient(profile, 'hafas-client example') +const client = createClient(vvvProfile, 'hafas-client example') const bregenzLandeskrankenhaus = '480195700' const bludenzGymnasium = '480031300' diff --git a/p/vvv/readme.md b/p/vvv/readme.md index 2fc281ce..11503248 100644 --- a/p/vvv/readme.md +++ b/p/vvv/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {vvvProfile} from 'hafas-client/p/vvv/index.js' +import {profile as vvvProfile} from 'hafas-client/p/vvv/index.js' // create a client with VVV profile const client = createClient(vvvProfile, 'my-awesome-program') diff --git a/p/zvv/example.js b/p/zvv/example.js index 84350e02..6c272084 100644 --- a/p/zvv/example.js +++ b/p/zvv/example.js @@ -1,8 +1,8 @@ import {inspect} from 'util' import {createClient} from '../../index.js' -import {profile} from './index.js' +import {profile as zvvProfile} from './index.js' -const client = createClient(profile, 'hafas-client-example') +const client = createClient(zvvProfile, 'hafas-client-example') const bürkliplatz = '8591105' diff --git a/p/zvv/readme.md b/p/zvv/readme.md index 2808e7d7..c5cb45c1 100644 --- a/p/zvv/readme.md +++ b/p/zvv/readme.md @@ -6,7 +6,7 @@ ```js import {createClient} from 'hafas-client' -import {zvvProfile} from 'hafas-client/p/zvv/index.js' +import {profile as zvvProfile} from 'hafas-client/p/zvv/index.js' // create a client with ZVV profile const client = createClient(zvvProfile, 'my-awesome-program') diff --git a/readme.md b/readme.md index a8a620e5..8ca2cc4e 100644 --- a/readme.md +++ b/readme.md @@ -50,7 +50,7 @@ Pick the [profile](p/readme.md) for the HAFAS endpoint covering the area you wan ```js import {createClient} from 'hafas-client' -import {dbProfile} from 'hafas-client/p/db/index.js' +import {profile as dbProfile} from 'hafas-client/p/db/index.js' // create a client with the Deutsche Bahn profile const client = createClient(dbProfile, 'my-awesome-program')