Giter VIP home page Giter VIP logo

fast-food-api-v2's Introduction

FAST FOOD FAST

Fast-Food-Fast is a food delivery service app for a restaurant. and this is the API(backed) for the app

Build Status Coverage Status Maintainability

Prerequisites

Other technologies used:

  • Flask_restful
  • Postman
  • Psycopg2

The API is hosted here

Endpoints

METHOD ENDPOINT DESCRIPTION
POST '/api/v2/user/signup' User signup
POST '/api/v2/user/login ' Login signed up user
POST '/api/v2/users/orders ' Place a new order
GET '/api/v2/users/orders/<entry_id>' Fetch a specific
GET '/api/v2/users/orders' Get all orders for the logged in user
GET '/api/v2/orders' Get all the orders for the admin
PUT '/api/v2/orders/<order_id> Update the status of an order
GET '/api/v2/menu Get all menu items
GET '/api/v2/menu/<menu_id>' Get a given menu item
POST '/api/v2/menu' Create a new menu item
GET '/api/v2/addresses' Get all user's addresses
POST 'api/v2/addresses' Add an address to the user addresses

Getting Started:

To start this app, please follow the instructions below:

On your terminal:

Install pip:

$ sudo apt-get install python-pip

Clone this repository:

$ git clone https://github.com/SilasKenneth/fast-food-api-v2.git

Get into the root directory:

$ cd fast-food-api-v2

Install virtualenv:

$ pip install virtualenv

Create a virtual environment in the root directory:

$ virtualenv name of virtualenv

Note: If you do not have python3 installed globally, please run this command when creating a virtual environment:

$ virtualenv -p python3 -name of virtualenv-

Activate the virtualenv:

$ source name of virtualenv/bin/activate

Install the requirements of the project from the requirements file:

$ pip install -r requirements.txt

Create two databases, one for testing environment and one for development envronnment,as follows:

$ createdb fast_food

$ createdb testdb

To run tests:

$ pytest

To run the app:

$ Python run.py

fast-food-api-v2's People

Contributors

dependabot[bot] avatar silaskenneth avatar snyk-bot 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.