New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

amtrak

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amtrak - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

2

package.json
{
"name": "amtrak",
"version": "3.0.2",
"version": "3.0.3",
"description": "A simple and easy way to parse data from Amtrak's train tracking API.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -5,19 +5,28 @@ import * as AmtrakerTypes from "./types";

const fetchTrain = async (trainId: string) => {
return axios.get(`https://api-v3.amtraker.com/v3/trains/${trainId}`);
const res = await axios.get(
`https://api-v3.amtraker.com/v3/trains/${trainId}`
);
return res.data as AmtrakerTypes.TrainResponse;
};
const fetchAllTrains = async () => {
return axios.get("https://api-v3.amtraker.com/v3/trains");
const res = await axios.get("https://api-v3.amtraker.com/v3/trains");
return res.data as AmtrakerTypes.TrainResponse;
};
const fetchStation = async (stationId: string) => {
return axios.get(`https://api-v3.amtraker.com/v3/stations/${stationId}`);
const res = await axios.get(
`https://api-v3.amtraker.com/v3/stations/${stationId}`
);
return res.data as AmtrakerTypes.StationResponse;
};
const fetchAllStations = async () => {
return axios.get("https://api-v3.amtraker.com/v3/stations");
const res = await axios.get("https://api-v3.amtraker.com/v3/stations");
return res.data as AmtrakerTypes.StationResponse;
};
const fetchStaleStatus = async () => {
return axios.get("https://api-v3.amtraker.com/v3/stale");
const res = await axios.get("https://api-v3.amtraker.com/v3/stale");
return res.data as AmtrakerTypes.StaleData;
};

@@ -24,0 +33,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc