MealSquare API

MealSquare API
Version: 1.0.0
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

Methods

[ Jump to Models ]

Table of Contents

Default

Default

Up
delete /meals/{id}
Delete the Meal with the given id (deleteMeal)

Path parameters

id (required)
Path Parameter

Responses

200

OK

400

BAD_REQUEST

401

UNAUTHORIZED

Up
get /meals/{id}
Get the Meal with the given id (getMeal)

Path parameters

id (required)
Path Parameter

Return type

ResponseMeal

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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK ResponseMeal

400

BAD_REQUEST

401

UNAUTHORIZED

Up
post /meals/mealPlan
Generate a Meal plan based on the given criteria (getMealPlan)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body Filter (optional)
Body Parameter

Query parameters

days (optional)
Query Parameter — format: int32

Return type

ArrayOfMeals

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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK ArrayOfMeals

400

BAD_REQUEST

401

UNAUTHORIZED

Up
post /meals/filters
Get meals based on the given filter (getMealsFiltered)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body Filter (required)
Body Parameter

Return type

ArrayOfMeals

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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK ArrayOfMeals

401

UNAUTHORIZED

Up
post /meals
Create a new meal in the database. (newMeal)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body RequestMeal (required)
Body Parameter

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

Up
put /meals/{id}
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 Content-Type request header:

Request body

body RequestMeal (required)
Body Parameter

Responses

200

OK

400

BAD_REQUEST

401

UNAUTHORIZED

Models

[ Jump to Methods ]

Table of Contents

  1. ArrayOfMeals
  2. Filter
  3. RequestMeal
  4. ResponseMeal
  5. ResponseMeal_ingredients

ArrayOfMeals Up

Filter Up

name (optional)
carbBase (optional)
ingredient (optional)
doesNotContain (optional)
tag (optional)
maxPrepTime (optional)

RequestMeal Up

ingredients (optional)
name (optional)
carbBase (optional)
tags (optional)
time (optional)

ResponseMeal Up

id (optional)
ingredients (optional)
name (optional)
carbBase (optional)
tags (optional)
time (optional)
image (optional)
byte[] format: binary

ResponseMeal_ingredients Up

amount (optional)
ingredientName (optional)