File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 * @param {string } auth Authentication to use for the request
44 * @returns {Route[] } list of all active routes
55 */
6- export async function getBaseData ( auth : string ) {
6+ export async function getRoutes ( auth : string ) {
77 var res = await fetch ( `https://ridebtd.org/Services/JSONPRelay.svc/GetRoutesForMapWithScheduleWithEncodedLine?apiKey=${ auth } &isDispatch=false` )
88
99 return await res . json ( )
@@ -14,7 +14,7 @@ export async function getBaseData(auth: string) {
1414 * @param {string } auth authentication to use for the request
1515 * @returns {Vehicle[] } list of all locations for buses that are active
1616*/
17- export async function getVehicleLocations ( auth : string ) {
17+ export async function getMapVehicles ( auth : string ) {
1818 var res = await fetch ( `https://ridebtd.org/Services/JSONPRelay.svc/GetMapVehiclePoints?apiKey=${ auth } &isPublicMap=true` )
1919
2020 return await res . json ( )
@@ -26,7 +26,7 @@ export async function getVehicleLocations(auth: string) {
2626 * @param {string } auth authentication to use for the request
2727 * @returns {RouteStop[] } list of stop times for the given routes
2828*/
29- export async function getNextStopTimes ( routes : string [ ] , auth : string ) {
29+ export async function getStopArrivalTimes ( routes : string [ ] , auth : string ) {
3030 var res = await fetch ( `https://ridebtd.org/Services/JSONPRelay.svc/GetStopArrivalTimes?apiKey=${ auth } &routeIds=${ routes . join ( "," ) } &version=2` )
3131
3232 return await res . json ( )
Original file line number Diff line number Diff line change @@ -127,22 +127,22 @@ declare module 'brazos-transit-api' {
127127 * @param {string } auth Authentication to use for the request
128128 * @returns {Route[] } list of all active routes
129129 */
130- export async function getBaseData ( auth : string ) : Promise < Route [ ] >
130+ export async function getRoutes ( auth : string ) : Promise < Route [ ] >
131131
132132 /**
133133 * get a list of all locations for all buses that are active
134134 * @param {string } auth authentication to use for the request
135- * @returns {Vehicle[] } list of all locations for buses that are active
135+ * @returns {Vehicle[] } list of all buses that are active
136136 */
137- export async function getVehicleLocations ( auth : string ) : Promise < Vehicle [ ] >
137+ export async function getMapVehicles ( auth : string ) : Promise < Vehicle [ ] >
138138
139139 /**
140140 * get the next stop times for a given route(s)
141141 * @param {string[] } routes route ids to get stop times for
142142 * @param {string } auth authentication to use for the request
143143 * @returns {RouteStop[] } list of stop times for the given routes
144144 */
145- export async function getNextStopTimes ( routes : string [ ] , auth : string ) : Promise < RouteStop [ ] >
145+ export async function getStopArrivalTimes ( routes : string [ ] , auth : string ) : Promise < RouteStop [ ] >
146146
147147
148148
You can’t perform that action at this time.
0 commit comments