Comparing version 3.0.5 to 3.0.6
@@ -0,0 +0,0 @@ import * as AmtrakerTypes from "./types"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -8,4 +8,5 @@ export interface Train { | ||
trainTimely: string; | ||
iconColor: string; | ||
stations: Station[]; | ||
heading: Heading; | ||
heading: string; | ||
eventCode: string; | ||
@@ -20,3 +21,3 @@ eventTZ: string[]; | ||
destName: string; | ||
trainState: TrainState; | ||
trainState: string; | ||
velocity: number; | ||
@@ -54,3 +55,3 @@ statusMsg: string; | ||
depCmnt: string; | ||
status: StationStatus; | ||
status: string; | ||
} | ||
@@ -57,0 +58,0 @@ export interface StationMeta { |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "amtrak", | ||
"version": "3.0.5", | ||
"version": "3.0.6", | ||
"description": "A simple and easy way to parse data from Amtrak's train tracking API.", | ||
@@ -14,3 +14,3 @@ "main": "dist/index.js", | ||
"homepage": "https://github.com/piemadd/amtrak", | ||
"bin": "./cli/cli.js", | ||
"bin": "./cli/cli.mjs", | ||
"keywords": [ | ||
@@ -35,4 +35,6 @@ "amtrak", | ||
"axios": "^1.3.3", | ||
"colors": "^1.4.0", | ||
"enquirer": "^2.3.6", | ||
"nodemon": "^2.0.20" | ||
} | ||
} |
@@ -19,3 +19,3 @@ # Amtrak.js | ||
While v3 code syntax is the same, the resulting types are different, please | ||
check the [docs](#docs) section for more information. | ||
check the [docs](#functions) section for more information. | ||
@@ -36,2 +36,10 @@ ## Installation | ||
## CLI Usage | ||
Not complete, check back later. | ||
## oEmbed | ||
The Amtraker oEmbed endpoint is [https://api.amtraker.com/v3/oembed](https://api.amtraker.com/v3/oembed), following the standard [oEmbed Spec](https://oembed.com/). | ||
## Functions | ||
@@ -183,7 +191,8 @@ | ||
routeName: string; // Name of the train route | ||
trainNum: number; // Train number | ||
trainNum: string; // Train number | ||
trainID: string; // Train ID | ||
lat: number; // Latitude of the train | ||
lon: number; // Longitude of the train | ||
trainTimely: string; // On time/early/late status of the train in plain english | ||
trainTimely: string; // Deprecated | ||
iconColor: string; // Calculated icon color for the frontend | ||
stations: Station[]; // List of stations the train has and will pass through | ||
@@ -207,2 +216,3 @@ heading: string; // Direction the train is heading in the 8 cardinal directions | ||
objectID: number; // ID of the train data in Amtrak's DB | ||
provider: string; // The provider of this train, either "Amtrak" or "Via" | ||
} | ||
@@ -218,3 +228,3 @@ ``` | ||
tz: string; // Timezone of the station | ||
bus: boolean; // Whether or not the station is a bus stop, always false | ||
bus: boolean; // Whether or not the station is a bus stop | ||
schArr: string; // Scheduled arrival time | ||
@@ -224,4 +234,5 @@ schDep: string; // Scheduled departure time | ||
dep: string; // Actual departure time | ||
arrCmnt: string; // Arrival timeliness comment | ||
depCmnt: string; // Departure timeliness comment | ||
arrCmnt: string; // Deprecated | ||
depCmnt: string; // Deprecated | ||
platform: string; // Platform name/number, if available | ||
status: string; // One of "Enroute", "Station", "Departed", or "Unknown" | ||
@@ -240,2 +251,3 @@ } | ||
lon: number; // Longitude of the station | ||
hasAddress: boolean; // Whether or not the station has address data. Usually true for Amtrak, usually false for Via Rail. | ||
address1: string; // Address line 1 of the station | ||
@@ -242,0 +254,0 @@ address2: string; // Address line 2 of the station, *usually* empty |
@@ -0,0 +0,0 @@ import * as AmtrakerTypes from "./types"; |
@@ -8,2 +8,3 @@ export interface Train { | ||
trainTimely: string; | ||
iconColor: string; | ||
stations: Station[]; | ||
@@ -10,0 +11,0 @@ heading: string; |
@@ -0,0 +0,0 @@ { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
65216
16
445
299
4
+ Addedcolors@^1.4.0
+ Addedenquirer@^2.3.6
+ Addedansi-colors@4.1.3(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedcolors@1.4.0(transitive)
+ Addedenquirer@2.4.1(transitive)
+ Addedstrip-ansi@6.0.1(transitive)