Get bus route from CTA Bus Tracker API, take the user input of what bus they are on and then send a get request to the CTA Bus Tracker API to get the bus route
GET:
1. get CTA routes
endpoint URL: /api/cta-routesdescription: return an array of CTA route numbers
request
optional URL parameters
param
description
example
loc
GPS coordinates
41.78868316205326, -87.59874232864101
an example of a request with specifc params set might be:
/api/cta-routes?loc=121.121029,23.1029381208
the request above will return an array of route numbers close to the specified location
response
returns an Array of CTA route numbers, example
[
172,
132,
45
]
2. near a stop
endpoint URL: /api/cta-near-stopdescription: return an array of stops
Get bus route from CTA Bus Tracker API, take the user input of what bus they are on and then send a get request to the CTA Bus Tracker API to get the bus route
GET:
1. get CTA routes
endpoint URL:
/api/cta-routes
description: return an array of CTA route numbersrequest optional URL parameters
an example of a request with specifc params set might be:
the request above will return an array of route numbers close to the specified location
response returns an Array of CTA route numbers, example
2. near a stop
endpoint URL:
/api/cta-near-stop
description: return an array of stopsrequest REQUIRED parameters
for example:
3. distance from bus
endpoint URL:
/api/cta-bus-distance
description: return an a bus object (which includes, distance from the user and other bus info)request REQUIRED parameters
for example