A PHP SDK implentation for the Trimet API.
Report Bug · Request Feature
This project is a PHP SDK implementation for the Trimet API for the Portland, Oregon public transit system. For a detailed view of the types of data that is returned from the Trimet API, check out the various model classes.
- PHP 8
- Guzzle 7
- Symfony Serializer
Add via composer.
Register your application with the Trimet API in order to get an API key. Using that key, create a new API class instance to make calls.
$class = new TriMet\API('API_KEY');
$alerts = $class->getAlerts();
$arrivals = $class->getArrivals(8344); // StopID.
$arrivalsByDate = $class->getArrivalsByDateRange(8344, 1600687190001);
$stops = $class->getStops(45.5376176, -122.624067); // latitude and longitude.
Accepting pull requests if you want to add features.
Distributed under the MIT License. See LICENSE
for more information.