MealSquare API
MealSquare API
Version: 1.0.0
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html
Access
[ Jump to Models ]
Table of Contents
Delete the Meal with the given id (deleteMeal)
Path parameters
id (required)
Path Parameter —
Responses
200
OK
400
BAD_REQUEST
401
UNAUTHORIZED
Get the Meal with the given id (getMeal)
Path parameters
id (required)
Path Parameter —
Return type
Example data
Content-Type: application/json
{
"image" : "",
"carbBase" : "carbBase",
"name" : "name",
"ingredients" : {
"amount" : "amount",
"ingredientName" : "ingredientName"
},
"id" : "id",
"time" : 0,
"tags" : [ "tags", "tags" ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
OK
ResponseMeal
400
BAD_REQUEST
401
UNAUTHORIZED
Generate a Meal plan based on the given criteria (getMealPlan)
Consumes
This API call consumes the following media types via the request header:
Request body
Query parameters
days (optional)
Query Parameter — format: int32
Return type
Example data
Content-Type: application/json
[ {
"image" : "",
"carbBase" : "carbBase",
"name" : "name",
"ingredients" : {
"amount" : "amount",
"ingredientName" : "ingredientName"
},
"id" : "id",
"time" : 0,
"tags" : [ "tags", "tags" ]
}, {
"image" : "",
"carbBase" : "carbBase",
"name" : "name",
"ingredients" : {
"amount" : "amount",
"ingredientName" : "ingredientName"
},
"id" : "id",
"time" : 0,
"tags" : [ "tags", "tags" ]
} ]
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
OK
ArrayOfMeals
400
BAD_REQUEST
401
UNAUTHORIZED
Get meals based on the given filter (getMealsFiltered)
Consumes
This API call consumes the following media types via the request header:
Request body
Return type
Example data
Content-Type: application/json
[ {
"image" : "",
"carbBase" : "carbBase",
"name" : "name",
"ingredients" : {
"amount" : "amount",
"ingredientName" : "ingredientName"
},
"id" : "id",
"time" : 0,
"tags" : [ "tags", "tags" ]
}, {
"image" : "",
"carbBase" : "carbBase",
"name" : "name",
"ingredients" : {
"amount" : "amount",
"ingredientName" : "ingredientName"
},
"id" : "id",
"time" : 0,
"tags" : [ "tags", "tags" ]
} ]
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
OK
ArrayOfMeals
401
UNAUTHORIZED
Create a new meal in the database. (newMeal)
Consumes
This API call consumes the following media types via the request header:
Request body
Responses
200
OK
400
BAD_REQUEST
401
UNAUTHORIZED
Up
post /meals/{id}/image
Sets the image for the Meal with the given id (newMealImage)
Path parameters
id (required)
Path Parameter —
Query parameters
file (required)
Query Parameter — format: binary
Responses
200
OK
400
BAD_REQUEST
401
UNAUTHORIZED
Update the Meal with the given id (updateMeal)
Path parameters
id (required)
Path Parameter —
Consumes
This API call consumes the following media types via the request header:
Request body
Responses
200
OK
400
BAD_REQUEST
401
UNAUTHORIZED
[ Jump to Methods ]
Table of Contents
ArrayOfMeals
Filter
RequestMeal
ResponseMeal
ResponseMeal_ingredients
name (optional)
carbBase (optional)
ingredient (optional)
doesNotContain (optional)
tag (optional)
maxPrepTime (optional)
ingredients (optional)
name (optional)
carbBase (optional)
tags (optional)
time (optional)
id (optional)
ingredients (optional)
name (optional)
carbBase (optional)
tags (optional)
time (optional)
image (optional)
amount (optional)
ingredientName (optional)