1.0.0 • Published 8 years ago
db-fahrplan
Licence
MIT
Version
1.0.0
Deps
1
Size
20 kB
Vulns
24
Weekly
0
DeprecatedThis package is deprecated
Classes
DBTypedefs
Result :Object
DB
Kind: global class
Version: 1.0
Author: Tom Sacher
License: MIT
new DB(bearer, sandbox)
| Param | Type | Description |
|---|---|---|
| bearer | String |
The Bearer Token for the API |
| sandbox | Boolean |
If 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
| Param | Type | Description |
|---|---|---|
| name | String |
Name 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
| Param | Type | Description |
|---|---|---|
| id | String |
Id of location. Use attribute 'id' from the result of 'location' |
| date | String |
Date and time in ISO-8601 format, yyyy-mm-ddThhss, 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
| Param | Type | Description |
|---|---|---|
| id | String |
Id of location. Use attribute 'id' from the result of 'location' |
| date | String |
Date and time in ISO-8601 format, yyyy-mm-ddThhss, 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
| Param | Type | Description |
|---|---|---|
| id | String |
Id of a journey. Use attribute 'detailsId' from the result of 'arrivalBoard' or 'departureBoard' |
Result : Object
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| Status | Number |
HTTP Status Code |
| Result | Object |
Data from Server |