From 584f15a027dc387f44cb396fe2b75970d241cb5c Mon Sep 17 00:00:00 2001 From: Amjed Ayoub Date: Fri, 27 Jan 2023 08:04:29 -0800 Subject: [PATCH] Spoonacular Food (Independent Publisher) (#2290) * initial files for spoonacular recipe connector * delete * Spoonacular Food (Independent Publisher) --- .../apiDefinition.swagger.json | 3871 +++++++++++++++++ .../Spoonacular Food/apiProperties.json | 20 + .../Spoonacular Food/readme.md | 116 + 3 files changed, 4007 insertions(+) create mode 100644 independent-publisher-connectors/Spoonacular Food/apiDefinition.swagger.json create mode 100644 independent-publisher-connectors/Spoonacular Food/apiProperties.json create mode 100644 independent-publisher-connectors/Spoonacular Food/readme.md diff --git a/independent-publisher-connectors/Spoonacular Food/apiDefinition.swagger.json b/independent-publisher-connectors/Spoonacular Food/apiDefinition.swagger.json new file mode 100644 index 000000000..3fe3dfe00 --- /dev/null +++ b/independent-publisher-connectors/Spoonacular Food/apiDefinition.swagger.json @@ -0,0 +1,3871 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0.0", + "title": "Spoonacular Food", + "description": "The spoonacular Nutrition, Recipe, and Food allows you to access over 380,000 recipes, thousands of ingredients, food products, and menu items. Spoonacular Food makes it possible to search for food ingredients using natural language queries.", + "contact": { + "name": "Amjed Ayoub", + "url": "https://amjedayoub.github.io/portfolio", + "email": "amjedkayoub@gmail.com" + } + }, + "host": "api.spoonacular.com", + "basePath": "/", + "schemes": [ + "https" + ], + "consumes": [], + "produces": [ + "application/json" + ], + "paths": { + "/food/ingredients/{id}/information": { + "get": { + "summary": "Get Ingredient Information", + "description": "Use an ingredient id to get all available information about an ingredient, such as its image and supermarket aisle.", + "operationId": "GetIngredientInformation", + "parameters": [ + { + "name": "amount", + "x-ms-summary": "Amount", + "description": "The amount.", + "default": "150", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "unit", + "x-ms-summary": "Unit", + "description": "The unit.", + "default": "grams", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "id", + "x-ms-summary": "ID", + "description": "The ID.", + "default": "9266", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "original": { + "type": "string", + "description": "original" + }, + "originalName": { + "type": "string", + "description": "originalName" + }, + "name": { + "type": "string", + "description": "name" + }, + "nameClean": { + "type": "string", + "description": "nameClean" + }, + "amount": { + "type": "integer", + "format": "int32", + "description": "amount" + }, + "unit": { + "type": "string", + "description": "unit" + }, + "unitShort": { + "type": "string", + "description": "unitShort" + }, + "unitLong": { + "type": "string", + "description": "unitLong" + }, + "possibleUnits": { + "type": "array", + "items": { + "type": "string" + }, + "description": "possibleUnits" + }, + "estimatedCost": { + "type": "object", + "properties": { + "value": { + "type": "integer", + "format": "int32", + "description": "value" + }, + "unit": { + "type": "string", + "description": "unit" + } + }, + "description": "estimatedCost" + }, + "consistency": { + "type": "string", + "description": "consistency" + }, + "shoppingListUnits": { + "type": "array", + "items": { + "type": "string" + }, + "description": "shoppingListUnits" + }, + "aisle": { + "type": "string", + "description": "aisle" + }, + "image": { + "type": "string", + "description": "image" + }, + "meta": { + "type": "array", + "items": {}, + "description": "meta" + }, + "nutrition": { + "type": "object", + "properties": { + "nutrients": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name" + }, + "amount": { + "type": "number", + "format": "float", + "description": "amount" + }, + "unit": { + "type": "string", + "description": "unit" + }, + "percentOfDailyNeeds": { + "type": "number", + "format": "float", + "description": "percentOfDailyNeeds" + } + } + }, + "description": "nutrients" + }, + "properties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name" + }, + "amount": { + "type": "number", + "format": "float", + "description": "amount" + }, + "unit": { + "type": "string", + "description": "unit" + } + } + }, + "description": "properties" + }, + "caloricBreakdown": { + "type": "object", + "properties": { + "percentProtein": { + "type": "number", + "format": "float", + "description": "percentProtein" + }, + "percentFat": { + "type": "number", + "format": "float", + "description": "percentFat" + }, + "percentCarbs": { + "type": "number", + "format": "float", + "description": "percentCarbs" + } + }, + "description": "caloricBreakdown" + }, + "weightPerServing": { + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int32", + "description": "amount" + }, + "unit": { + "type": "string", + "description": "unit" + } + }, + "description": "weightPerServing" + } + }, + "description": "nutrition" + }, + "categoryPath": { + "type": "array", + "items": { + "type": "string" + }, + "description": "categoryPath" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/ingredients/{id}/amount": { + "get": { + "summary": "Compute Ingredient Amount", + "description": "Compute the amount you need of a certain ingredient for a certain nutritional goal. For example, how much pineapple do you have to eat to get 10 grams of protein?", + "operationId": "ComputeIngredientAmount", + "parameters": [ + { + "name": "nutrient", + "x-ms-summary": "Nutrient", + "description": "The recipe nutrient.", + "default": "protein", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "target", + "x-ms-summary": "Target", + "description": "The target.", + "default": "2", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "unit", + "x-ms-summary": "Unit", + "description": "The unit.", + "default": "oz", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "id", + "x-ms-summary": "ID", + "description": "The ID.", + "default": "9266", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "amount": { + "type": "number", + "format": "float", + "description": "amount" + }, + "unit": { + "type": "string", + "description": "unit" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/ingredients/{id}/substitutes": { + "get": { + "summary": "Get Ingredient Substitutes by ID", + "description": "Search for substitutes for a given ingredient.", + "operationId": "GetIngredientSubstitutesById", + "parameters": [ + { + "name": "id", + "x-ms-summary": "ID", + "description": "The ID.", + "default": "1001", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "ingredient": { + "type": "string", + "description": "ingredient" + }, + "substitutes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "substitutes" + }, + "message": { + "type": "string", + "description": "message" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/ingredients/autocomplete": { + "get": { + "summary": "Autocomplete Ingredient Search", + "description": "Autocomplete the entry of an ingredient.", + "operationId": "AutocompleteIngredientSearch", + "parameters": [ + { + "name": "query", + "x-ms-summary": "Query", + "description": "The Query.", + "default": "burger", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "number", + "x-ms-summary": "Number", + "description": "The number.", + "default": "10", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "metaInformation", + "x-ms-summary": "MetaInformation", + "description": "The metaInformation.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "intolerances", + "x-ms-summary": "Intolerances", + "description": "The intolerances.", + "default": "egg", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name" + }, + "image": { + "type": "string", + "description": "image" + }, + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "aisle": { + "type": "string", + "description": "aisle" + }, + "possibleUnits": { + "type": "array", + "items": { + "type": "string" + }, + "description": "possibleUnits" + } + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/ingredients/search": { + "get": { + "summary": "Ingredient Search", + "description": "Search for simple whole foods (e.g. fruits, vegetables, nuts, grains, meat, fish, dairy etc.).", + "operationId": "IngredientSearch", + "parameters": [ + { + "name": "query", + "x-ms-summary": "Query", + "description": "The Query.", + "default": "burger", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "addChildren", + "x-ms-summary": "addChildren", + "description": "addChildren.", + "default": "true", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "minProteinPercent", + "x-ms-summary": "Min Protein Percent", + "description": "The min Protein Percent.", + "default": "10", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "maxProteinPercent", + "x-ms-summary": "Max Protein Percent", + "description": "The max Protein Percent.", + "default": "90", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "minFatPercent", + "x-ms-summary": "Min Fat Percent", + "description": "The min Fat Percent.", + "default": "10", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "maxFatPercent", + "x-ms-summary": "Max Fat Percent", + "description": "The max Fat Percent.", + "default": "90", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "minCarbsPercent", + "x-ms-summary": "Min Carbs Percent", + "description": "The min Carbs Percent.", + "default": "10", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "maxCarbsPercent", + "x-ms-summary": "Max Carbs Percent", + "description": "The max Carbs Percent.", + "default": "90", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "metaInformation", + "x-ms-summary": "MetaInformation", + "description": "The metaInformation.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "intolerances", + "x-ms-summary": "Intolerances", + "description": "The intolerances.", + "default": "egg", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "sort", + "x-ms-summary": "Sort", + "description": "Sort.", + "default": "calories", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "sortDirection", + "x-ms-summary": "Sort Direction", + "description": "Sort Direction.", + "default": "asc", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "offset", + "x-ms-summary": "offset", + "description": "offset.", + "default": "606", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "number", + "x-ms-summary": "Number", + "description": "The number.", + "default": "10", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "name": { + "type": "string", + "description": "name" + }, + "image": { + "type": "string", + "description": "image" + } + } + }, + "description": "results" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "offset" + }, + "number": { + "type": "integer", + "format": "int32", + "description": "number" + }, + "totalResults": { + "type": "integer", + "format": "int32", + "description": "totalResults" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/ingredients/substitutes": { + "get": { + "summary": "Get Ingredient Substitutes", + "description": "Search for substitutes for a given ingredient.", + "operationId": "GetIngredientSubstitutes", + "parameters": [ + { + "name": "ingredientName", + "x-ms-summary": "Ingredient Name", + "description": "The ingredient name.", + "default": "butter", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "ingredient": { + "type": "string", + "description": "ingredient" + }, + "substitutes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "substitutes" + }, + "message": { + "type": "string", + "description": "message" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/products/upc/{upc}": { + "get": { + "summary": "Search Grocery Products by UPC", + "description": "Get information about a packaged food using its UPC.", + "operationId": "SearchGroceryProductsByUpc", + "parameters": [ + { + "name": "upc", + "x-ms-summary": "upc", + "description": "The upc.", + "default": "41631000564", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "title": { + "type": "string", + "description": "title" + }, + "badges": { + "type": "array", + "items": { + "type": "string" + }, + "description": "badges" + }, + "importantBadges": { + "type": "array", + "items": { + "type": "string" + }, + "description": "importantBadges" + }, + "breadcrumbs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "breadcrumbs" + }, + "generatedText": { + "type": "string", + "description": "generatedText" + }, + "imageType": { + "type": "string", + "description": "imageType" + }, + "ingredientCount": { + "type": "integer", + "format": "int32", + "description": "ingredientCount" + }, + "ingredientList": { + "type": "string", + "description": "ingredientList" + }, + "ingredients": { + "type": "array", + "items": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "description" + }, + "name": { + "type": "string", + "description": "name" + }, + "safety_level": { + "type": "string", + "description": "safety_level" + } + } + }, + "description": "ingredients" + }, + "likes": { + "type": "integer", + "format": "int32", + "description": "likes" + }, + "nutrition": { + "type": "object", + "properties": { + "nutrients": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name" + }, + "amount": { + "type": "integer", + "format": "int32", + "description": "amount" + }, + "unit": { + "type": "string", + "description": "unit" + }, + "percentOfDailyNeeds": { + "type": "number", + "format": "float", + "description": "percentOfDailyNeeds" + } + } + }, + "description": "nutrients" + }, + "caloricBreakdown": { + "type": "object", + "properties": { + "percentProtein": { + "type": "number", + "format": "float", + "description": "percentProtein" + }, + "percentFat": { + "type": "integer", + "format": "int32", + "description": "percentFat" + }, + "percentCarbs": { + "type": "number", + "format": "float", + "description": "percentCarbs" + } + }, + "description": "caloricBreakdown" + } + }, + "description": "nutrition" + }, + "price": { + "type": "integer", + "format": "int32", + "description": "price" + }, + "servings": { + "type": "object", + "properties": { + "number": { + "type": "integer", + "format": "int32", + "description": "number" + }, + "size": { + "type": "integer", + "format": "int32", + "description": "size" + }, + "unit": { + "type": "string", + "description": "unit" + } + }, + "description": "servings" + }, + "spoonacularScore": { + "type": "integer", + "format": "int32", + "description": "spoonacularScore" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/products/upc/{upc}/comparable": { + "get": { + "summary": "Get Comparable Products", + "description": "Find comparable products to the given one.", + "operationId": "GetComparableProducts", + "parameters": [ + { + "name": "upc", + "x-ms-summary": "upc", + "description": "The upc.", + "default": "33698816271", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "comparableProducts": { + "type": "object", + "properties": { + "calories": { + "type": "array", + "items": {}, + "description": "calories" + }, + "likes": { + "type": "array", + "items": {}, + "description": "likes" + }, + "price": { + "type": "array", + "items": {}, + "description": "price" + }, + "protein": { + "type": "array", + "items": { + "type": "object", + "properties": { + "difference": { + "type": "integer", + "format": "int32", + "description": "difference" + }, + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "image": { + "type": "string", + "description": "image" + }, + "title": { + "type": "string", + "description": "title" + } + } + }, + "description": "protein" + }, + "spoonacularScore": { + "type": "array", + "items": { + "type": "object", + "properties": { + "difference": { + "type": "integer", + "format": "int32", + "description": "difference" + }, + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "image": { + "type": "string", + "description": "image" + }, + "title": { + "type": "string", + "description": "title" + } + } + }, + "description": "spoonacularScore" + }, + "sugar": { + "type": "array", + "items": {}, + "description": "sugar" + } + }, + "description": "comparableProducts" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/products/{id}": { + "get": { + "summary": "Get Product Information", + "description": "Use a product id to get full information about a product, such as ingredients, nutrition, etc. The nutritional information is per serving.", + "operationId": "GetProductInformation", + "parameters": [ + { + "name": "id", + "x-ms-summary": "ID", + "description": "The ID.", + "default": "22347", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "title": { + "type": "string", + "description": "title" + }, + "breadcrumbs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "breadcrumbs" + }, + "imageType": { + "type": "string", + "description": "imageType" + }, + "badges": { + "type": "array", + "items": { + "type": "string" + }, + "description": "badges" + }, + "importantBadges": { + "type": "array", + "items": { + "type": "string" + }, + "description": "importantBadges" + }, + "ingredientCount": { + "type": "integer", + "format": "int32", + "description": "ingredientCount" + }, + "generatedText": { + "type": "string", + "description": "generatedText" + }, + "ingredientList": { + "type": "string", + "description": "ingredientList" + }, + "ingredients": { + "type": "array", + "items": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "description" + }, + "name": { + "type": "string", + "description": "name" + }, + "safety_level": { + "type": "string", + "description": "safety_level" + } + } + }, + "description": "ingredients" + }, + "likes": { + "type": "integer", + "format": "int32", + "description": "likes" + }, + "aisle": { + "type": "string", + "description": "aisle" + }, + "nutrition": { + "type": "object", + "properties": { + "nutrients": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name" + }, + "amount": { + "type": "integer", + "format": "int32", + "description": "amount" + }, + "unit": { + "type": "string", + "description": "unit" + }, + "percentOfDailyNeeds": { + "type": "number", + "format": "float", + "description": "percentOfDailyNeeds" + } + } + }, + "description": "nutrients" + }, + "caloricBreakdown": { + "type": "object", + "properties": { + "percentProtein": { + "type": "number", + "format": "float", + "description": "percentProtein" + }, + "percentFat": { + "type": "integer", + "format": "int32", + "description": "percentFat" + }, + "percentCarbs": { + "type": "number", + "format": "float", + "description": "percentCarbs" + } + }, + "description": "caloricBreakdown" + } + }, + "description": "nutrition" + }, + "price": { + "type": "integer", + "format": "int32", + "description": "price" + }, + "servings": { + "type": "object", + "properties": { + "number": { + "type": "integer", + "format": "int32", + "description": "number" + }, + "size": { + "type": "integer", + "format": "int32", + "description": "size" + }, + "unit": { + "type": "string", + "description": "unit" + } + }, + "description": "servings" + }, + "spoonacularScore": { + "type": "integer", + "format": "int32", + "description": "spoonacularScore" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/products/{id}/nutritionWidget": { + "get": { + "summary": "Product Nutrition by ID Widget", + "description": "Visualize a product's nutritional information as HTML including CSS.", + "operationId": "ProductNutritionByIdWidget", + "parameters": [ + { + "name": "defaultCss", + "x-ms-summary": "DefaultCss", + "description": "The defaultCss.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "id", + "x-ms-summary": "ID", + "description": "The ID.", + "default": "7657", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "string" + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/products/{id}/nutritionWidget.png": { + "get": { + "summary": "Product Nutrition by ID Image", + "description": "Visualize a product's nutritional information as an image.", + "operationId": "ProductNutritionByIdImage", + "parameters": [ + { + "name": "id", + "x-ms-summary": "ID", + "description": "The ID.", + "default": "7657", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "string" + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/products/{id}/nutritionLabel": { + "get": { + "summary": "Product Nutrition Label Widget", + "description": "Get a product's nutrition label as an HTML widget.", + "operationId": "ProductNutritionLabelWidget", + "parameters": [ + { + "name": "defaultCss", + "x-ms-summary": "DefaultCss", + "description": "The defaultCss.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "showOptionalNutrients", + "x-ms-summary": "Show Optional Nutrients", + "description": "Show Optional Nutrients.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "showZeroValues", + "x-ms-summary": "Show Zero Values", + "description": "Show Zero Values.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "showIngredients", + "x-ms-summary": "Show Ingredients", + "description": "Show Ingredients.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "id", + "x-ms-summary": "ID", + "description": "The ID.", + "default": "22347", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "string" + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/products/{id}/nutritionLabel.png": { + "get": { + "summary": "Product Nutrition Label Image", + "description": "Get a product's nutrition label as an image.", + "operationId": "ProductNutritionLabelImage", + "parameters": [ + { + "name": "showOptionalNutrients", + "x-ms-summary": "Show Optional Nutrients", + "description": "Show Optional Nutrients.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "showZeroValues", + "x-ms-summary": "Show Zero Values", + "description": "Show Zero Values.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "showIngredients", + "x-ms-summary": "Show Ingredients", + "description": "Show Ingredients.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "id", + "x-ms-summary": "ID", + "description": "The ID.", + "default": "22347", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "string" + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/products/search": { + "get": { + "summary": "Search Grocery Products", + "description": "Search packaged food products, such as frozen pizza or Greek yogurt.", + "operationId": "SearchGroceryProducts", + "parameters": [ + { + "name": "query", + "x-ms-summary": "Query", + "description": "The Query.", + "default": "burger", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "minCalories", + "x-ms-summary": "Min Calories", + "description": "The min calories.", + "default": "50", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "maxCalories", + "x-ms-summary": "Max Calories", + "description": "The max calories.", + "default": "800", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "minCarbs", + "x-ms-summary": "Min Carbs", + "description": "The min Carbs.", + "default": "10", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "maxCarbs", + "x-ms-summary": "Max Carbs", + "description": "The max Carbs.", + "default": "100", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "minProtein", + "x-ms-summary": "Min Protein", + "description": "The min Protein.", + "default": "10", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "maxProtein", + "x-ms-summary": "Max Protein", + "description": "The max Protein.", + "default": "100", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "minFat", + "x-ms-summary": "Min Fat", + "description": "The min Fat.", + "default": "1", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "maxFat", + "x-ms-summary": "Max Fat", + "description": "The max Fat.", + "default": "100", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "offset", + "x-ms-summary": "offset", + "description": "offset.", + "default": "606", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "number", + "x-ms-summary": "Number", + "description": "The number.", + "default": "10", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "title": { + "type": "string", + "description": "title" + }, + "imageType": { + "type": "string", + "description": "imageType" + } + } + }, + "description": "products" + }, + "totalProducts": { + "type": "integer", + "format": "int32", + "description": "totalProducts" + }, + "type": { + "type": "string", + "description": "type" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "offset" + }, + "number": { + "type": "integer", + "format": "int32", + "description": "number" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/products/suggest": { + "get": { + "summary": "Autocomplete Product Search", + "description": "Generate suggestions for grocery products based on a (partial) query. The matches will be found by looking in the title only.", + "operationId": "AutocompleteProductSearch", + "parameters": [ + { + "name": "query", + "x-ms-summary": "Query", + "description": "The Query.", + "default": "chicke", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "number", + "x-ms-summary": "Number", + "description": "The number.", + "default": "10", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "title": { + "type": "string", + "description": "title" + } + } + }, + "description": "results" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/menuItems/{id}": { + "get": { + "summary": "Get Menu Item Information", + "description": "Use a menu item id to get all available information about a menu item, such as nutrition.", + "operationId": "GetMenuItemInformation", + "parameters": [ + { + "name": "id", + "x-ms-summary": "ID", + "description": "The ID.", + "default": "424571", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "title": { + "type": "string", + "description": "title" + }, + "restaurantChain": { + "type": "string", + "description": "restaurantChain" + }, + "nutrition": { + "type": "object", + "properties": { + "nutrients": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name" + }, + "amount": { + "type": "integer", + "format": "int32", + "description": "amount" + }, + "unit": { + "type": "string", + "description": "unit" + }, + "percentOfDailyNeeds": { + "type": "integer", + "format": "int32", + "description": "percentOfDailyNeeds" + } + } + }, + "description": "nutrients" + }, + "caloricBreakdown": { + "type": "object", + "properties": { + "percentProtein": { + "type": "integer", + "format": "int32", + "description": "percentProtein" + }, + "percentFat": { + "type": "integer", + "format": "int32", + "description": "percentFat" + }, + "percentCarbs": { + "type": "integer", + "format": "int32", + "description": "percentCarbs" + } + }, + "description": "caloricBreakdown" + } + }, + "description": "nutrition" + }, + "badges": { + "type": "array", + "items": {}, + "description": "badges" + }, + "breadcrumbs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "breadcrumbs" + }, + "generatedText": { + "type": "string", + "description": "generatedText" + }, + "imageType": { + "type": "string", + "description": "imageType" + }, + "likes": { + "type": "integer", + "format": "int32", + "description": "likes" + }, + "servings": { + "type": "object", + "properties": { + "number": { + "type": "integer", + "format": "int32", + "description": "number" + }, + "size": { + "type": "integer", + "format": "int32", + "description": "size" + }, + "unit": { + "type": "string", + "description": "unit" + } + }, + "description": "servings" + }, + "price": { + "type": "number", + "format": "float", + "description": "price" + }, + "spoonacularScore": { + "type": "number", + "format": "float", + "description": "spoonacularScore" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/menuItems/{id}/nutritionWidget.png": { + "get": { + "summary": "Menu Item Nutrition by ID Image", + "description": "Visualize a menu item's nutritional information as HTML including CSS.", + "operationId": "MenuItemNutritionByIdImage", + "parameters": [ + { + "name": "id", + "x-ms-summary": "ID", + "description": "The ID.", + "default": "424571", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "string" + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/menuItems/{id}/nutritionLabel": { + "get": { + "summary": "Menu Item Nutrition Label Widget", + "description": "Visualize a menu item's nutritional label information as HTML including CSS.", + "operationId": "MenuItemNutritionLabelWidget", + "parameters": [ + { + "name": "defaultCss", + "x-ms-summary": "DefaultCss", + "description": "The defaultCss.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "showOptionalNutrients", + "x-ms-summary": "Show Optional Nutrients", + "description": "Show Optional Nutrients.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "showZeroValues", + "x-ms-summary": "Show Zero Values", + "description": "Show Zero Values.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "showIngredients", + "x-ms-summary": "Show Ingredients", + "description": "Show Ingredients.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "id", + "x-ms-summary": "ID", + "description": "The ID.", + "default": "342313", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "string" + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/menuItems/{id}/nutritionLabel.png": { + "get": { + "summary": "Menu Item Nutrition Label Image", + "description": "Visualize a menu item's nutritional label information as an image.", + "operationId": "MenuItemNutritionLabelImage", + "parameters": [ + { + "name": "showOptionalNutrients", + "x-ms-summary": "Show Optional Nutrients", + "description": "Show Optional Nutrients.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "showZeroValues", + "x-ms-summary": "Show Zero Values", + "description": "Show Zero Values.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "showIngredients", + "x-ms-summary": "Show Ingredients", + "description": "Show Ingredients.", + "default": "false", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "id", + "x-ms-summary": "ID", + "description": "The ID.", + "default": "342313", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "string" + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/menuItems/suggest": { + "get": { + "summary": "Autocomplete Menu Item Search", + "description": "Generate suggestions for menu items based on a (partial) query. The matches will be found by looking in the title only.", + "operationId": "AutocompleteMenuItemSearch", + "parameters": [ + { + "name": "query", + "x-ms-summary": "Query", + "description": "The Query.", + "default": "chicke", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "number", + "x-ms-summary": "Number", + "description": "The number.", + "default": "10", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "title": { + "type": "string", + "description": "title" + } + } + }, + "description": "results" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/menuItems/search": { + "get": { + "summary": "Search Menu Items", + "description": "Search over 115,000 menu items from over 800 fast food and chain restaurants. For example, McDonald's Big Mac or Starbucks Mocha.", + "operationId": "SearchMenuItems", + "parameters": [ + { + "name": "query", + "x-ms-summary": "Query", + "description": "The Query.", + "default": "burger", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "minCalories", + "x-ms-summary": "Min Calories", + "description": "The min calories.", + "default": "50", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "maxCalories", + "x-ms-summary": "Max Calories", + "description": "The max calories.", + "default": "800", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "minCarbs", + "x-ms-summary": "Min Carbs", + "description": "The min Carbs.", + "default": "10", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "maxCarbs", + "x-ms-summary": "Max Carbs", + "description": "The max Carbs.", + "default": "100", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "minProtein", + "x-ms-summary": "Min Protein", + "description": "The min Protein.", + "default": "10", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "maxProtein", + "x-ms-summary": "Max Protein", + "description": "The max Protein.", + "default": "100", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "minFat", + "x-ms-summary": "Min Fat", + "description": "The min fat.", + "default": "1", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "maxFat", + "x-ms-summary": "Max Fat", + "description": "The max fat.", + "default": "100", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "offset", + "x-ms-summary": "offset", + "description": "offset.", + "default": "606", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "number", + "x-ms-summary": "Number", + "description": "The number.", + "default": "10", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "menuItems": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "title": { + "type": "string", + "description": "title" + }, + "restaurantChain": { + "type": "string", + "description": "restaurantChain" + }, + "image": { + "type": "string", + "description": "image" + }, + "imageType": { + "type": "string", + "description": "imageType" + }, + "servings": { + "type": "object", + "properties": { + "number": { + "type": "integer", + "format": "int32", + "description": "number" + }, + "size": { + "type": "integer", + "format": "int32", + "description": "size" + }, + "unit": { + "type": "string", + "description": "unit" + } + }, + "description": "servings" + } + } + }, + "description": "menuItems" + }, + "totalMenuItems": { + "type": "integer", + "format": "int32", + "description": "totalMenuItems" + }, + "type": { + "type": "string", + "description": "type" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "offset" + }, + "number": { + "type": "integer", + "format": "int32", + "description": "number" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/wine/dishes": { + "get": { + "summary": "Dish Pairing for Wine", + "description": "Find a dish that goes well with a given wine.", + "operationId": "DishPairingForWine", + "parameters": [ + { + "name": "wine", + "x-ms-summary": "Wine", + "description": "The wine.", + "default": "malbec", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "pairings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "pairings" + }, + "text": { + "type": "string", + "description": "text" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/wine/pairing": { + "get": { + "summary": "Wine Pairing", + "description": "Find a wine that goes well with a food. Food can be a dish name (\"steak\"), an ingredient name (\"salmon\"), or a cuisine (\"italian\").", + "operationId": "WinePairing", + "parameters": [ + { + "name": "food", + "x-ms-summary": "Food", + "description": "The food.", + "default": "steak", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "maxPrice", + "x-ms-summary": "Max Price", + "description": "The max price.", + "default": "50", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "pairedWines": { + "type": "array", + "items": { + "type": "string" + }, + "description": "pairedWines" + }, + "pairingText": { + "type": "string", + "description": "pairingText" + }, + "productMatches": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "title": { + "type": "string", + "description": "title" + }, + "averageRating": { + "type": "integer", + "format": "int32", + "description": "averageRating" + }, + "description": { + "type": "string", + "description": "description" + }, + "imageUrl": { + "type": "string", + "description": "imageUrl" + }, + "link": { + "type": "string", + "description": "link" + }, + "price": { + "type": "string", + "description": "price" + }, + "ratingCount": { + "type": "integer", + "format": "int32", + "description": "ratingCount" + }, + "score": { + "type": "number", + "format": "float", + "description": "score" + } + } + }, + "description": "productMatches" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/wine/description": { + "get": { + "summary": "Wine Description", + "description": "Get a simple description of a certain wine, e.g. \"malbec\", \"riesling\", or \"merlot\".", + "operationId": "WineDescription", + "parameters": [ + { + "name": "wine", + "x-ms-summary": "Wine", + "description": "The wine.", + "default": "merlot", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "wineDescription": { + "type": "string", + "description": "wineDescription" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/wine/recommendation": { + "get": { + "summary": "Wine Recommendation", + "description": "Get a specific wine recommendation (concrete product) for a given wine type, e.g. \"merlot\".", + "operationId": "WineRecommendation", + "parameters": [ + { + "name": "wine", + "x-ms-summary": "Wine", + "description": "The wine.", + "default": "merlot", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "maxPrice", + "x-ms-summary": "Max Price", + "description": "The max price.", + "default": "50", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "minRating", + "x-ms-summary": "Min Rating", + "description": "The min rating.", + "default": "0.7", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "number", + "x-ms-summary": "Number", + "description": "The number.", + "default": "3", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "recommendedWines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "title": { + "type": "string", + "description": "title" + }, + "averageRating": { + "type": "number", + "format": "float", + "description": "averageRating" + }, + "description": { + "type": "string", + "description": "description" + }, + "imageUrl": { + "type": "string", + "description": "imageUrl" + }, + "link": { + "type": "string", + "description": "link" + }, + "price": { + "type": "string", + "description": "price" + }, + "ratingCount": { + "type": "integer", + "format": "int32", + "description": "ratingCount" + }, + "score": { + "type": "number", + "format": "float", + "description": "score" + } + } + }, + "description": "recommendedWines" + }, + "totalFound": { + "type": "integer", + "format": "int32", + "description": "totalFound" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/images/classify": { + "get": { + "summary": "Image Classification by URL", + "description": "Classify a food image.", + "operationId": "ImageClassificationByUrl", + "parameters": [ + { + "name": "imageUrl", + "x-ms-summary": "Image Url", + "description": "The image Url.", + "default": "https://spoonacular.com/recipeImages/635350-240x150.jpg", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "category" + }, + "probability": { + "type": "number", + "format": "float", + "description": "probability" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/images/analyze": { + "get": { + "summary": "Image Analysis by URL", + "description": "Analyze a food image. The API tries to classify the image, guess the nutrition, and find a matching recipes.", + "operationId": "ImageAnalysisByUrl", + "parameters": [ + { + "name": "imageUrl", + "x-ms-summary": "Image Url", + "description": "The image Url.", + "default": "https://spoonacular.com/recipeImages/635350-240x150.jpg", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "nutrition": { + "type": "object", + "properties": { + "recipesUsed": { + "type": "integer", + "format": "int32", + "description": "recipesUsed" + }, + "calories": { + "type": "object", + "properties": { + "value": { + "type": "integer", + "format": "int32", + "description": "value" + }, + "unit": { + "type": "string", + "description": "unit" + }, + "confidenceRange95Percent": { + "type": "object", + "properties": { + "min": { + "type": "number", + "format": "float", + "description": "min" + }, + "max": { + "type": "number", + "format": "float", + "description": "max" + } + }, + "description": "confidenceRange95Percent" + }, + "standardDeviation": { + "type": "number", + "format": "float", + "description": "standardDeviation" + } + }, + "description": "calories" + }, + "fat": { + "type": "object", + "properties": { + "value": { + "type": "integer", + "format": "int32", + "description": "value" + }, + "unit": { + "type": "string", + "description": "unit" + }, + "confidenceRange95Percent": { + "type": "object", + "properties": { + "min": { + "type": "number", + "format": "float", + "description": "min" + }, + "max": { + "type": "number", + "format": "float", + "description": "max" + } + }, + "description": "confidenceRange95Percent" + }, + "standardDeviation": { + "type": "number", + "format": "float", + "description": "standardDeviation" + } + }, + "description": "fat" + }, + "protein": { + "type": "object", + "properties": { + "value": { + "type": "integer", + "format": "int32", + "description": "value" + }, + "unit": { + "type": "string", + "description": "unit" + }, + "confidenceRange95Percent": { + "type": "object", + "properties": { + "min": { + "type": "number", + "format": "float", + "description": "min" + }, + "max": { + "type": "number", + "format": "float", + "description": "max" + } + }, + "description": "confidenceRange95Percent" + }, + "standardDeviation": { + "type": "number", + "format": "float", + "description": "standardDeviation" + } + }, + "description": "protein" + }, + "carbs": { + "type": "object", + "properties": { + "value": { + "type": "integer", + "format": "int32", + "description": "value" + }, + "unit": { + "type": "string", + "description": "unit" + }, + "confidenceRange95Percent": { + "type": "object", + "properties": { + "min": { + "type": "number", + "format": "float", + "description": "min" + }, + "max": { + "type": "number", + "format": "float", + "description": "max" + } + }, + "description": "confidenceRange95Percent" + }, + "standardDeviation": { + "type": "number", + "format": "float", + "description": "standardDeviation" + } + }, + "description": "carbs" + } + }, + "description": "nutrition" + }, + "category": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name" + }, + "probability": { + "type": "number", + "format": "float", + "description": "probability" + } + }, + "description": "category" + }, + "recipes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "title": { + "type": "string", + "description": "title" + }, + "imageType": { + "type": "string", + "description": "imageType" + }, + "url": { + "type": "string", + "description": "url" + } + } + }, + "description": "recipes" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/converse/suggest": { + "get": { + "summary": "Conversation Suggests", + "description": "This endpoint returns suggestions for things the user can say or ask the chatbot.", + "operationId": "ConversationSuggests", + "parameters": [ + { + "name": "query", + "x-ms-summary": "Query", + "description": "The Query.", + "default": "tell", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "number", + "x-ms-summary": "Number", + "description": "The number.", + "default": "5", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "suggests": { + "type": "object", + "properties": { + "_": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name" + } + } + }, + "description": "_" + } + }, + "description": "suggests" + }, + "words": { + "type": "array", + "items": {}, + "description": "words" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/detect": { + "post": { + "summary": "Detect Food in Text", + "description": "Take any text and find all mentions of food contained within it. This task is also called Named Entity Recognition (NER). In this case, the entities are foods. Either dishes, such as pizza or cheeseburger, or ingredients, such as cucumber or almonds.", + "operationId": "DetectFoodInText", + "parameters": [ + { + "name": "Content-Type", + "x-ms-summary": "Content Type", + "in": "header", + "required": true, + "type": "string", + "default": "application/x-www-form-urlencoded", + "description": "Content-Type" + }, + { + "name": "body", + "x-ms-summary": "Body", + "description": "The body.", + "in": "body", + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "key" + }, + "value": { + "type": "string", + "description": "value" + } + }, + "default": { + "key": "166", + "value": "!" + } + } + }, + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "annotations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "annotation": { + "type": "string", + "description": "annotation" + }, + "image": { + "type": "string", + "description": "image" + }, + "tag": { + "type": "string", + "description": "tag" + } + } + }, + "description": "annotations" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/site/search": { + "get": { + "summary": "Search Site Content", + "description": "Search spoonacular's site content. You'll be able to find everything that you could also find using the search suggestions on spoonacular.com. This is a suggest API so you can send partial strings as queries.", + "operationId": "SearchSiteContent", + "parameters": [ + { + "name": "query", + "x-ms-summary": "Query", + "description": "The Query.", + "default": "past", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "Articles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "dataPoints": { + "type": "array", + "items": {}, + "description": "dataPoints" + }, + "image": { + "type": "string", + "description": "image" + }, + "link": { + "type": "string", + "description": "link" + }, + "name": { + "type": "string", + "description": "name" + } + } + }, + "description": "Articles" + }, + "Grocery Products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "dataPoints": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "key" + }, + "value": { + "type": "string", + "description": "value" + } + } + }, + "description": "dataPoints" + }, + "image": { + "type": "string", + "description": "image" + }, + "link": { + "type": "string", + "description": "link" + }, + "name": { + "type": "string", + "description": "name" + } + } + }, + "description": "Grocery Products" + }, + "Menu Items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "dataPoints": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "key" + }, + "value": { + "type": "string", + "description": "value" + } + } + }, + "description": "dataPoints" + }, + "image": { + "type": "string", + "description": "image" + }, + "link": { + "type": "string", + "description": "link" + }, + "name": { + "type": "string", + "description": "name" + } + } + }, + "description": "Menu Items" + }, + "Recipes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "dataPoints": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "key" + }, + "value": { + "type": "string", + "description": "value" + } + } + }, + "description": "dataPoints" + }, + "image": { + "type": "string", + "description": "image" + }, + "link": { + "type": "string", + "description": "link" + }, + "name": { + "type": "string", + "description": "name" + } + } + }, + "description": "Recipes" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/search": { + "get": { + "summary": "Search All Food", + "description": "Search all food content with one call. That includes recipes, grocery products, menu items, simple foods (ingredients), and food videos.", + "operationId": "SearchAllFood", + "parameters": [ + { + "name": "query", + "x-ms-summary": "Query", + "description": "The Query.", + "default": "apple", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "offset", + "x-ms-summary": "offset", + "description": "offset.", + "default": "606", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "number", + "x-ms-summary": "Number", + "description": "The number.", + "default": "10", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "query" + }, + "totalResults": { + "type": "integer", + "format": "int32", + "description": "totalResults" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "limit" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "offset" + }, + "searchResults": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name" + }, + "totalResults": { + "type": "integer", + "format": "int32", + "description": "totalResults" + }, + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "name": { + "type": "string", + "description": "name" + }, + "image": { + "type": "string", + "description": "image" + }, + "link": { + "type": "string", + "description": "link" + }, + "type": { + "type": "string", + "description": "type" + }, + "relevance": { + "type": "integer", + "format": "int32", + "description": "relevance" + }, + "content": { + "type": "string", + "description": "content" + } + } + }, + "description": "results" + } + } + }, + "description": "searchResults" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/videos/search": { + "get": { + "summary": "Search Food Videos", + "description": "Find recipe and other food related videos.", + "operationId": "SearchFoodVideos", + "parameters": [ + { + "name": "query", + "x-ms-summary": "Query", + "description": "The Query.", + "default": "burger", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "type", + "x-ms-summary": "Type", + "description": "The type.", + "default": "main course", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "cuisine", + "x-ms-summary": "Cuisine", + "description": "The cuisine.", + "default": "italian", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "diet", + "x-ms-summary": "Diet", + "description": "The diet.", + "default": "vegetarian", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "includeIngredients", + "x-ms-summary": "Included Ingredients", + "description": "The included Ingredients.", + "default": "tomato,cheese", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "excludeIngredients", + "x-ms-summary": "Excluded Ingredients", + "description": "The excluded Ingredients.", + "default": "eggs", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "minLength", + "x-ms-summary": "Min Length", + "description": "The min length.", + "default": "0", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "maxLength", + "x-ms-summary": "Max Length", + "description": "The max length.", + "default": "999", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "offset", + "x-ms-summary": "offset", + "description": "offset.", + "default": "606", + "in": "query", + "type": "string", + "required": true + }, + { + "name": "number", + "x-ms-summary": "Number", + "description": "The number.", + "default": "10", + "in": "query", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "videos": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "title" + }, + "length": { + "type": "integer", + "format": "int32", + "description": "length" + }, + "rating": { + "type": "integer", + "format": "int32", + "description": "rating" + }, + "shortTitle": { + "type": "string", + "description": "shortTitle" + }, + "thumbnail": { + "type": "string", + "description": "thumbnail" + }, + "views": { + "type": "integer", + "format": "int32", + "description": "views" + }, + "youTubeId": { + "type": "string", + "description": "youTubeId" + } + } + }, + "description": "videos" + }, + "totalResults": { + "type": "integer", + "format": "int32", + "description": "totalResults" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/jokes/random": { + "get": { + "summary": "Random Food Joke", + "description": "Get a random joke that is related to food. Caution: this is an endpoint for adults!", + "operationId": "RandomFoodJoke", + "parameters": [], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "text" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + }, + "/food/trivia/random": { + "get": { + "summary": "Random Food Trivia", + "description": "Returns random food trivia.", + "operationId": "RandomFoodTrivia", + "parameters": [], + "responses": { + "200": { + "description": "200", + "schema": { + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "text" + } + } + } + }, + "401": { + "description": "401", + "schema": { + "type": "string" + } + }, + "403": { + "description": "403", + "schema": { + "type": "string" + } + }, + "404": { + "description": "404", + "schema": { + "type": "string" + } + } + } + } + } + }, + "definitions": {}, + "parameters": {}, + "responses": {}, + "securityDefinitions": { + "api_key": { + "type": "apiKey", + "in": "header", + "name": "x-api-key" + } + }, + "security": [], + "tags": [], + "x-ms-connector-metadata": [ + { + "propertyName": "Website", + "propertyValue": "https://spoonacular.com" + }, + { + "propertyName": "Privacy policy", + "propertyValue": "https://spoonacular.com/terms" + }, + { + "propertyName": "Categories", + "propertyValue": "Website;Lifestyle and Entertainment" + } + ] +} \ No newline at end of file diff --git a/independent-publisher-connectors/Spoonacular Food/apiProperties.json b/independent-publisher-connectors/Spoonacular Food/apiProperties.json new file mode 100644 index 000000000..259dd87bd --- /dev/null +++ b/independent-publisher-connectors/Spoonacular Food/apiProperties.json @@ -0,0 +1,20 @@ +{ + "properties": { + "connectionParameters": { + "api_key": { + "type": "securestring", + "uiDefinition": { + "displayName": "API Key", + "description": "The API Key for this api", + "tooltip": "Provide your API Key" + } + } + }, + "iconBrandColor": "#da3b01", + "capabilities": [ + "actions" + ], + "publisher": "Amjed Ayoub", + "stackOwner": "Spoonacular" + } + } \ No newline at end of file diff --git a/independent-publisher-connectors/Spoonacular Food/readme.md b/independent-publisher-connectors/Spoonacular Food/readme.md new file mode 100644 index 000000000..25a17ba2b --- /dev/null +++ b/independent-publisher-connectors/Spoonacular Food/readme.md @@ -0,0 +1,116 @@ +# Spoonacular Food +The spoonacular Nutrition, Recipe, and Food allows you to access over 380,000 recipes, thousands of ingredients, food products, and menu items. Spoonacular Food makes it possible to search for food ingredients using natural language queries. + +## Publisher: Amjed Ayoub + +## Prerequisites +API Key is Required. Please create an account at [Spoonacular API](https://spoonacular.com) to get your API key.​ + +## Supported Operations +### Get Ingredient Information +Use an ingredient id to get all available information about an ingredient, such as its image and supermarket aisle. + +### Compute Ingredient Amount +Compute the amount you need of a certain ingredient for a certain nutritional goal. For example, how much pineapple do you have to eat to get 10 grams of protein? + +### Get Ingredient Substitutes by ID +Search for substitutes for a given ingredient. + +### Autocomplete Ingredient Search +Autocomplete the entry of an ingredient. + +### Ingredient Search +Search for simple whole foods (e.g. fruits, vegetables, nuts, grains, meat, fish, dairy etc.). + +### Get Ingredient Substitutes +Search for substitutes for a given ingredient. + +### Search Grocery Products by UPC +Get information about a packaged food using its UPC. + +### Get Comparable Products +Find comparable products to the given one. + +### Get Product Information +Use a product id to get full information about a product, such as ingredients, nutrition, etc. The nutritional information is per serving. + +### Product Nutrition by ID Widget +Visualize a product's nutritional information as HTML including CSS. + +### Product Nutrition by ID Image +Visualize a product's nutritional information as an image. + +### Product Nutrition Label Widget +Get a product's nutrition label as an HTML widget. + +### Product Nutrition Label Image +Get a product's nutrition label as an image. + +### Search Grocery Products +Search packaged food products, such as frozen pizza or Greek yogurt. + +### Autocomplete Product Search +Generate suggestions for grocery products based on a (partial) query. The matches will be found by looking in the title only. + +### Get Menu Item Information +Use a menu item id to get all available information about a menu item, such as nutrition. + +### Menu Item Nutrition by ID Image +Visualize a menu item's nutritional information as HTML including CSS.F + +### Menu Item Nutrition Label Widget +Visualize a menu item's nutritional label information as HTML including CSS. + +### Menu Item Nutrition Label Image +Visualize a menu item's nutritional label information as an image. + +### Autocomplete Menu Item Search +Generate suggestions for menu items based on a (partial) query. The matches will be found by looking in the title only. + +### Search Menu Items +Search over 115,000 menu items from over 800 fast food and chain restaurants. For example, McDonald's Big Mac or Starbucks Mocha. + +### Dish Pairing for Wine +Find a dish that goes well with a given wine. + +### Wine Pairing +Find a wine that goes well with a food. Food can be a dish name (\"steak\"), an ingredient name (\"salmon\"), or a cuisine (\"italian\"). + +### Wine Description +Get a simple description of a certain wine, e.g. \"malbec\", \"riesling\", or \"merlot\". + +### Wine Recommendation +Get a specific wine recommendation (concrete product) for a given wine type, e.g. \"merlot\". + +### Image Classification by URL +Classify a food image. + +### Image Analysis by URL +Analyze a food image. The API tries to classify the image, guess the nutrition, and find a matching recipes. + +### Conversation Suggests +This endpoint returns suggestions for things the user can say or ask the chatbot. + +### Detect Food in Text +Take any text and find all mentions of food contained within it. This task is also called Named Entity Recognition (NER). In this case, the entities are foods. Either dishes, such as pizza or cheeseburger, or ingredients, such as cucumber or almonds. + +### Search Site Content +Search spoonacular's site content. You'll be able to find everything that you could also find using the search suggestions on spoonacular.com. This is a suggest API so you can send partial strings as queries. + +### Search All Food +Search all food content with one call. That includes recipes, grocery products, menu items, simple foods (ingredients), and food videos. + +### Search Food Videos +Find recipe and other food related videos. + +### Random Food Joke +Get a random joke that is related to food. Caution: this is an endpoint for adults! + +### Random Food Trivia +Returns random food trivia. + +## Obtaining Credentials +API Key is Required. Please start [here](​https://spoonacular.com/food-api). + +## Known Issues and Limitations +No known issues and limitations. \ No newline at end of file