-
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 with new examples to test and validate PR
- Loading branch information
1 parent
52342e4
commit b6560b8
Showing
4 changed files
with
44 additions
and
1 deletion.
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,20 @@ | ||
/** | ||
* Simple example code for running the STAFF version of the DepartureBoard Info | ||
* NB: You will need a valid Token to access the SV version of the api | ||
*/ | ||
const LiveDepartureBoardService = require('../index'); | ||
const token = "0000-0000-0000-0000"; // put a valid token here | ||
|
||
|
||
// Set up the options for the call | ||
const options = { | ||
crs:"SVG", | ||
filterList: ["KGX"], | ||
time: "2020-04-14T08:30:00", | ||
timeWindow:120 | ||
}; | ||
|
||
const api = new LiveDepartureBoardService(token, true); | ||
api.call("GetNextDepartures", options).then(board => { | ||
console.log(board); | ||
}); |
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,20 @@ | ||
/** | ||
* Simple example code for running the user version of the DepartureBoard Info | ||
* NB: You will need a valid Token to access the SV version of the api | ||
*/ | ||
const LiveDepartureBoardService = require('../index'); | ||
const token = "0000-0000-0000-0000"; // put a valid token here | ||
|
||
// Set up the options for the call | ||
const options = { | ||
crs:"SVG", | ||
filterList: ["KGX"], | ||
time: "2020-04-14T08:30:00", | ||
timeWindow:120, | ||
timeOffset: 0 | ||
}; | ||
|
||
const api = new LiveDepartureBoardService(token, false); | ||
api.call("GetNextDepartures", options).then(board => { | ||
console.log(board); | ||
}); |
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.1.1", | ||
"version": "1.1.2", | ||
"engines": { | ||
"node": ">=7.6" | ||
}, | ||
|