-
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.
Added ability to use Reference Data Endpoint calls with a Staff token
- Loading branch information
1 parent
e76b2c8
commit 90f91b8
Showing
5 changed files
with
38 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# ldbs-json changelog | ||
|
||
## 1.1.0 (Dec 2019) | ||
Updated to allow for access to Staff Reference Data Endpoint calls | ||
|
||
## 1.0.0 (Nov 2019) | ||
Initial release |
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,19 @@ | ||
/** | ||
* Simple example code for running the staff version of the DepartureBoard Info to access one of the Reference Data Enpoint API calls "GetStationList" | ||
* 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 ={ | ||
currentVersion: '' | ||
}; | ||
|
||
// create a staff version of the API | ||
const api = new LiveDepartureBoardService(token, true); | ||
|
||
// make sure we set userRef to true | ||
api.call("GetStationList", options, true).then(list => { | ||
console.log(list); | ||
}); |
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