1.0.0 • Published 6 years ago

db-fahrplan v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Classes

Typedefs

DB

Kind: global class
Version: 1.0
Author: Tom Sacher
License: MIT

new DB(bearer, sandbox)

ParamTypeDescription
bearerStringThe Bearer Token for the API
sandboxBooleanIf true, the module will use http instead of https

DB.getLocation(name) ⇒ Result

Get information about locations matching the given name or name fragment

Kind: instance method of DB
Returns: Result - Result or Error

ParamTypeDescription
nameStringName or name fragment of a location

DB.getArrivalBoard(id, date) ⇒ Result

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

Kind: instance method of DB
Returns: Result - Result or Error

ParamTypeDescription
idStringId of location. Use attribute 'id' from the result of 'location'
dateStringDate and time in ISO-8601 format, yyyy-mm-ddThh:mm:ss, example: 2017-04-01 or 2017-04-01T10:30

DB.getDepartureBoard(id, date) ⇒ Result

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

Kind: instance method of DB
Returns: Result - Result or Error

ParamTypeDescription
idStringId of location. Use attribute 'id' from the result of 'location'
dateStringDate and time in ISO-8601 format, yyyy-mm-ddThh:mm:ss, example: 2017-04-01 or 2017-04-01T10:30

DB.getJourneyDetails(id) ⇒ Result

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

Kind: instance method of DB
Returns: Result - Result or Error

ParamTypeDescription
idStringId of a journey. Use attribute 'detailsId' from the result of 'arrivalBoard' or 'departureBoard'

Result : Object

Kind: global typedef
Properties

NameTypeDescription
StatusNumberHTTP Status Code
ResultObjectData from Server