Spoonacular Meal Planner (Independent Publisher) (#2291)
* initial files for spoonacular recipe connector * delete * Spoonacular Meal Planner (Independent Publisher)
This commit is contained in:
Родитель
584f15a027
Коммит
8e56f7bdae
|
@ -0,0 +1,273 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"version": "1.0.0",
|
||||
"title": "Spoonacular Meal Planner",
|
||||
"description": "The spoonacular Nutrition, Recipe, and Food allows you to access over 380,000 recipes, thousands of ingredients, food products, and menu items. Spoonacular Meal Planner makes it possible to Plan your healthy meals.",
|
||||
"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": {
|
||||
"/mealplanner/generate": {
|
||||
"get": {
|
||||
"summary": "Generate Meal Plan",
|
||||
"description": "Generate a meal plan with three meals per day (breakfast, lunch, and dinner).",
|
||||
"operationId": "GenerateMealPlan",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "timeFrame",
|
||||
"x-ms-summary": "Time Frame",
|
||||
"description": "Time Frame for the meal.",
|
||||
"default": "day",
|
||||
"in": "query",
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "targetCalories",
|
||||
"x-ms-summary": "Target Calories",
|
||||
"description": "Target Calories for the meal.",
|
||||
"default": "2000",
|
||||
"in": "query",
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "diet",
|
||||
"default": "vegetarian",
|
||||
"x-ms-summary": "Diet",
|
||||
"description": "The diet for the meal.",
|
||||
"in": "query",
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "exclude",
|
||||
"default": "shellfish, olives",
|
||||
"x-ms-summary": "Exclude",
|
||||
"description": "Exclude from the meal.",
|
||||
"in": "query",
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"meals": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "id"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"description": "title"
|
||||
},
|
||||
"imageType": {
|
||||
"type": "string",
|
||||
"description": "imageType"
|
||||
},
|
||||
"readyInMinutes": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "readyInMinutes"
|
||||
},
|
||||
"servings": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "servings"
|
||||
},
|
||||
"sourceUrl": {
|
||||
"type": "string",
|
||||
"description": "sourceUrl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "meals"
|
||||
},
|
||||
"nutrients": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"calories": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"description": "calories"
|
||||
},
|
||||
"carbohydrates": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"description": "carbohydrates"
|
||||
},
|
||||
"fat": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"description": "fat"
|
||||
},
|
||||
"protein": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"description": "protein"
|
||||
}
|
||||
},
|
||||
"description": "nutrients"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "401",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "403",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "404",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/connect": {
|
||||
"post": {
|
||||
"summary": "Connect User",
|
||||
"description": "In order to call user-specific endpoints, you need to connect your app's users to spoonacular users.",
|
||||
"operationId": "ConnectUser",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"x-ms-summary": "Content Type",
|
||||
"in": "header",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"default": "application/json",
|
||||
"description": "Content-Type"
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"x-ms-summary": "Body",
|
||||
"description": "The body.",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"description": "username"
|
||||
},
|
||||
"firstName": {
|
||||
"type": "string",
|
||||
"description": "firstName"
|
||||
},
|
||||
"lastName": {
|
||||
"type": "string",
|
||||
"description": "lastName"
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"description": "email"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"username": "your user's name",
|
||||
"firstName": "your user's first name",
|
||||
"lastName": "your user's last name",
|
||||
"email": "your user's email"
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"description": "username"
|
||||
},
|
||||
"hash": {
|
||||
"type": "string",
|
||||
"description": "hash"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
# Spoonacular Meal Planner
|
||||
The spoonacular Nutrition, Recipe, and Food allows you to access over 380,000 recipes, thousands of ingredients, food products, and menu items. Spoonacular Meal Planner makes it possible to Plan your healthy meals.
|
||||
|
||||
## 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
|
||||
### Generate Meal Plan
|
||||
Generate a meal plan with three meals per day (breakfast, lunch, and dinner).
|
||||
|
||||
### Connect User
|
||||
In order to call user-specific endpoints, you need to connect your app's users to spoonacular users.
|
||||
|
||||
## Obtaining Credentials
|
||||
API Key is Required. Please start [here](https://spoonacular.com/food-api).
|
||||
|
||||
## Known Issues and Limitations
|
||||
No known issues and limitations.
|
Загрузка…
Ссылка в новой задаче