Skip to content

Java spring boot based web api to suggest travel directions on Singapore MRT

License

Notifications You must be signed in to change notification settings

sjanorkar/transit-directions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transit Directions

Java spring boot based web api to suggest travel directions on Singapore MRT

Pre-requisite

Java 1.8

Technologies used

  • Java 1.8
  • Spring Boot
  • Spring MVC
  • Junit 5
  • Mockito
  • Maven
  • Swagger core 2.0

How to run

Run the jar file

  • Download transport-0.0.1-SNAPSHOT.jar from executable directory.
  • Run jar file java -jar transport-0.0.1-SNAPSHOT.jar
  • System logs can be found at logs/system_log.log in installation directory

Build from source code

  • Clone the git repo.
  • Using eclipse import as maven project
  • Locate com.zendesk.direction.Application.java
  • Right click and run as Spring Boot App

API documentation

After running the jar file api documentation and swagger file can be accessed from following location

Usage guidelines

  • Transit directions can be fetched either by using mrt station names or mrt ids.
  • MRT station names are case insensitive, but mrt ids are case sensitive.
  • If date & time of travel is not specified then directions will be generated for current date & time.
  • Transit directions for future date and time can be generated by passing appropriate date & time.

API details

Fetch by source and destination MRT names for current date time

 directions/mrt/from/{from}/to/{to}
 directions/mrt/from/bishan/to/clementi

Fetch by source and destination MRT names for specific date time

 directions/mrt/from/{from}/to/{to}/datetime/{datetime}
 directions/mrt/from/bishan/to/clementi/26-10-2020 19:30

Fetch by source and destination MRT ids for current date time

 directions/id/from/{from}/to/{to}
 directions/id/from/CC13/to/EW5

Fetch by source and destination MRT ids for specific date time

 directions/id/from/{from}/to/{to}/datetime/{datetime}
 directions/id/from/CC13/to/EW5/26-10-2020 19:30   

About

Java spring boot based web api to suggest travel directions on Singapore MRT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages