Restful api for getting metro schedules and timelines of Shiraz.
you can use our demo on github pages
https://maxedison.github.io/ShirazMetro/
- Station Names
- Scdules
- Hilodays Scdules
GET /api/v1/stations/stations
Parameter | Return Type | Description |
---|---|---|
- |
json |
returns station names |
GET /api/v1/scedules/calculate?startStation=${START_STATION_NAME}&destinationStation=${DESTINATION_STATION_NAME}&holiday=${BOOL}
Parameter | Type | Description |
---|---|---|
startStation |
string |
Required |
destinationStation |
string |
Required |
holiday |
bool |
Required |
so you want to find the scedules of a certain route what should you when useing the api? you have to send a request (a simple GET request) to get the full scheduel for example you want to go from 'شهید دستغیب' to 'دکتر شریعتی' and you want to have the holidays scedules too so you pass true to 'holiday' field :
/api/v1/scedules/calculate?startStation=شهید دستغیب&destinationStation=دکتر شریعتی&holiday=true
-
Clone the repository to your local machine:
git clone https://github.com/your-username/ShirazMetro.git
-
Navigate to the project directory:
cd ShirazMetro
-
Install the required dependencies:
npm install
-
Start the server:
npm run dev
-
See the data: The server will be running at
http://localhost:8080
To run this project, you will need to add the following environment variables to your .env file
PORT: default value is 8080
Contributions are always welcome!