Files
mealie/docs/docs/html/api.html
2021-01-07 15:25:01 -09:00

27 lines
20 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>My Project - ReDoc</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="https://fastapi.tiangolo.com/img/favicon.png">
<style>
body {
margin: 0;
padding: 0;
}
</style>
<style data-styled="" data-styled-version="4.4.1"></style>
</head>
<body>
<div id="redoc-container"></div>
<script src="https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js"> </script>
<script>
var spec = {"openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": {"/api/all-recipes/": {"get": {"tags": ["Recipes"], "summary": "Get All Recipes", "description": "Returns key data for all recipes ", "operationId": "get_all_recipes_api_all_recipes__get", "parameters": [{"required": true, "schema": {"title": "Keys", "type": "array", "items": {"type": "string"}}, "name": "keys", "in": "query"}, {"required": false, "schema": {"title": "Num", "type": "integer", "default": 100}, "name": "num", "in": "query"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/recipe/{recipe_slug}/": {"get": {"tags": ["Recipes"], "summary": "Get Recipe", "description": "Takes in a recipe slug, returns all data for a recipe ", "operationId": "get_recipe_api_recipe__recipe_slug___get", "parameters": [{"required": true, "schema": {"title": "Recipe Slug", "type": "string"}, "name": "recipe_slug", "in": "path"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/recipe/image/{recipe_slug}/": {"get": {"tags": ["Recipes"], "summary": "Get Recipe Img", "description": "Takes in a recipe slug, returns the static image ", "operationId": "get_recipe_img_api_recipe_image__recipe_slug___get", "parameters": [{"required": true, "schema": {"title": "Recipe Slug", "type": "string"}, "name": "recipe_slug", "in": "path"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/recipe/create-url/": {"post": {"tags": ["Recipes"], "summary": "Get Recipe Url", "description": "Takes in a URL and Attempts to scrape data and load it into the database ", "operationId": "get_recipe_url_api_recipe_create_url__post", "requestBody": {"content": {"application/json": {"schema": {"title": "Url", "type": "object"}}}, "required": true}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/recipe/create/": {"post": {"tags": ["Recipes"], "summary": "Create From Json", "description": "Takes in a JSON string and loads data into the database as a new entry", "operationId": "create_from_json_api_recipe_create__post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Recipe"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/recipe/{recipe_slug}/update/image/": {"post": {"tags": ["Recipes"], "summary": "Update Image", "description": "Removes an existing image and replaces it with the incoming file. ", "operationId": "update_image_api_recipe__recipe_slug__update_image__post", "parameters": [{"required": true, "schema": {"title": "Recipe Slug", "type": "string"}, "name": "recipe_slug", "in": "path"}], "requestBody": {"content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_update_image_api_recipe__recipe_slug__update_image__post"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/recipe/{recipe_slug}/update/": {"post": {"tags": ["Recipes"], "summary": "Update", "description": "Updates a recipe by existing slug and data. Data should containt ", "operationId": "update_api_recipe__recipe_slug__update__post", "parameters": [{"required": true, "schema": {"title": "Recipe Slug", "type": "string"}, "name": "recipe_slug", "in": "path"}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Recipe"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/recipe/{recipe_slug}/delete/": {"delete": {"tags": ["Recipes"], "summary": "Delete", "description": "Deletes a recipe by slug ", "operationId": "delete_api_recipe__recipe_slug__delete__delete", "parameters": [{"required": true, "schema": {"title": "Recipe Slug", "type": "string"}, "name": "recipe_slug", "in": "path"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/meal-plan/all/": {"get": {"tags": ["Meal Plan"], "summary": "Get All Meals", "description": "Returns a list of all available meal plans ", "operationId": "get_all_meals_api_meal_plan_all__get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/meal-plan/create/": {"post": {"tags": ["Meal Plan"], "summary": "Set Meal Plan", "description": "Creates Mealplan from Frontend Data", "operationId": "set_meal_plan_api_meal_plan_create__post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MealPlan"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/meal-plan/{plan_id}/update/": {"post": {"tags": ["Meal Plan"], "summary": "Update Meal Plan", "description": "Updates a Meal Plan Based off ID ", "operationId": "update_meal_plan_api_meal_plan__plan_id__update__post", "parameters": [{"required": true, "schema": {"title": "Plan Id", "type": "string"}, "name": "plan_id", "in": "path"}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MealPlan"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/meal-plan/{plan_id}/delete/": {"delete": {"tags": ["Meal Plan"], "summary": "Delete Meal Plan", "description": "Doc Str ", "operationId": "delete_meal_plan_api_meal_plan__plan_id__delete__delete", "parameters": [{"required": true, "schema": {"title": "Plan Id"}, "name": "plan_id", "in": "path"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/meal-plan/today/": {"get": {"tags": ["Meal Plan"], "summary": "Get Today", "description": "Returns the meal plan data for today ", "operationId": "get_today_api_meal_plan_today__get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/meal-plan/this-week/": {"get": {"tags": ["Meal Plan"], "summary": "Get This Week", "description": "Returns the meal plan data for this week ", "operationId": "get_this_week_api_meal_plan_this_week__get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/site-settings/": {"get": {"tags": ["Settings"], "summary": "Get Main Settings", "description": "Returns basic site Settings ", "operationId": "get_main_settings_api_site_settings__get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/site-settings/webhooks/test/": {"post": {"tags": ["Settings"], "summary": "Test Webhooks", "description": "Test Webhooks ", "operationId": "test_webhooks_api_site_settings_webhooks_test__post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/site-settings/update/": {"post": {"tags": ["Settings"], "summary": "Update Settings", "description": "Returns Site Settings ", "operationId": "update_settings_api_site_settings_update__post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteSettings"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/site-settings/themes/": {"get": {"tags": ["Themes"], "summary": "Get All Themes", "description": "Returns all site themes ", "operationId": "get_all_themes_api_site_settings_themes__get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/site-settings/themes/{theme_name}/": {"get": {"tags": ["Themes"], "summary": "Get Single Theme", "description": "Returns basic site Settings ", "operationId": "get_single_theme_api_site_settings_themes__theme_name___get", "parameters": [{"required": true, "schema": {"title": "Theme Name", "type": "string"}, "name": "theme_name", "in": "path"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/site-settings/themes/create/": {"post": {"tags": ["Themes"], "summary": "Create Theme", "description": "Creates a Site Color Theme ", "operationId": "create_theme_api_site_settings_themes_create__post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteTheme"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/site-settings/themes/{theme_name}/update/": {"post": {"tags": ["Themes"], "summary": "Update Theme", "description": "Returns basic site Settings ", "operationId": "update_theme_api_site_settings_themes__theme_name__update__post", "parameters": [{"required": true, "schema": {"title": "Theme Name", "type": "string"}, "name": "theme_name", "in": "path"}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteTheme"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/site-settings/themes/{theme_name}/delete/": {"delete": {"tags": ["Themes"], "summary": "Delete Theme", "description": "Returns basic site Settings ", "operationId": "delete_theme_api_site_settings_themes__theme_name__delete__delete", "parameters": [{"required": true, "schema": {"title": "Theme Name", "type": "string"}, "name": "theme_name", "in": "path"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/backups/available/": {"get": {"tags": ["Import / Export"], "summary": "Available Imports", "operationId": "available_imports_api_backups_available__get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/backups/export/database/": {"post": {"tags": ["Import / Export"], "summary": "Export Database", "operationId": "export_database_api_backups_export_database__post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BackupJob"}}}, "required": true}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/backups/{file_name}/import/": {"post": {"tags": ["Import / Export"], "summary": "Import Database", "operationId": "import_database_api_backups__file_name__import__post", "parameters": [{"required": true, "schema": {"title": "File Name", "type": "string"}, "name": "file_name", "in": "path"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/backups/{backup_name}/delete/": {"delete": {"tags": ["Import / Export"], "summary": "Delete Backup", "operationId": "delete_backup_api_backups__backup_name__delete__delete", "parameters": [{"required": true, "schema": {"title": "Backup Name", "type": "string"}, "name": "backup_name", "in": "path"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/migration/chowdown/repo/": {"post": {"tags": ["Migration"], "summary": "Import Chowdown Recipes", "description": "Import Chowsdown Recipes from Repo URL ", "operationId": "import_chowdown_recipes_api_migration_chowdown_repo__post", "requestBody": {"content": {"application/json": {"schema": {"title": "Repo", "type": "object"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"BackupJob": {"title": "BackupJob", "type": "object", "properties": {"tag": {"title": "Tag", "type": "string"}, "template": {"title": "Template", "type": "string"}}}, "Body_update_image_api_recipe__recipe_slug__update_image__post": {"title": "Body_update_image_api_recipe__recipe_slug__update_image__post", "required": ["image", "extension"], "type": "object", "properties": {"image": {"title": "Image", "type": "string", "format": "binary"}, "extension": {"title": "Extension", "type": "string"}}}, "Colors": {"title": "Colors", "required": ["primary", "accent", "secondary", "success", "info", "warning", "error"], "type": "object", "properties": {"primary": {"title": "Primary", "type": "string"}, "accent": {"title": "Accent", "type": "string"}, "secondary": {"title": "Secondary", "type": "string"}, "success": {"title": "Success", "type": "string"}, "info": {"title": "Info", "type": "string"}, "warning": {"title": "Warning", "type": "string"}, "error": {"title": "Error", "type": "string"}}}, "HTTPValidationError": {"title": "HTTPValidationError", "type": "object", "properties": {"detail": {"title": "Detail", "type": "array", "items": {"$ref": "#/components/schemas/ValidationError"}}}}, "Meal": {"title": "Meal", "required": ["date", "dateText"], "type": "object", "properties": {"slug": {"title": "Slug", "type": "string"}, "name": {"title": "Name", "type": "string"}, "date": {"title": "Date", "type": "string", "format": "date"}, "dateText": {"title": "Datetext", "type": "string"}, "image": {"title": "Image", "type": "string"}, "description": {"title": "Description", "type": "string"}}}, "MealPlan": {"title": "MealPlan", "required": ["startDate", "endDate", "meals"], "type": "object", "properties": {"uid": {"title": "Uid", "type": "string"}, "startDate": {"title": "Startdate", "type": "string", "format": "date"}, "endDate": {"title": "Enddate", "type": "string", "format": "date"}, "meals": {"title": "Meals", "type": "array", "items": {"$ref": "#/components/schemas/Meal"}}}, "example": {"startDate": "2021-01-07", "endDate": "2021-01-07", "meals": [{"slug": "Packed Mac and Cheese", "date": "2021-01-07"}, {"slug": "Eggs and Toast", "date": "2021-01-07"}]}}, "Recipe": {"title": "Recipe", "required": ["name"], "type": "object", "properties": {"name": {"title": "Name", "type": "string"}, "description": {"title": "Description", "type": "string"}, "image": {"title": "Image"}, "recipeYield": {"title": "Recipeyield", "type": "string"}, "recipeIngredient": {"title": "Recipeingredient", "type": "array", "items": {}}, "recipeInstructions": {"title": "Recipeinstructions", "type": "array", "items": {}}, "totalTime": {"title": "Totaltime"}, "slug": {"title": "Slug", "type": "string", "default": ""}, "categories": {"title": "Categories", "type": "array", "items": {"type": "string"}}, "tags": {"title": "Tags", "type": "array", "items": {"type": "string"}}, "dateAdded": {"title": "Dateadded", "type": "string", "format": "date"}, "notes": {"title": "Notes", "type": "array", "items": {"$ref": "#/components/schemas/RecipeNote"}}, "rating": {"title": "Rating", "type": "integer"}, "orgURL": {"title": "Orgurl", "type": "string"}, "extras": {"title": "Extras", "type": "array", "items": {"type": "string"}}}, "example": {"name": "Chicken and Rice With Leeks and Salsa Verde", "description": "This one-skillet dinner gets deep oniony flavor from lots of leeks cooked down to jammy tenderness.", "image": "chicken-and-rice-with-leeks-and-salsa-verde.jpg", "recipeYield": "4 Servings", "recipeIngredient": ["1 1/2 lb. skinless, boneless chicken thighs (4-8 depending on size)", "Kosher salt, freshly ground pepper", "3 Tbsp. unsalted butter, divided"], "recipeInstructions": [{"text": "Season chicken with salt and pepper."}], "slug": "chicken-and-rice-with-leeks-and-salsa-verde", "tags": ["favorite", "yummy!"], "categories": ["Dinner", "Pasta"], "notes": [{"title": "Watch Out!", "text": "Prep the day before!"}], "orgURL": "https://www.bonappetit.com/recipe/chicken-and-rice-with-leeks-and-salsa-verde", "rating": 3}}, "RecipeNote": {"title": "RecipeNote", "required": ["title", "text"], "type": "object", "properties": {"title": {"title": "Title", "type": "string"}, "text": {"title": "Text", "type": "string"}}}, "SiteSettings": {"title": "SiteSettings", "required": ["webhooks"], "type": "object", "properties": {"name": {"title": "Name", "type": "string", "default": "main"}, "webhooks": {"$ref": "#/components/schemas/Webhooks"}}}, "SiteTheme": {"title": "SiteTheme", "required": ["name", "colors"], "type": "object", "properties": {"name": {"title": "Name", "type": "string"}, "colors": {"$ref": "#/components/schemas/Colors"}}}, "ValidationError": {"title": "ValidationError", "required": ["loc", "msg", "type"], "type": "object", "properties": {"loc": {"title": "Location", "type": "array", "items": {"type": "string"}}, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}}}, "Webhooks": {"title": "Webhooks", "required": ["webhookTime", "enabled"], "type": "object", "properties": {"webhookTime": {"title": "Webhooktime", "type": "string"}, "webhookURLs": {"title": "Webhookurls", "type": "array", "items": {"type": "string"}}, "enabled": {"title": "Enabled", "type": "boolean"}}}}}};
Redoc.init(spec, {}, document.getElementById("redoc-container"));
</script>
</body>
</html>