11/**
22 * Get the currently active routes
33 * @param {string } auth Authentication to use for the request
4- * @returns {string [] } list of route names ("01", "04", etc.)
4+ * @returns {Route [] } list of all active routes
55 */
66export async function getBaseData ( auth : string ) {
77 var res = await fetch ( `https://ridebtd.org/Services/JSONPRelay.svc/GetRoutesForMapWithScheduleWithEncodedLine?apiKey=${ auth } &isDispatch=false` )
@@ -12,7 +12,7 @@ export async function getBaseData(auth: string) {
1212/**
1313 * get a list of all locations for all buses that are active
1414 * @param {string } auth authentication to use for the request
15- * @returns list of all locations for buses that are active
15+ * @returns { Vehicle[] } list of all locations for buses that are active
1616*/
1717export async function getVehicleLocations ( auth : string ) {
1818 var res = await fetch ( `https://ridebtd.org/Services/JSONPRelay.svc/GetMapVehiclePoints?apiKey=${ auth } &isPublicMap=true` )
@@ -24,7 +24,7 @@ export async function getVehicleLocations(auth: string) {
2424 * get the next stop times for a given route(s)
2525 * @param {string[] } routes route ids to get stop times for
2626 * @param {string } auth authentication to use for the request
27- * @returns list of stop times for the given routes
27+ * @returns { RouteStop[] } list of stop times for the given routes
2828*/
2929export async function getNextStopTimes ( routes : string [ ] , auth : string ) {
3030 var res = await fetch ( `https://ridebtd.org/Services/JSONPRelay.svc/GetStopArrivalTimes?apiKey=${ auth } &routeIds=${ routes . join ( "," ) } &version=2` )
@@ -34,7 +34,7 @@ export async function getNextStopTimes(routes: string[], auth: string) {
3434
3535/**
3636 * get the announcements for route changes
37- * @returns list of announcements
37+ * @returns { Announcement[] } list of announcements
3838*/
3939export async function getAnnouncements ( ) {
4040 var res = await fetch ( "https://ridebtd.org/Services/JSONPRelay.svc/GetTwitterJSON" )
0 commit comments