Files
Django_TasksApp/main/food/api_urls.py
T

64 lines
3.7 KiB
Python

from django.urls import path
from . import api, api_schema, nutrition_api
from recipes import api as recipe_api
from stress import api as stress_api
from dreams import api as dream_api
from groceries import api as grocery_api
urlpatterns = [
path('auth/whoami/', api.whoami),
path('stress/', stress_api.collection),
path('stress/<uuid:identifier>/', stress_api.item),
path('dreams/', dream_api.collection),
path('dreams/<uuid:identifier>/', dream_api.item),
path('schema/', api_schema.schema),
path('food/today/', api.today),
path('food/products/', api.products),
path('food/products/lookup/', api.product_lookup),
path('food/products/create/', api.product_create),
path('food/products/import/', api.product_import),
path('food/log/', api.log_create),
path('food/log/<uuid:identifier>/', api.log_item),
path('food/log/<uuid:identifier>/attachments/', api.attachment_create),
path('food/attachments/<uuid:identifier>/file/', api.attachment_file),
path('food/attachments/<uuid:identifier>/', api.attachment_delete),
path('kitchen/items/', api.inventory_collection),
path('nutrition/preview/', nutrition_api.preview),
path('nutrition/commit/', nutrition_api.commit),
path('nutrition/ingredients/', nutrition_api.ingredients),
path('nutrition/ingredients/<uuid:identifier>/', nutrition_api.ingredient_correct),
path('kitchen/import-groceries/', api.inventory_import_groceries),
path('kitchen/bulk-update/', api.inventory_bulk_update),
path('kitchen/bulk-delete/', api.inventory_bulk_delete),
path('kitchen/items/<uuid:identifier>/', api.inventory_item),
path('kitchen/stock/', api.inventory_stock),
path('kitchen/consumption/preview/', api.inventory_preview),
path('kitchen/consumption/', api.inventory_consume),
path('kitchen/consumption/<uuid:identifier>/undo/', api.inventory_undo),
path('hydration/daily/', api.hydration_daily),
path('hydration/manual/', api.hydration_log),
path('hydration/manual/<uuid:identifier>/', api.hydration_manual_entry),
path('hydration/settings/', api.hydration_settings),
path('groceries/', grocery_api.collection),
path('groceries/<uuid:identifier>/', grocery_api.item),
path('groceries/recipe/<uuid:identifier>/', grocery_api.recipe_import),
path('recipes/', recipe_api.recipe_search),
path('recipes/cook-later/', recipe_api.recipe_cook_later_collection),
path('recipes/cook-later/<uuid:identifier>/', recipe_api.recipe_cook_later_item),
path('recipes/create/', recipe_api.recipe_create),
path('recipes/compositions/preview/', recipe_api.recipe_composition_preview),
path('recipes/compositions/', recipe_api.recipe_composition_create),
path('recipes/<uuid:identifier>/', recipe_api.recipe_item),
path('recipes/<uuid:identifier>/links/', recipe_api.recipe_links),
path('recipes/<uuid:identifier>/links/<uuid:link_id>/', recipe_api.recipe_link_item),
path('recipes/<uuid:identifier>/variations/', recipe_api.recipe_variation),
path('recipes/<uuid:identifier>/ingredients/', recipe_api.recipe_ingredient_create),
path('recipes/<uuid:identifier>/ingredients/<int:item_id>/', recipe_api.recipe_ingredient_item),
path('recipes/<uuid:identifier>/subrecipes/', recipe_api.recipe_subrecipe_create),
path('recipes/<uuid:identifier>/subrecipes/<int:item_id>/', recipe_api.recipe_subrecipe_delete),
path('recipes/<uuid:identifier>/stock/preview/', recipe_api.recipe_stock_preview),
path('recipes/<uuid:identifier>/stock/confirm/', recipe_api.recipe_stock_confirm),
path('recipes/stock-use/<uuid:identifier>/undo/', recipe_api.recipe_stock_undo),
path('recipes/<uuid:identifier>/log/', recipe_api.recipe_log),
]