Skip to content

bw-foodie-fun/Backend-Foodie-Fun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backend-Foodie-Fun

A meal has this basic format:

{
    "id": 8,
    "restaurant_name": "Pizza Place TEST2",
    "restaurant_type": "Italian",
    "item_name": "Pepperoni Pizza",
    "item_photo": "https://images.unsplash.com/photo-1544982503-9f984c14501a?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=934&q=80",
    "food_rating": 5,
    "item_comment": "Wow, pizza was so good! I really enjoyed it!",
    "wait_time": "About 10 minutes.",
    "date_visited": "2018-11-02",
    "user_id": 3
}
  • id will be auto-generated by the our meals table.
  • user_id will be generated by our CRUD functions.
  • food_rating is of type integer
  • date_visited is of type date in our table
  • all other keys are of type string
  • a POST request will register a new user. Will also provide a JSON Web Token.
  • Required: username field and password field.
  • a POST request will login an already registered user. Will also provide a JSON Web Token.
  • Required: username field and password field.
  • a GET request to this route will return a list of all the meals per user
  • a GET request to this route (with "id" replaced by the meal ID) will return the meal with the specified ID. Will only return specified ID if associated with user.
  • a POST request to this route will return the meal object that is created for the logged in user.
  • Required: item_name
  • Optional but recommended: restaurant_name, restaurant_type, item_photo, food_rating, item_comment, wait_time, date_visited
  • a PUT request to this route (with "id" replaced by the meal ID) will return the number of meals updated for the logged in user.
  • Required: item_name
  • Optional but recommended: restaurant_name, restaurant_type, item_photo, food_rating, item_comment, wait_time, date_visited
  • a DELETE request to this route (with "id" replaced by the meal ID) will return the number of meals deleted for the logged in user.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published