A simple REST API for retrieving bus line and travel information for Antsirabe.
Returns a list of all available travels with their IDs and names.
Response format:
{
"travel_id": "travel_name"
}
Find bus lines between two points.
Request body:
{
"primus": "starting_point_id",
"terminus": "destination_id"
}
Response format:
["bus_line_1", "bus_line_2"]
- Clone the repository
- Install dependencies:
pip install oxhttp
- Run the server:
python main.py
- API will be available at http://localhost:8080
Bus line data is stored in travel.json
and loaded on startup.