All Projects → juliuste → interrail

juliuste / interrail

Licence: ISC license
Find european train stations and routes. Client for the European Interrail / EuRail API.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to interrail

oebb
Austrian Federal Railways (ÖBB) API client.
Stars: ✭ 40 (+66.67%)
Mutual labels:  railway, public-transport
db-prices
Find journey prices using the DB Sparpreise API.
Stars: ✭ 82 (+241.67%)
Mutual labels:  railway, public-transport
comboios
Comboios de Portugal (CP, Portugese Railways) API client.
Stars: ✭ 32 (+33.33%)
Mutual labels:  railway, public-transport
korail
Client for the South Korean korail railway API.
Stars: ✭ 47 (+95.83%)
Mutual labels:  railway, public-transport
otp-tutorial
Introductory tutorial (approx. 3 hours) covering the setup and querying of an OpenTripPlanner instance
Stars: ✭ 85 (+254.17%)
Mutual labels:  public-transport
dm tomatrixled
Display (real-time) public transport departures using Raspberry Pi and LED matrices
Stars: ✭ 17 (-29.17%)
Mutual labels:  public-transport
LuasataGlance
Android Wear and mobile app providing real-time tram stop information for Dublin's Luas light rail service.
Stars: ✭ 21 (-12.5%)
Mutual labels:  public-transport
transport-apis
machine-readable list of transport API endpoints
Stars: ✭ 32 (+33.33%)
Mutual labels:  public-transport
grafikon
Timetables for model railway. Useful for meets with modules (like FREMO, Free-mo etc).
Stars: ✭ 19 (-20.83%)
Mutual labels:  railway
gtfs-utils
Utilities to process GTFS data sets.
Stars: ✭ 19 (-20.83%)
Mutual labels:  public-transport
github client
Open source bot telegram menggunakan bahasa code dart
Stars: ✭ 24 (+0%)
Mutual labels:  railway
waline
💬 A Simple, Safe Comment System
Stars: ✭ 1,145 (+4670.83%)
Mutual labels:  railway
ideas
How to make public transport more comfortable, more accessible, more transparent?
Stars: ✭ 35 (+45.83%)
Mutual labels:  public-transport
osrd
Open Source Railway Designer
Stars: ✭ 54 (+125%)
Mutual labels:  railway
raptor
Implementation of the Route Based Public Transit Algorithm (Raptor)
Stars: ✭ 64 (+166.67%)
Mutual labels:  public-transport
vrnbus
Прогноз прибытия автобусов в Воронеже. Веб-версия: https://vrnbus.herokuapp.com Телеграм-бот: https://t.me/vrnbusbot
Stars: ✭ 39 (+62.5%)
Mutual labels:  public-transport
cli
Railway CLI
Stars: ✭ 167 (+595.83%)
Mutual labels:  railway
realtime-transport-dashboards
Serverless APIs for AWS to build and display public transports real time data (Serverless application example)
Stars: ✭ 23 (-4.17%)
Mutual labels:  public-transport
Next-Station-iOS
Source code of Next Station iOS app, available on App Store for downloading.
Stars: ✭ 15 (-37.5%)
Mutual labels:  railway
Railroad and Obstacle detection
This program detect and identify obstacle on railway. If program detect some obstacle that train must stop, program gives you warning sign. This program Also estimate riskiness of obstacle how it is negligible or not. We provide many models to you to detect railways and obstacles.
Stars: ✭ 14 (-41.67%)
Mutual labels:  railway

interrail

Find european train stations and journeys. Client for the European Interrail / EuRail API. Inofficial, using endpoints by Interrail/EuRail. Ask them for permission before using this module in production.

This module conforms to the FPTI-JS 0.3.2 standard for JavaScript public transportation modules.

npm version Build Status license fpti-js version chat on gitter

Installation

npm install interrail

Usage

const interrail = require('interrail')

The interrail module conforms to the FPTI-JS 0.3.2 standard for JavaScript public transportation modules and exposes the following methods:

Method Feature description FPTI-JS 0.3.2
stations.search(query, [opt]) Search stations by query. yes
journeys(origin, destination, [opt]) Journeys between stations yes

stations.search(query, [opt])

Search stations by query. See this method in the FPTI-JS 0.3.2 spec.

Supported Options

Attribute Description FPTI-spec Value type Default
results Max. number of results returned Number null

Example

interrail.stations.search('Ljubl', { results: 1 }).then()
[
	{
		"type": "station",
		"id": "7942300",
		"name": "LJUBLJANA (Slovenia)",
		"location": {
			"type": "location",
			"longitude": 14.51028,
			"latitude": 46.058057
		},
		"weight": 12185,
		"products": 28
	}
]

journeys(origin, destination, [opt])

Find journeys between stations. See this method in the FPTI-JS 0.3.2 spec.

Supported Options

Attribute Description FPTI-spec Value type Default
when Journey date, synonym to departureAfter Date new Date()
departureAfter List journeys with a departure (first leg) after this date Date new Date()
results Max. number of results returned Number null
interval Results for how many minutes after when/departureAfter Number null
transfers Max. number of transfers Number null
language Language of the results ISO 639-1 code null

Example

const berlin = '8065969' // station id
const ljubljana = { // FPTF station
	type: 'station',
	id: '7942300',
	name: 'Ljubljana'
	// …
}

interrail.journeys(berlin, ljubljana, { when: new Date('2018-11-02T05:00:00+0200') }).then()
[
	{
		"id": "8065969-2018-11-02t06-37-00…",
		"legs": [
			{
				"arrival": "2018-11-02T06:54:00+01:00",
				"departure": "2018-11-02T06:37:00+01:00",
				"destination": {
					"id": "8003025",
					"location": {
						"latitude": 52.534722,
						"longitude": 13.196947,
						"type": "location"
					},
					"name": "BERLIN-SPANDAU (Germany)",
					"type": "station"
				},
				"id": "8065969-2018-11-02t06-37-00-01-00-8003025-2018-11-02t06-54-00-01-00-rb-18604",
				"line": {
					"id": "rb-18604",
					"mode": "train",
					"name": "RB 18604",
					"public": true,
					"type": "line"
				},
				"mode": "train",
				"operator": "interrail",
				"origin": {
					"id": "8065969",
					"location": {
						"latitude": 52.525553,
						"longitude": 13.369441,
						"type": "location"
					},
					"name": "BERLIN HBF (Germany)",
					"type": "station"
				},
				"public": true
			}
			// …
			{
				"arrival": "2018-11-02T18:32:00+01:00",
				"departure": "2018-11-02T12:17:00+01:00",
				"destination": {
					"id": "7942300",
					"location": {
						"latitude": 46.058057,
						"longitude": 14.51028,
						"type": "location"
					},
					"name": "LJUBLJANA (Slovenia)",
					"type": "station"
				},
				"id": "8020347-2018-11-02t12-17-00-01-00-7942300-2018-11-02t18-32-00-01-00-ec-113",
				"line": {
					"id": "ec-113",
					"mode": "train",
					"name": "EC   113",
					"public": true,
					"type": "line"
				},
				"mode": "train",
				"operator": "interrail",
				"origin": {
					"id": "8020347",
					"location": {
						"latitude": 48.140274,
						"longitude": 11.55833,
						"type": "location"
					},
					"name": "MUENCHEN HBF (Germany)",
					"type": "station"
				},
				"public": true
			}
		],
		"type": "journey"
	}
	// …
]

Contributing

If you found a bug or want to propose a feature, feel free to visit the issues page.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].