Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/derhuerst/hafas-find-departures-duration-limit
Find the duration limit of a HAFAS endpoint's departures method.
https://github.com/derhuerst/hafas-find-departures-duration-limit
Last synced: 6 days ago
JSON representation
Find the duration limit of a HAFAS endpoint's departures method.
- Host: GitHub
- URL: https://github.com/derhuerst/hafas-find-departures-duration-limit
- Owner: derhuerst
- License: isc
- Created: 2020-07-30T18:54:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-19T15:04:09.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T09:36:02.296Z (15 days ago)
- Language: JavaScript
- Homepage: https://github.com/derhuerst/hafas-find-departures-duration-limit#hafas-find-departures-duration-limit
- Size: 14.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# hafas-find-departures-duration-limit
**Find the duration limit of a HAFAS endpoint's departures method.**
[![npm version](https://img.shields.io/npm/v/hafas-find-departures-duration-limit.svg)](https://www.npmjs.com/package/hafas-find-departures-duration-limit)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/hafas-find-departures-duration-limit.svg)
![minimum Node.js version](https://img.shields.io/node/v/hafas-find-departures-duration-limit.svg)
[![support me via GitHub Sponsors](https://img.shields.io/badge/support%20me-donate-fa7664.svg)](https://github.com/sponsors/derhuerst)
[![chat with me on Twitter](https://img.shields.io/badge/chat%20with%20me-on%20Twitter-1da1f2.svg)](https://twitter.com/derhuerst)Given a [`hafas-client@5`](https://github.com/public-transport/hafas-client/tree/5)-compatible HAFAS client and a stop/station ID, `hafas-find-departures-duration-limit` tries to find the largest duration that the HAFAS endpoint can return departures/arrivals for.
## Installation
```shell
npm install hafas-find-departures-duration-limit
```## Usage
```js
const createHafasClient = require('hafas-client')
const bvgProfile = require('hafas-client/p/bvg')
const findDurLimit = require('hafas-find-departures-duration-limit')const mehringdamm = '900000017101'
const hafas = createHafasClient(
bvgProfile,
'hafas-find-departures-duration-limit example',
)await findDurLimit(hafas, mehringdamm) // 1920
```## Contributing
If you have a question or need support using `hafas-generate-gtfs`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, use [the issues page](https://github.com/derhuerst/hafas-generate-gtfs/issues).