1
2
3
4
5
6
7
8
9
import process from "node:process";
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
// e.g. https://www.sfmta.com/stops/carl-st-stanyan-st-13915
export const getMuniStopInfo = (stopCode) => {
return fetchJSON(
`https://api.511.org/transit/StopMonitoring?api_key=${process.env.transitApiKey}&agency=SF&stopCode=${stopCode}`,
);
};