Gathering detailed insights and metrics for bvg-hafas
Gathering detailed insights and metrics for bvg-hafas
Gathering detailed insights and metrics for bvg-hafas
Gathering detailed insights and metrics for bvg-hafas
npm install bvg-hafas
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
ISC License
13 Stars
24 Commits
3 Watchers
5 Branches
7 Contributors
Updated on Sep 17, 2023
Latest Version
4.0.0
Package Id
bvg-hafas@4.0.0
Unpacked Size
6.13 kB
Size
2.73 kB
File Count
6
NPM Version
8.19.3
Node Version
19.1.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
1
A client for the HAFAS endpoint of Berliner Verkehrsbetriebe (BVG), the largest public transport provider in Berlin. It acts as a consistent and straightforward interface on top of their verbose API.
This project is actually a thin wrapper around hafas-client@6
. Its docs document the API in general.
Note: The BVG HAFAS endpoint covers Brandenburg as well.
1npm install bvg-hafas
Check the docs for hafas-client@6
as well as its BVG-specific customisations.
1import {createBvgHafas} from 'bvg-hafas' 2 3const client = createBvgHafas('my-awesome-program')
As an example, we will search for a route from Berlin Jungfernheide to Tempelhof. To get the station IDs, use locations(query, [opt])
.
1const journeys = await client.journeys('900020201', '900068201', { 2 results: 1, 3}) 4console.log(journeys[0])
The output will be an array of journey
objects in the Friendly Public Transport Format 1.2.1
format:
1{ 2 type: 'journey', 3 legs: [ { 4 id: '1|62072|0|86|14082018', 5 origin: { 6 type: 'stop', 7 id: '900020201', 8 name: 'S+U Jungfernheide', 9 location: { 10 type: 'location', 11 latitude: 52.530273, 12 longitude: 13.299064 13 }, 14 products: { 15 suburban: true, 16 subway: true, 17 tram: false, 18 bus: true, 19 ferry: false, 20 express: false, 21 regional: true 22 } 23 }, 24 departure: '2018-08-14T15:05:00.000+02:00', 25 departurePlatform: '6', 26 departureDelay: 0, 27 destination: { 28 type: 'stop', 29 id: '900068201', 30 name: 'S+U Tempelhof', 31 location: { 32 type: 'location', 33 latitude: 52.470692, 34 longitude: 13.385756 35 }, 36 products: { /* … */ } 37 }, 38 arrival: '2018-08-14T15:27:00.000+02:00', 39 arrivalPlatform: '2', 40 arrivalDelay: 0, 41 direction: 'Ringbahn S 42', 42 line: { 43 type: 'line', 44 id: 's42', 45 name: 'S42', 46 public: true, 47 mode: 'train', 48 product: 'suburban', 49 operator: { /* … */ }, 50 // … 51 }, 52 cycle: { min: 300, max: 300 } 53 } ], 54 refreshToken: '…' 55}
Check hafas-client
's related projects.
If you have a question, found a bug or want to propose a feature, have a look at the issues page.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/24 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More