-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #552 from LACMTA/dev
Update documentation and config
- Loading branch information
Showing
9 changed files
with
101 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Documentation Site | ||
|
||
Changes to the documentation site, when merged into the `dev` or `main` branches will automatically be copied to the `gh-pages` branch through GitHub Actions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,13 +75,3 @@ To receive real-time updates about vehicles and trips, connect to our WebSocket | |
|
||
- **Issue: The schedule seems outdated.** Solution: Ensure you're accessing the real-time data endpoints for the most current information. | ||
- **Issue: Can't find my route.** Solution: Double-check the route code or use the `/{agency_id}/routes` endpoint to search for all available routes. | ||
|
||
## Support and Contact Information | ||
|
||
For further assistance or to provide feedback, please contact our customer support team: | ||
|
||
- **Email:** [email protected] | ||
- **Phone:** 1-800-LA-METRO | ||
- **Live Chat:** Available on our web application during business hours. | ||
|
||
We're here to help make your Los Angeles Metro experience as smooth and enjoyable as possible. Start exploring today and take the hassle out of public transit! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Websockets | ||
|
||
The API has one WebSocket endpoint used to provide a stream of realtime data. The URL is in this format: | ||
|
||
``` | ||
wss://api.metro.net/ws/{agency_id}/{endpoint}/{route_codes (optional)} | ||
``` | ||
|
||
## Parameters | ||
|
||
__agency_id (str)__ | ||
|
||
The agencyID is found in the GTFS-schedule `agency.txt` files. | ||
|
||
Values: | ||
- `LACMTA` (Metro Bus) | ||
- `LACMTA_Rail` (Metro Rail) | ||
|
||
__endpoint (str)__ | ||
|
||
The type of GTFS-realtime data to send. | ||
|
||
Values: | ||
- `vehicle_positions` | ||
- `trip_updates` | ||
|
||
__route_codes (str, optional)__ | ||
|
||
A comma-separated list of route codes to filter updates. If not provided, updates for all routes are sent. | ||
|
||
Route codes are the definitive labels for each of the lines, minus HASTUS version numbers and separated from their "sister" lines. | ||
|
||
## Response | ||
|
||
The WebSocket endpoint sends updates every 3 seconds. | ||
|
||
### Success | ||
|
||
The WebSocket endpoint sends updates in the following format: | ||
|
||
{ | ||
"id": "vehicle_id", | ||
"vehicle": { | ||
"trip": { | ||
"route_id": "route_code", | ||
... | ||
}, | ||
... | ||
}, | ||
"route_code": "route_code", | ||
... | ||
} | ||
|
||
Each message from the WebSocket contains data for a single vehicle. | ||
|
||
### Error | ||
|
||
If an error occurs while processing updates, the WebSocket endpoint sends an error message in the following format: | ||
|
||
"Error: error_message" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters