https://github.com/juliuste/bilkom
Client for the polish Bilkom (PKP) railway API.
https://github.com/juliuste/bilkom
library public-transport railway
Last synced: 6 months ago
JSON representation
Client for the polish Bilkom (PKP) railway API.
- Host: GitHub
- URL: https://github.com/juliuste/bilkom
- Owner: juliuste
- License: isc
- Archived: true
- Created: 2018-04-06T17:11:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-06-01T07:38:39.000Z (over 5 years ago)
- Last Synced: 2025-04-06T19:22:10.780Z (6 months ago)
- Topics: library, public-transport, railway
- Language: JavaScript
- Size: 101 KB
- Stars: 29
- Watchers: 5
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# bilkom
JavaScript client and scraper for the [bilkom](https://bilkom.pl) PKP railway API\*. Complies with the [friendly public transport format](https://github.com/public-transport/friendly-public-transport-format). Inofficial, using *bilkom* endpoints. Ask them for permission before using this module in production. *Work in progress.*
\*Some methods query an API, some other methods scrape data from the website.
[](https://www.npmjs.com/package/bilkom)
[](https://travis-ci.org/juliuste/bilkom)
[](https://greenkeeper.io/)
[](https://david-dm.org/juliuste/bilkom)
[](LICENSE)
[](https://fptf.badges.juliustens.eu/link/juliuste/bilkom)
[](https://gitter.im/juliuste)## Installation
```shell
npm install --save bilkom
```## Usage
```javascript
const bilkom = require('bilkom')
```This package contains data in the [*Friendly Public Transport Format*](https://github.com/public-transport/friendly-public-transport-format) and provides the following methods:
- [`stations(opt)`](docs/stations.md) to get a list of operated stations (or search for a specific query), such as `Warszawa Centralna` or `Gdańsk Główny`. (Only stations in Poland.)
- [`journeys(origin, destination, date, opt)`](docs/journeys.md) to get routes between stations.
- [`departures(station, date)`](docs/departures.md) to get departures at a given station.
- [`journeyLeg(ref, product, lineId)`](docs/journeyLeg.md) to get details for a specific journey leg returned by `journeys` or `departures`.## Similar Projects
- [pkp-ic](https://github.com/juliuste/pkp-ic/) - Client for the PKP Intercity API (older, doesn't have prices)
- [koleo](https://github.com/juliuste/koleo/) - Client for the Koleo API (inofficial)
- [meinfernbus](https://github.com/juliuste/meinfernbus/) – Client for the Flixbus/Meinfernbus API
- [db-hafas](https://github.com/derhuerst/db-hafas/) - Client for the german railways (DB) API
- [db-prices](https://github.com/juliuste/db-prices/) - Client for the german railways (DB) price API## Contributing
If you found a bug, want to propose a feature or feel the urge to complain about your life, feel free to visit [the issues page](https://github.com/juliuste/bilkom/issues).