Skip to content

Latest commit

 

History

History
executable file
·
45 lines (38 loc) · 1.55 KB

Readme.md

File metadata and controls

executable file
·
45 lines (38 loc) · 1.55 KB

Travel Information System

This API provides travel information for various trips and provides means to save new ride informations.

Configuration

Server SETUP

  1. clone the repository
  2. configure node on version v10.24.1
  3. run command `npm start`
  • To test code coverage run command `npm run coverage`.
  • To apply git pre-push hook copy `src/git hook/pre-push` file to `.git/hooks` directory
  • Navigation

    • GET /health : responds `Healthy` when API up and running.

    • GET /rides : response with rides data (JSON)
      • Query parameter :
        1. page (Number) : default 1
        2. size (Number) : default 10

    • POST /rides : response with rides data
      • Data format :
        1. start_lat (Number) : Starting point of ride in latitude must be in range of [-90,90]
        2. start_long (Number) : Starting point of ride in latitude must be in range of [-180,180]
        3. end_lat (Number) : Ending point of ride in latitude must be in range of [-90,90]
        4. end_long (Number) : Ending point of ride in latitude must be in range of [-180,180]
        5. rider_name (String) : Name of the Rider should be a non empty string
        6. driver_name (String) : Name of the Driver should be a non empty string
        7. driver_vehicle (String) : Name of the Vehicle should be a non empty string

    • GET /rides/:id : responds with ride data (JSON) for the provided id (Number)