Skip to content

goldo63/programmeren-4-shareameal

 
 

Repository files navigation

ShareAMeal API

About

The Share a meal API is obviously an API. It is created using javascript in combination with nodejs. The API allows users(user applications) to retrieve information about meals beeing served by other users. Users can participate in eachothers meals. So besides retrieve information, the user can also post their own meals so others can participate.

To use the API to it's full potential the user needs to register themselves and then login. The API then gives a API key that is needed for the more advanced requests.

API created by Tim Aerts(2173544) Email: [email protected]

The API

User

  • REGISTER USER: post("/api/user")

  • GET ALL USERS: get("/api/user")

  • GET USERS BY ID: get("/api/user/id")

  • GET PERSONAL PROFILE: get("/api/profile")

  • UPDATE USER: put("/api/user/id")

  • DELETE USER: delete("/api/user/id")

  • LOGIN: post("/api/auth/login")

Meal

  • REGISTER MEAL: post("/api/meal")

  • GET ALL MEALS: get("/api/meal")

  • GET MEALS BY ID: get("/api/meal/id")

  • UPDATE MEALS: put("/api/meal/id")

  • DELETE MEALS: delete("/api/meal/id")

  • SIGN UP TO MEAL: post("/api/meal/id/signup")

  • SIGN OUT TO MEAL: post("/api/meal/id/signout")

The Data

User

{
    "firstName": string,
    "lastName": string,
    "isActive": number,
    "emailAdress": string(validated),
    "password": string,
    "phoneNumber": string(validated),
    "roles": string('admin', 'editor', 'guest'),
    "street": string,
    "city": string
}

Meal

{
    "isActive": number,
    "isVega": number,
    "isVegan": number,
    "isToTakeHome": number,
    "dateTime": string,
    "maxAmountOfParticipants": number,
    "price": number,
    "imageUrl": string,
    "name": string,
    "description": string,
    "allergenes": string('gluten', 'lactose', 'noten')
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.8%
  • Other 0.2%