Skip to content

j03-dev/bus_antsirabe_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bus Antsirabe API

A simple REST API for retrieving bus line and travel information for Antsirabe.

Endpoints

GET /api/travel

Returns a list of all available travels with their IDs and names.

Response format:

{
  "travel_id": "travel_name"
}

POST /api/travel

Find bus lines between two points.

Request body:

{
  "primus": "starting_point_id",
  "terminus": "destination_id"
}

Response format:

["bus_line_1", "bus_line_2"]

Running locally

  1. Clone the repository
  2. Install dependencies: pip install .
  3. Run the server: python src/main.py
  4. API will be available at http://localhost:8080

Data

Bus line data is stored in data/travel.json and loaded on startup.

About

Antsirabe bus API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published