queries

Methods

(async, inner) getAllReviews() → {Array.<Object>}

return ALL reviews

Source:

(async, inner) getAvailableDishes() → {Array.<Object>}

return all Dish entries in the Dish Table of currently available dishes

Source:

(async, inner) getChefInfo(id) → {Array.<Object>}

return information on a specific chef specifid by chefid

Parameters:
Name Type Description
id int

chefid of desired chef

Source:

(async, inner) getChefReviews(chefid) → {Array.<Object>}

return all reviews with comments left for a specific chef specified by chefid

Parameters:
Name Type Description
chefid int

chefid of specified chef

Source:

(async, inner) getChefs() → {Array.<Object>}

return all Chef entries in the Chef Table

Source:

(async, inner) getChefsDishes(id) → {Array.<Object>}

return all Dish entries for a given chef

Parameters:
Name Type Description
id int

chefid of desired chef

Source:

(async, inner) getCoverPhotos(chefid) → {Array.<Object>}

return all primary image URLs of the dishes of a specified chef ordered by dish rating

Parameters:
Name Type Description
chefid int

chefid of desired chef

Source:

(async, inner) getDishes() → {Array.<Object>}

return all Dish entries in the Dish Table

Source:

(async, inner) getDishInfo(dishid) → {Array.<Object>}

return information on a specific dish specifid by dishid

Parameters:
Name Type Description
dishid int

dishid of desired dish

Source:

(async, inner) getDishReviews(dishid) → {Array.<Object>}

return all reviews with comments left for a specific dish specified by dishid

Parameters:
Name Type Description
dishid int

dishid of specified dish

Source:

(async, inner) getNChefReviews(chefid, n) → {Array.<Object>}

return the latest n reviews with comments left for a specific chef specified by chefid

Parameters:
Name Type Description
chefid int

chefid of specified chef

n int

number of reviews to pull

Source:

(async, inner) getNDishReviews(dishid, n) → {Array.<Object>}

return the latest n reviews with comments left for a specific dish specified by dishid

Parameters:
Name Type Description
dishid int

dishid of specified dish

n int

number of reviews to pull

Source:

(async, inner) pushNewReview(dishid, chefid, reviewer, int, comment, timestamp)

pushes a new review to the Review table in the database

Parameters:
Name Type Description
dishid int

dishid of dish being reviewed

chefid int

chefid of the chef of the dish being reviewed

reviewer String

name of who left the review

int rating

star rating of 1 to 5 left for the dish

comment String

optional comment left for the dish (null if no comment)

timestamp BigInt

timestamp of when the review was left in milliseconds

Source:

(async, inner) sendTextMessage(dishes, instructions, phone, method)

perform post request to send text messages to chefs

Parameters:
Name Type Description
dishes String

dishes in order

instructions String

special instructions left by customer

phone int

phone number of chef to send to

method String

GET or POST method

Source: