# CTABusTrackerPlugin

Shows estimated arrival times for a given route+stop+direction

Times are updated at least every 2 minutes

## REST API

### Get the CTA Bus Tracker related configuration.

    GET {{ORIGIN}}/rest/api/v1/display/uid/<PLUGIN-UID>/ctabus

    GET {{ORIGIN}}/rest/api/v1/display/alias/<PLUGIN-ALIAS>/ctabus

- PLUGIN-UID: The plugin unique id.
- PLUGIN-ALIAS: The plugin alias name.

### Set OpenWeather related configuration.

### (You probably dont want to do this as you'd have to look up the params via the API manually)

    POST {{ORIGIN}}/rest/api/v1/display/uid/<PLUGIN-UID>/ctabus?apiKey=<API-KEY>&rte=<ROUTE>&dir=<DIRECTION>&stpid=<STOP_ID>&orig=<ORIGIN>&dest=<DESTINATION>&two=<TWO_TIMES>

    POST {{ORIGIN}}/rest/api/v1/display/alias/<PLUGIN-ALIAS>/ctabus?apiKey=<API-KEY>&rte=<ROUTE>&dir=<DIRECTION>&stpid=<STOP_ID>&orig=<ORIGIN>&dest=<DESTINATION>&two=<TWO_TIMES>

- PLUGIN-UID: The plugin unique id.
- PLUGIN-ALIAS: The plugin alias name.
- API-KEY: The CTA Bus Tracker api key. (required)
- ROUTE: The bus route ID (such as 81, 151, X49) (required)
- DIRECTION: Direction of route (Northbound, Southbound...must be exactly as CTA expects, validate against API) (required)
- STOP_ID: Bus stop ID (CTA internal ID, validate against API) (required)
- ORIGIN: Whether to append origin (selected) station to route info (optional, default false)
- DESTINATION: Whether to append destination to route info (optional, default true)
- TWO_TIMES: Whether to show one (default) or two upcoming arrivals (if provided) (optional, default false)

### Configuration

Plugin UID:
API Key:
Route:
Stop:
Direction:
Show origin:
Show destination:
Show two arrivals: