Package Exports
- railcartables
- railcartables/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (railcartables) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
RailcarTables for Node.js
The RailcarTables Node library provides convenient access to the RailcarTables API from applications written in server-side JavaScript.
Requirements
Node 8, 10 or higher.
Installation
Install the package with:
npm install railcartables --save
# or
yarn add railcartablesUsage
The package needs to be configured with your account's API key, which is available in the RailcarTables Dashboard.
Using async/await:
import RailcarTables from "railcartables";
(async () => {
const RCT = new RailcarTables("YOUR_API_KEY", 1);
const gaugeOutage = await RCT.getOutage({
reportingMark: "TILX",
carNumber: "350123",
levelInInches: 85
});
console.log(gaugeOutage);
})();