Giter Club home page Giter Club logo

skippr's Introduction

SKIPPR API Server

App that helps small businesses with online ordering

Routes

Restaurants

GET /user/restaurants

Retrieve a list of restaurants in the database.

Output:

[
  {
    "rest_id": 1,
    "rest_name": "Menotti's Coffee Shop",
    "rest_email": "[email protected]",
    "rest_password": "espresso424",
    "rest_address": "56 Windward Ave",
    "rest_city": "Venice",
    "rest_state": "CA",
    "rest_zipcode": "90291",
    "rest_phone": "(424) 205-7014",
    "rest_yelp_link": "https://www.yelp.com/biz/menottis-coffee-stop-venice",
    "rest_imagelink": "http://frshgrnd.com/wp-content/uploads/2015/10/menottis-coffee-shop-venice-FRSHGRND-1898-610x424.jpg"
  }
]

GET /user/restaurants/:fkRestId

Display list of menu items for a specific restaurant.

Output:

[
  {
    "menu_item_id": 1,
    "menu_item_name": "Chai",
    "menu_item_price": "5.00",
    "menu_item_desc": "A coffee drink consisting of espresso with microfoam",
    "fk_rest_id": 1
  },
]

POST /restaurant/signup

Create a new restaurant account.

Input:

{
  "name": "Menotti's Coffee Shop",
  "email": "[email protected]",
  "password": "espresso424",
  "address": "56 Windward Ave",
  "city": "Venice",
  "state": "CA",
  "zipCode": "90291",
  "phone": "(424) 205-7014",
  "yelpLink": "https://www.yelp.com/biz/menottis-coffee-stop-venice",
  "imageLink": "http://frshgrnd.com/wp-content/uploads/2015/10/menottis-coffee-shop-venice-FRSHGRND-1898-610x424.jpg"
  },

Output:

{
  "message": 'New restaurant account has been successfully created',
  "restaurant": {
    "rest_id": 1,
    "rest_name": "Menotti's Coffee Shop",
    "rest_email": "[email protected]",
    "rest_password": "espresso424",
    "rest_address": "56 Windward Ave",
    "rest_city": "Venice",
    "rest_state": "CA",
    "rest_zipcode": "90291",
    "rest_phone": "(424) 205-7014",
    "rest_yelp_link": "https://www.yelp.com/biz/menottis-coffee-stop-venice",
    "rest_imagelink": "http://frshgrnd.com/wp-content/uploads/2015/10/menottis-coffee-shop-venice-FRSHGRND-1898-610x424.jpg"
  },
}

POST /restaurant/login

Verify a restaurants's login credentials.

Input:

{
	"email": "[email protected]",
	"password": "espresso424"
}

Output:

{
  "rest_id": 1,
  "rest_name": "Menotti's Coffee Shop",
  "rest_email": "[email protected]",
  "rest_password": "espresso424",
  "rest_address": "56 Windward Ave",
  "rest_city": "Venice",
  "rest_state": "CA",
  "rest_zipcode": "90291",
  "rest_phone": "(424) 205-7014",
  "rest_yelp_link": "https://www.yelp.com/biz/menottis-coffee-stop-venice",
  "rest_imagelink": "http://frshgrnd.com/wp-content/uploads/2015/10/menottis-coffee-shop-venice-FRSHGRND-1898-610x424.jpg"
}

Users

POST /user/login

Verify a user's email and login credentials.

Input:

{
  "email": "[email protected]",
  "password": 2001,
}

Output:

{
  "user_id": 1,
  "user_firstname": "Stanley",
  "user_lastname": "Kubrick",
  "user_email": "[email protected]",
  "user_password": "2001",
  "user_phone": "(555) 555-5000"
}

POST /user/signup

Create a new user account.

Input:

{
	"firstName": "Alfred",
	"lastName": "Hitchcock",
	"email": "[email protected]",
	"password": "psycho",
	"phoneNumber": "(555) 555-5555"
}

Output:

{
  "message": "New user has been successfully created",
  "user": {
      "user_id": 4,
      "user_firstname": "Alfred",
      "user_lastname": "Hitchcock",
      "user_email": "[email protected]",
      "user_password": "psycho",
      "user_phone": "(555) 555-5555"
  }
}

Orders

POST /user/order

Create an order for a specific user.

Input:

{
	"userId": "1",
	"restId": "1",
	"menuItems": [1,2]
}

Output:

{
  "message": 'Your order was submitted successfully',
  "orderId": 1
}

PUT /restaurant/orders/:orderId

Complete an order.

Output:

{
  "message": "This order has been completed",
  "orderId": "25"
}

GET /restaurant/orders/:restId

Display list of incomplete orders for a specific restaurant.

Output:

[
  {
    "fk_orders": 22,
    "fk_menu_item": 5,
    "rest_name": "Menotti's Coffee Shop",
    "user_firstname": "Stanley",
    "user_lastname": "Kubrick"
  },
]

skippr's People

Contributors

josieglore avatar jimkyoon avatar kachler avatar darryl-amour avatar

Stargazers

Dave Marquess 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.