Skip to content

Commit 355a666

Browse files
More Documentation Improvements (#2)
1 parent b3a2948 commit 355a666

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/api.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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()

types/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)