Transport
Swiss public transport API
File Explorer
Download Latest Version (.zip)- build.yml
- deploy.yml
- Address.php
- Location.php
- LocationQuery.php
- NearbyQuery.php
- Poi.php
- Station.php
- Connection.php
- ConnectionPageQuery.php
- ConnectionQuery.php
- Journey.php
- Prognosis.php
- Section.php
- Service.php
- StationBoardJourney.php
- StationBoardQuery.php
- Stop.php
- Walk.php
- Coordinate.php
- LocationFactory.php
- Query.php
- Transportations.php
- FieldsNormalizer.php
- ConnectionQueryParser.php
- LocationQueryParser.php
- API.php
- Application.php
- RateLimiting.php
- Statistics.php
- hafas_request_2012-01-31.xml
- hafas_request_2015-12-23.xml
- hafas_request_location.xml
- hafas_response_2012-01-16.xml
- hafas_response_2012-01-31.xml
- hafas_response_2012-07-27.xml
- hafas_response_2013-09-12.xml
- hafas_response_2013-12-21.xml
- hafas_response_2014-08-28.xml
- hafas_response_2015-12-23.xml
- hafas_response_2016-04-01.xml
- hafas_response_2016-06-17.xml
- hafas_response_2016-12-23.xml
- hafas_response_500.xml
- hafas_response_error.xml
- hafas_response_location.xml
- response_2012-01-31.json
- response_2015-12-23.json
- response_2016-12-23.json
- response_2017-06-20.json
- response_2021-11-01.json
- response_500.json
- response_error.json
- searchch_response_2016-12-23.json
- searchch_response_2017-06-20.json
- searchch_response_2021-11-01.json
- searchch_response_500.json
- searchch_response_error.json
- hafas_request.xml
- hafas_response.xml
- hafas_response_nearby.json
- hafas_response_nyon.json
- response.json
- response_nearby.json
- response_nyon.json
- searchch_response.json
- searchch_response_nearby.json
- searchch_response_nyon.json
- hafas_request_2012-02-13.xml
- hafas_request_2013-10-15.xml
- hafas_request_2015-12-23.xml
- hafas_request_2016-01-17.xml
- hafas_request_2016-01-19.xml
- hafas_request_2016-12-23.xml
- hafas_request_2017-01-12.xml
- hafas_request_location.xml
- hafas_response_2012-02-13.xml
- hafas_response_2012-02-20.xml
- hafas_response_2013-10-15.xml
- hafas_response_2015-12-23.xml
- hafas_response_2016-01-17.xml
- hafas_response_2016-01-19.xml
- hafas_response_2016-12-23.xml
- hafas_response_2017-01-12.xml
- hafas_response_location.xml
- response_2012-02-13.json
- response_2013-10-15.json
- response_2015-12-23.json
- response_2016-01-17.json
- response_2016-01-19.json
- response_2016-12-23.json
- response_2017-01-12.json
- searchch_response_2016-12-23.json
- swagger.json
- AddressTest.php
- PoiTest.php
- StationTest.php
- ConnectionDelayTest.php
- ConnectionTest.php
- StationBoardJourneyTest.php
- StopTest.php
- CoordinateTest.php
- LocationFactoryTest.php
- TransportationsTest.php
- FieldsNormalizerTest.php
- XmlComparator.php
- ConnectionsTest.php
- IntegrationTest.php
- LocationsTest.php
- StationBoardTest.php
- SwaggerTest.php
- bootstrap.php
- quick-connection.php
- quick-stationboard.php
- update-fixtures.php
- update-swagger.php
- .gitkeep
- .gitkeep
- stats.twig
- autocomplete.html
- connections.php
- index.html
- stationboard.html
- layout.css
- ahoi.png
- chunder.png
- davidsimon.png
- jungfraubahnen.png
- magicmirror.png
- noctambus.png
- ontime.png
- outlook-timetable.png
- pendler-check.png
- quickoev.png
- regionalps.png
- rhb.png
- s-bahn.png
- sbbscope.png
- swiss-public-transport.png
- takemehome.png
- tchat.png
- train-delay-bot.png
- traincation.png
- transitor.png
- trnsprt.png
- workflow-alfred.png
- .htaccess
- api.php
- docs.html
- favicon.ico
- index.html
- robots.txt
- showcase.html
- stats.php
- .gitattributes
- .gitignore
- .scrutinizer.yml
- .styleci.yml
- CHANGELOG.md
- composer.json
- composer.lock
- config.php.docker
- config.php.sample
- docker-cloud.yml
- docker-compose.yml
- Dockerfile
- hafasXMLInterface.xsd
- LICENSE
- phpunit.xml.dist
- README.md
# Installation Guide
1. Get the code
git clone https://github.com/OpendataCH/Transport
Downloads the entire project code from GitHub to your computer.
cd Transport
Moves into the project folder you just downloaded.
2. Official Install Script
Easy RecommendedPrerequisites
- APT (Debian/Ubuntu κ³μ΄) Built into Debian/Ubuntu-based Linux distributions.
sudo apt install php-xml
Installs directly from the APT package repository (Debian/Ubuntu-based).
After installing, open a new terminal and run the program's version command (e.g. --version) to confirm it worked.
Pulled directly from this repo's README.
3. Docker
EasyPrerequisites
- Git Needed to download the project code from GitHub.
- Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker compose up -d --build
Builds and starts all defined containers (server, database, etc.) at once, in the background.
Run docker compose ps to check the containers are Up. If the README mentions a port, open http://localhost:PORT in your browser.
4. PHP (Composer)
EasyPrerequisites
$ composer install
Installs the PHP libraries listed in composer.json.
Run it with a built-in server like php -S localhost:8000, then open http://localhost:8000 in your browser.
Pulled directly from this repo's README.
// repository documentation
Was this content helpful?
(0 ratings)
