-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrimet-llms.txt
More file actions
28 lines (22 loc) · 849 Bytes
/
trimet-llms.txt
File metadata and controls
28 lines (22 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# TriMet API Guide
Get an API key APP_ID: https://developer.trimet.org/appid/registration/
## Core Methods
### Get Arrivals by Stop ID
```javascript
// Returns arrivals for a specific stop
fetch(`https://developer.trimet.org/ws/V1/arrivals?locIDs=${stopId}&appID=${APP_ID}&json=true`)
.then(response => response.json())
```
### Get Route Information
```javascript
// Returns details for specific route(s)
fetch(`https://developer.trimet.org/ws/V1/routeConfig?routes=${routeId}&appID=${APP_ID}&json=true`)
.then(response => response.json())
```
### Find Stops by Location
```javascript
// Returns stops near coordinates (lat,lon)
fetch(`https://developer.trimet.org/ws/V1/stops?ll=${lat},${lon}&meters=500&appID=${APP_ID}&json=true`)
.then(response => response.json())
```
All endpoints support CORS with `Access-Control-Allow-Origin: *`