Giter VIP home page Giter VIP logo

uber-api's Introduction

GETTING STARTED

Clone this app and launch them in servers of your choice this will launch your app

Navigate into the project root and run below command to launch the project

php -S localhost:8000

UBER CLONE APP

This app works similar to cab service apps like UBER, LYFT etc., with minimal functions and features.

Right now it only consists of REST API built using SLIM 3 framework using which you can extend your own front end.

REST API ENDPOINTS

Below is the list of API endpoints of our app:


Method URL Description
GET /cabs Fetch the entire list of cabs irrespective of distance.
GET /cabs/nearby/{location_value} Fetch nearby cabs only, {location_value} parameter must be sent in integer format (see location assumptions below).
GET /cabs/{number} Fetches particular cab details, {number} property has to be sent which is cabs number in integer.
POST /cabs/book Books a ride in particular cab, send {cab_number} as a post parameter in integer format which is a cab's number.
POST /calculate/fare Calculate the fare for the particular ride, See Fare calculations below

FARE CALCULATIONS

Fare is calculated as 1 COINS per minute and 2 COINS per kilometer, sum gives the total fare for the ride.

LOCATION ASSUMPTIONS

We have assumed location to be flat instead of LATITUDE and LONGITUDE just provide single numeric values and locate based on numbers

uber-api's People

Contributors

srivinod avatar

Stargazers

 avatar Roman avatar  avatar  avatar Osama Salama avatar Teddy Jimenez avatar Alonso Blanco avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.