wili 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.de.md +14 -7
- package/README.md +14 -7
- package/data/wienerlinien-ogd-haltestellen.json +24004 -0
- package/data/wienerlinien-ogd-linien.json +1482 -0
- package/data/wienerlinien-ogd-steige.json +96566 -0
- package/data/wienerlinien-ogd-teilstrecken-lonlat.json +331802 -0
- package/data/wienerlinien-ogd-teilstrecken-wkt.json +10676 -0
- package/lib/wili.mjs +63 -94
- package/package.json +30 -29
- package/types/index.d.ts +34 -0
- package/.eslintrc.cjs +0 -16
- package/.github/workflows/default.yml +0 -44
- package/.github/workflows/stale.yml +0 -21
- package/.vscode/tasks.json +0 -19
- package/lib/wili.cjs +0 -106
- package/pnpm-lock.yaml +0 -2148
- package/rollup.config.js +0 -55
package/README.de.md
CHANGED
|
@@ -6,15 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
[English](README.md) | **Deutsch**
|
|
8
8
|
|
|
9
|
-
Node Wrapper für
|
|
9
|
+
Node Wrapper für die Echtzeitdaten-API der Wiener Linien
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
13
|
-
`
|
|
14
|
-
|
|
15
|
-
## Voraussetzungen
|
|
16
|
-
|
|
17
|
-
**Hinweis:** Seit November 2019 wird kein gültiger API Key mehr für die Verwendung benötigt. Zuvor erworbene Keys können weiterhin verwendet werden.
|
|
13
|
+
`npm install wili`
|
|
18
14
|
|
|
19
15
|
## Anwendung
|
|
20
16
|
|
|
@@ -40,13 +36,24 @@ wili.trafficInfoList(options)
|
|
|
40
36
|
|
|
41
37
|
// async/await
|
|
42
38
|
try {
|
|
43
|
-
|
|
39
|
+
const data = await wili.trafficInfoList(options);
|
|
44
40
|
console.log(data.trafficInfos);
|
|
45
41
|
} catch (output) {
|
|
46
42
|
console.error(error);
|
|
47
43
|
}
|
|
48
44
|
```
|
|
49
45
|
|
|
46
|
+
:warning: Für NodeJS-Versionen unterhalb v18, muss die Klasse mit einer `fetch`-Implementierung instanziert werden.
|
|
47
|
+
|
|
48
|
+
**Beispiel**
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
import { WienerLinien } from 'wili';
|
|
52
|
+
import fetch from 'isomorphic-fetch';
|
|
53
|
+
|
|
54
|
+
const wili = new WienerLinien(fetch);
|
|
55
|
+
```
|
|
56
|
+
|
|
50
57
|
## API
|
|
51
58
|
|
|
52
59
|
### monitor
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.org/package/wili)
|
|
4
4
|
[](https://www.npmjs.org/package/wili)
|
|
5
|
-
[](https://github.com/idleberg/node-wili/actions)
|
|
6
6
|
|
|
7
7
|
**English** | [Deutsch](README.de.md)
|
|
8
8
|
|
|
@@ -10,11 +10,7 @@ A Node wrapper for the Wiener Linien public transport API
|
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
13
|
-
`
|
|
14
|
-
|
|
15
|
-
## Prerequisites
|
|
16
|
-
|
|
17
|
-
**Note:** As of November 2019, a valid API key to access Wiener Linien's real-time data is no longer required. However, if you obtained a key before, you can continue using it.
|
|
13
|
+
`npm install wili`
|
|
18
14
|
|
|
19
15
|
## Usage
|
|
20
16
|
|
|
@@ -40,13 +36,24 @@ wili.trafficInfoList(options)
|
|
|
40
36
|
|
|
41
37
|
// async/await
|
|
42
38
|
try {
|
|
43
|
-
|
|
39
|
+
const data = await wili.trafficInfoList(options);
|
|
44
40
|
console.log(data.trafficInfos);
|
|
45
41
|
} catch (output) {
|
|
46
42
|
console.error(error);
|
|
47
43
|
}
|
|
48
44
|
```
|
|
49
45
|
|
|
46
|
+
:warning: For NodeJS versions lower than v18, the class needs to be instantiated with a `fetch`-implementation
|
|
47
|
+
|
|
48
|
+
**Example**
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
import { WienerLinien } from 'wili';
|
|
52
|
+
import fetch from 'isomorphic-fetch';
|
|
53
|
+
|
|
54
|
+
const wili = new WienerLinien(fetch);
|
|
55
|
+
```
|
|
56
|
+
|
|
50
57
|
## API
|
|
51
58
|
|
|
52
59
|
### monitor
|