6.0.0 • Published 5 years ago

@datafire/deutschebahn_fahrplan v6.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@datafire/deutschebahn_fahrplan

Client library for Fahrplan-Free

Installation and Usage

npm install --save @datafire/deutschebahn_fahrplan
let deutschebahn_fahrplan = require('@datafire/deutschebahn_fahrplan').create();

.then(data => {
  console.log(data);
});

Description

A RESTful webservice to request a railway journey - FREE plan with restricted access (max. 10 requests per minute). Please ignore the message in the API Console about the access token.

Register to use an less restricted version, which requires an access token.

Actions

arrivalBoard.id.get

Get arrival board at a given location at a given daten and time.

deutschebahn_fahrplan.arrivalBoard.id.get({
  "id": "",
  "date": ""
}, context)

Input

  • input object
    • id required string: Id of location. Use attribute 'id' from the result of 'location'
    • date required string: Date and time in ISO-8601 format, yyyy-mm-ddThh:mm:ss, example: 2017-04-01 or 2017-04-01T10:30

Output

departureBoard.id.get

Get departure board at a given location at a given daten and time.

deutschebahn_fahrplan.departureBoard.id.get({
  "id": "",
  "date": ""
}, context)

Input

  • input object
    • id required string: Id of a location. Use attribute 'id' from the result of 'location'
    • date required string: Date and time in ISO-8601 format, yyyy-mm-ddThh:mm:ss, example: 2017-04-01 or 2017-04-01T10:30

Output

journeyDetails.id.get

Retrieve details of a journey. The id of journey should come from an arrival board or a departure board.

deutschebahn_fahrplan.journeyDetails.id.get({
  "id": ""
}, context)

Input

  • input object
    • id required string: Id of a journey. Use attribute 'detailsId' from the result of 'arrivalBoard' or 'departureBoard'

Output

location.name.get

Get information about locations matching the given name or name fragment

deutschebahn_fahrplan.location.name.get({
  "name": ""
}, context)

Input

  • input object
    • name required string: Name or name fragment of a location

Output

Definitions

Board

  • Board object
    • boardId required string
    • dateTime required string
    • detailsId required string
    • name required string: Name of train
    • origin required string
    • stopId required string
    • stopName required string
    • track required string
    • type required string

BoardResponse

  • BoardResponse object
    • boards required array

ErrorModel

  • ErrorModel object
    • code required integer
    • internal_code integer
    • internal_message string
    • message required string

JourneyResponse

  • JourneyResponse object

Location

  • Location object
    • id required string: id of location (eva-number), example: 8000105
    • lat required number: latitude, example: 50.107149
    • lon required number: longitude, example: 8.663785
    • name required string: Name of location, example: Frankfurt(Main)Hbf

LocationResponse

  • LocationResponse object

TrainLocation

  • TrainLocation object
    • arrTime required string
    • depTime required string
    • lat required number
    • lon required number
    • operator required string
    • stopId required string
    • stopName required string
    • train required string
    • type required string
6.0.0

5 years ago

5.0.0

7 years ago

4.0.0

7 years ago

3.0.0

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago