-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated to get DisruptionLists working
- Loading branch information
1 parent
9f1dc38
commit 5a80a90
Showing
4 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Simple example code for running the staff version to access the DisruptionList | ||
* NB: You will need a valid Token to access the SV version of the api | ||
*/ | ||
const settings = require('../settings.json'); | ||
const LiveDepartureBoardService = require('../index'); | ||
|
||
// Set up the options for the call (Not the CRS list should be CRSList NOT crsList as in OpenLDBSVWS docs) | ||
const options ={ | ||
CRSList: ["KGX", "LET"] | ||
}; | ||
|
||
// create a staff version of the API | ||
const api = new LiveDepartureBoardService(settings.tokens.staff, true); | ||
|
||
// make sure we set userRef to true | ||
api.call("GetDisruptionList", options, false) | ||
.then(list => { | ||
console.log(list); | ||
}) | ||
.catch(error => console.error(error)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "ldbs-json", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"engines": { | ||
"node": ">=7.6" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters