GithubHelp home page GithubHelp logo

beavercoffee's Introduction

Beavercoffee

Installation

Clone the project: git clone https://github.com/maxasker/Beavercoffee

Open the folder: cd Beavercoffee

Install dependencies: npm install

Start the preloaded server: gulp serve

Endpoints

Create a new store

  • URL params

    None

  • Data params

    Required: name

    Request body:

     {
     	"name": String,
     	"location": {
     			"street": String,
     			"city": String,
     			"country": String,
     			"zipcode": Number
     	}	
     }	

Return all stores

  • URL params

    None

  • Data params

    None

Return one store

  • URL params

    • storeid - ID of store
  • Data params

    None

Adds a new employee

  • URL params

    storeId - ID of store

  • Data params

    Required: current_role

    Request body:

     {
     	"current_role": String,
     	"name": String,
     	"social_security": Number,
     	"address": {
     			"street_name": String,
     			"city": String,
     			"country": String,
     			"zipcode": Number
     	},
     	"perc_fulltime": Number	
     }	

Returs all employees

  • URL params

    None

  • Data params

    None

Returns a single employee

  • URL params

    employeeId - ID of employee

  • Data params

    None

Updates an employee

  • URL params

    employeeId - ID of employee

  • Data params

    Body:

        {       
                "current_role": String,
                "name": String,
                "social_security": Number,
                "address": {
                        "street_name": String,
                        "city": String,
                        "country": String,
                        "zipcode": Number
                },
                "perc_fulltime": Number
        }
        ```	

Post a comment about an employee

  • URL params

    employeeId - ID of employee

  • Data params

    Required: text

    Body:

     {
     	"date": Date,
     	"text": String, 
     	"author": String (employeeId)
     }	

Returns all comments about an employee

  • URL params

    employeeId - ID of employee

  • Data params

    None

Creates a new customer

  • URL params

    None

  • Data params

    Required: None

    Body:

     {
     	"barcode": Number,
     	"name": String, 
     	"social_security": Number,
     	"occupation": String,
     	"is_employee": Boolean,
     	"country": String,
     	"beverages": Number,
     	"address": {
                         "street_name": String,
                         "city": String,
                         "country": String,
                         "zipcode": Number
                 },
     	"member_since": Date
     }	

Returns all customers

  • URL params

    None

  • Data params

    None

Returns a single customer

  • URL params

    customerId - ID of customer

  • Data params

    None

Updates a customer

  • URL params

    customerId - ID of customer

  • Data params

    Required: None

    Body:

     {
     	"barcode": Number,
     	"name": String, 
     	"social_security": Number,
     	"occupation": String,
     	"is_employee": Boolean,
     	"country": String,
     	"beverages": Number,
     	"address": {
                         "street_name": String,
                         "city": String,
                         "country": String,
                         "zipcode": Number
                 },
     	"member_since": Date
     }	

Add beverages to customer

  • URL params

    customerId - ID of customer

  • Data params

    Required: beverages

    Body:

     {
     	"beverages": Number
     }	

Creates a new product

  • URL params

    storeId - ID of store

  • Data params

    Required: None

    Body:

     {
     	"name": String, 
     	"quantity": {
                         "metric": String,
                         "total_amount": Number,
                         "pkg_amount": Number
                 }
     }	

Returns all products

  • URL params

    None

  • Data params

    None

Returns a single product

  • URL params

    productId - ID of product

  • Data params

    None

Updates a product

  • URL params

    productId - ID of product

  • Data params

    Required: None

    Body:

     {
     	"name": String, 
     	"quantity": {
                         "metric": String,
                         "total_amount": Number,
                         "pkg_amount": Number
                 }
     }	

Creates a new menu item

  • URL params

    storeId - ID of store

  • Data params

    Required: None

    Body:

     {
     	"name": String,
     	"price": Number,
     	"ingredients": [{
     			"product": String, (productId)
     			"amount": Number,
     			"metric": String
     	}]
     }	

Returns all menu items in a store

  • URL params

    storeId - ID of store

  • Data params

    None

Creates a new order

  • URL params

    storeId - ID of store

  • Data params

    Required: None

    Body:

     {
     	"employeeId": String,
     	"customer_id": String,
     	"date": Date,
     	"items": [{
     		"_id": String, (menuItemId)
                        	"quantity": Number
                 }]
     }	

Returns a single order

  • URL params

    orderId - ID of order

  • Data params

    None

Returns a list of all employees who've worked between the provided dates

  • URL params

    None

  • Data params

    Required: start_year, start_month, start_day, end_year, end_month, end_day

    Body:

     {
     	"start_year": Number,
     	"start_month": Number,
     	"start_day": Number,
     	"end_year": Number,
     	"end_month": Number,
     	"end_day": Number
     }	

Returns a list of all orders made between the provided dates. If an employee is provided in the request body only orders handled by that employee are returned. If one or more menu_items are provided only orders containing one or more of those items are returned. The request can not contain both menu_items and employee.

  • URL params

    None

  • Data params

    Required: start_year, start_month, start_day, end_year, end_month, end_day

    Body:

     {
     	"start_year": Number,
     	"start_month": Number,
     	"start_day": Number,
     	"end_year": Number,
     	"end_month": Number,
     	"end_day": Number,
     	"employee": String (employeeId),
     	"menu_items": [
     		String (menuItemId)
     	]
     }	

beavercoffee's People

Contributors

bobosso avatar maxasker avatar zeddan avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

bobosso

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.