From 6439a561ee91048c515d4ec284c69cfd7968fd7c Mon Sep 17 00:00:00 2001 From: Jannis R Date: Mon, 19 Dec 2022 13:51:00 +0100 Subject: [PATCH] =?UTF-8?q?hafas-client@6=20=F0=9F=92=A5=F0=9F=93=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 4 ++-- package.json | 2 +- readme.md | 8 ++++---- retry.js | 6 +++--- throttle.js | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/index.js b/index.js index 6b0fe0a..a1372a8 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ -import createClient from 'hafas-client' -import dbProfile from 'hafas-client/p/db/index.js' +import {createClient} from 'hafas-client' +import {profile as dbProfile} from 'hafas-client/p/db/index.js' const defaults = { profile: dbProfile, diff --git a/package.json b/package.json index e31a4f3..a1a3f10 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "node": ">=18" }, "dependencies": { - "hafas-client": "^5.0.1" + "hafas-client": "^6.0.1" }, "devDependencies": { "eslint": "^8.30.0" diff --git a/readme.md b/readme.md index 0968c5f..1ba8b40 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ **A client for the German Railways (DB).** It acts as a consistent and straightforward interface on top of a verbose API. -This project is actually a thin wrapper around [`hafas-client@5`](https://github.com/public-transport/hafas-client/tree/5#hafas-client). [Its docs](https://github.com/public-transport/hafas-client/tree/5/docs) document the API in general. +This project is actually a thin wrapper around [`hafas-client@6`](https://github.com/public-transport/hafas-client/blob/6/readme.md). [Its docs](https://github.com/public-transport/hafas-client/blob/6/docs/readme.md) document the API in general. ![db-rest architecture diagram](https://rawgit.com/derhuerst/db-rest/master/architecture.svg) @@ -21,7 +21,7 @@ npm install db-hafas ## API -Check [the docs for `hafas-client@5`](https://github.com/public-transport/hafas-client/tree/5/docs) as well as [its DB-specific customisations](https://github.com/public-transport/hafas-client/blob/5/p/db/readme.md). +Check [the docs for `hafas-client@6`](https://github.com/public-transport/hafas-client/tree/6/docs) as well as [its DB-specific customisations](https://github.com/public-transport/hafas-client/blob/6/p/db/readme.md). ## Getting Started @@ -32,7 +32,7 @@ import {createDbHafas} from 'db-hafas' const hafas = createDbHafas('my-awesome-program') ``` -As an example, we will search for a route from *Berlin Jungfernheide* to *München Hbf*. To get the station IDs, use [`locations(query, [opt])`](https://github.com/public-transport/hafas-client/blob/5/docs/locations.md). +As an example, we will search for a route from *Berlin Jungfernheide* to *München Hbf*. To get the station IDs, use [`locations(query, [opt])`](https://github.com/public-transport/hafas-client/blob/6/docs/locations.md). ```javascript // Berlin Jungfernheide to München Hbf @@ -153,7 +153,7 @@ The output will be an array of [`journey` objects in the *Friendly Public Transp - [db-prices](https://github.com/juliuste/db-prices) – Find the cheapest routes using the DB Sparpreise API. - [db-stations](https://github.com/derhuerst/db-stations) – An offline list of all DB stations. -Also check [`hafas-client`'s related projects](https://github.com/public-transport/hafas-client/blob/5/readme.md#related-projects). +Also check [`hafas-client`'s related projects](https://github.com/public-transport/hafas-client/blob/6/readme.md#related-projects). ## Contributing diff --git a/retry.js b/retry.js index 9b75013..33f0941 100644 --- a/retry.js +++ b/retry.js @@ -1,6 +1,6 @@ -import createClient from 'hafas-client' -import withRetrying from 'hafas-client/retry.js' -import dbProfile from 'hafas-client/p/db/index.js' +import {createClient} from 'hafas-client' +import {withRetrying} from 'hafas-client/retry.js' +import {profile as dbProfile} from 'hafas-client/p/db/index.js' const createRetryingClient = (userAgent, opt = {}) => { const {retryOpts} = {retryOpts: {}, ...opt} diff --git a/throttle.js b/throttle.js index a81f395..1a4f912 100644 --- a/throttle.js +++ b/throttle.js @@ -1,6 +1,6 @@ -import createClient from 'hafas-client' -import withThrottling from 'hafas-client/throttle.js' -import dbProfile from 'hafas-client/p/db/index.js' +import {createClient} from 'hafas-client' +import {withThrottling} from 'hafas-client/throttle.js' +import {profile as dbProfile} from 'hafas-client/p/db/index.js' const createThrottledClient = (userAgent, opt = {}) => { const {