.. include:: globals.rst .. include:: isonum.txt .. _Schemas: Schemas ======= .. _Queries: Queries ####### .. _Balancer: Balancer ******** Balancer The balancer splits your ingredients into taste sections. ------------ Fields: ------- * **allSections** |lsqb| :ref:`BalancerSection ` |rsqb| * **section** (taste) :ref:`BalancerSection ` .. _BalancerSection: BalancerSection *************** Fields: ------- * **counterTastes** |lsqb| :ref:`Taste ` |rsqb| Keywords that describe what kind of ingredients balance out the taste of this section. * **selected** |lsqb| :ref:`Ingredient ` |rsqb| * **suggested** |lsqb| :ref:`Ingredient ` |rsqb| * **taste** :ref:`Taste ` .. _Blueprint: Blueprint ********* Blueprint for a recipe. When ingredients are passed to a blueprint, it generates instructions. Instruction is a simple text, returned together with ingredients it should be applied to and an icon. The blueprint inside consists of steps. Each step is either a simple text that is directly turned into an instruction, or a method that can generate multiple instructions. ------------ In query use name: **blueprints** ------------ Fields: ------- * **id** ID * **availableLanguages** |lsqb| :ref:`Language ` |rsqb| * **created** DateTime * **dishes** (tagsAnd, tagsOr, isOwn, pagination, djangoFilter, ids, search, id) |lsqb| :ref:`Dish ` |rsqb| * **instructions** (ingredients) |lsqb| :ref:`Instruction ` |rsqb| Pass a list of ingredient ids to get a set of instructions. * **modified** DateTime * **name** String Name for internal use. * **originalLanguage** :ref:`Language ` * **ownerName** String Filter only objects that belong to this owner * **steps** (tagsAnd, tagsOr, isOwn, pagination, djangoFilter, ids, id, text, evaluationOrder) |lsqb| :ref:`Step ` |rsqb| * **tagAsValue** (tag, field) TagValue * **tags** (shared, isOwn, pagination, djangoFilter, id, name, category) |lsqb| :ref:`Tag ` |rsqb| * **tagsAsBoolean** (tags, mode) Boolean ------------ Arguments: ---------- * **id** ID * **isOwn** Boolean If true filters only my objects, opposite if false. * **name** String Name in the active language. * **tagsAnd** |lsqb| ID |rsqb| Filter objects that have all these Tags * **tagsOr** |lsqb| ID |rsqb| Filter objects that have any of these Tags .. _Dish: Dish **** Dish as a general genre. A dish connects blueprint, ratio and ingredient blacklist to enable creating recipes that fall into a specific category. Stew makes for a good example. There are only small differences between Hungarian gulash, Indian daal and Russian Borscht. Instruction to make these three dishes are the same, so they use the same blueprint. Gulash and daal are heavy on spices, so these will have a slightly different Ratio. All three of them have to be limited to their regional ingredients and that's what the Dish itself supplies, as well as an image and other meta information. ------------ In query use name: **dishes** ------------ Fields: ------- * **id** ID * **adaptableToTags** (category) |lsqb| :ref:`Tag ` |rsqb| * **blueprint** :ref:`Blueprint ` * **components** (tagsAnd, tagsOr, isOwn, djangoFilter, id, dish, mandatory) |lsqb| :ref:`DishComponent ` |rsqb| * **created** DateTime * **description** (forceField) MultilingualValue * **estimatedPreparationTime** Int Rough estimate of how long does this dish take to cook, including prep and waiting time. * **featuredRecipeUri** String * **image** :ref:`Image ` * **ingredientBlacklist** |lsqb| :ref:`Ingredient ` |rsqb| Ingredients not compatible with this dish. * **ingredientMasks** |lsqb| :ref:`IngredientMask ` |rsqb| Masks that are applied to ingredient match scores. * **mandatoryIngredients** (targetIngredient, contextIngredients) |lsqb| :ref:`Ingredient ` |rsqb| Mandatory ingredients based on components. * **modified** DateTime * **name** (forceField) MultilingualValue * **ownerName** String Filter only objects that belong to this owner * **productWhitelist** (tagsAnd, tagsOr, searchName, isOwn, pagination, djangoFilter, ids, id, multilingualName, name, ean, brand) |lsqb| :ref:`Product ` |rsqb| * **ratio** :ref:`Ratio ` * **recipeNote** (forceField) MultilingualValue * **recipeUri** (ingredients, products) String * **searchScore** Float * **serving** :ref:`Serving ` * **substitutableIngredients** (ingredients) |lsqb| :ref:`Ingredient ` |rsqb| For a list of ingredients return those that are substitutable in the context of this dish. * **substituteIngredient** (targetIngredient, contextIngredients) |lsqb| :ref:`Ingredient ` |rsqb| Suggest a substitution for a . * **substitutionOverrides** (isOwn, id, dish) |lsqb| :ref:`SubstitutionOverride ` |rsqb| * **suggestedIngredients** (contextIngredients, mode, adaptToTags) |lsqb| :ref:`Ingredient ` |rsqb| Suggest a list of matching ingredients to . * **tagAsValue** (tag, field) TagValue * **tags** (shared, isOwn, pagination, djangoFilter, id, name, category) |lsqb| :ref:`Tag ` |rsqb| * **tagsAsBoolean** (tags, mode) Boolean ------------ Arguments: ---------- * **id** ID * **djangoFilter** :ref:`DjangoFilterInput ` This enables a direct connection to the PostgreSQL database through Django lookups (i.e.: ``id__in=[1,2,3]``). The lookup string to have the format ``key1=lookup1&key2=lookup2``, where keys will be evaluated as a string and lookups as Python literals. Multiple lookups chain in and AND relationship. Allowing for inputting a list or a set of values. Ordering is done using the ``order_by`` field. Enter the order field in a snake_case and use ``-`` to reverse as in ``-order``. More on lookups in the Django `documentation`_. * **ids** |lsqb| ID |rsqb| * **isOwn** Boolean If true filters only my objects, opposite if false. * **pagination** :ref:`PaginationInput ` * **search** :ref:`DishSearchInput ` Finds dishes that best match the query. Ingredient and keyword search is evaluated separately and match score from each is combined with equal weight to produce the results. Keyword search does not support multilinguality and currently works with English only. ingredients finds dishes based on ingredients they are often associated with keywords finds dishes based on keywords that appear in the dish name or description * **tagsAnd** |lsqb| ID |rsqb| Filter objects that have all these Tags * **tagsOr** |lsqb| ID |rsqb| Filter objects that have any of these Tags .. _DishComponent: DishComponent ************* Necessary or recommended component of a dish. Pizza necessarily needs a pizza dough. However, you can use any flat bread and it works. Pastry dough, butter dough or quiche dough turn out just fine for a pizza too. Dish component defines one selection that might be necessary to be made when creating a recipe for this dish. Components with a default selection of ingredients can be safely skipped during the creation, but the components with min_count >= 0 and no default ingredients need to force a selection in order for the final recipe to work. Each component can be accompanied by a header or message to comment on the choice. ------------ In query use name: **dishComponents** ------------ Fields: ------- * **id** ID * **dish** :ref:`Dish ` * **dishcomponentingredientthroughSet** |lsqb| :ref:`DishComponentIngredientThrough ` |rsqb| * **header** (forceField) MultilingualValue * **image** :ref:`Image ` * **ingredients** (tagsAnd, tagsOr, searchName, isOwn, pagination, djangoFilter, ids, matchTo, id, modelName, name) |lsqb| :ref:`Ingredient ` |rsqb| * **isPublic** Boolean * **lifAcceptMinCountZero** Boolean Historically, the behavior of LIF was to bump component's min_count to 1 if it was 0. This flag allows to preserve this behavior (field is not checked) while also giving an option to keep the min_count at 0 during LIF evaluation (field is checked). * **mandatory** Boolean * **maxCount** Int Recommended maximum count of ingredients to select if the component is used to present the selection to an end-user. * **message** (forceField) MultilingualValue * **minCount** Int Minimum count of ingredients needed in a recipe to make it complete. The component is considered mandatory in a dish if min_count >= 1. * **name** (forceField) MultilingualValue * **ordering** Int * **owner** :ref:`Client ` * **ownerName** String Filter only objects that belong to this owner * **tagAsValue** (tag, field) TagValue * **tags** (shared, isOwn, pagination, djangoFilter, id, name, category) |lsqb| :ref:`Tag ` |rsqb| * **tagsAsBoolean** (tags, mode) Boolean ------------ Arguments: ---------- * **id** ID * **dish** ID * **djangoFilter** :ref:`DjangoFilterInput ` This enables a direct connection to the PostgreSQL database through Django lookups (i.e.: ``id__in=[1,2,3]``). The lookup string to have the format ``key1=lookup1&key2=lookup2``, where keys will be evaluated as a string and lookups as Python literals. Multiple lookups chain in and AND relationship. Allowing for inputting a list or a set of values. Ordering is done using the ``order_by`` field. Enter the order field in a snake_case and use ``-`` to reverse as in ``-order``. More on lookups in the Django `documentation`_. * **isOwn** Boolean If true filters only my objects, opposite if false. * **mandatory** Boolean * **tagsAnd** |lsqb| ID |rsqb| Filter objects that have all these Tags * **tagsOr** |lsqb| ID |rsqb| Filter objects that have any of these Tags .. _DishComponentIngredientThrough: DishComponentIngredientThrough ****************************** Use this model to find default ingredients for given components. ------------ In query use name: **dishComponentIngredients** ------------ Fields: ------- * **id** ID * **component** :ref:`DishComponent ` * **default** Boolean * **ingredient** :ref:`Ingredient ` * **isPublic** Boolean * **owner** :ref:`Client ` * **ownerName** String Filter only objects that belong to this owner ------------ Arguments: ---------- * **isOwn** Boolean If true filters only my objects, opposite if false. .. _Icon: Icon **** Icon(id, owner, is_public, name, image) ------------ In query use name: **icons** ------------ Fields: ------- * **id** ID * **image** String * **ingredientSet** |lsqb| :ref:`Ingredient ` |rsqb| * **isPublic** Boolean * **methodSet** |lsqb| :ref:`Method ` |rsqb| * **name** String Name for internal use. * **owner** :ref:`Client ` * **ownerName** String Filter only objects that belong to this owner * **productSet** |lsqb| :ref:`Product ` |rsqb| * **stepSet** |lsqb| :ref:`Step ` |rsqb| * **tagSet** |lsqb| :ref:`Tag ` |rsqb| * **url** String ------------ Arguments: ---------- * **id** ID * **djangoFilter** :ref:`DjangoFilterInput ` This enables a direct connection to the PostgreSQL database through Django lookups (i.e.: ``id__in=[1,2,3]``). The lookup string to have the format ``key1=lookup1&key2=lookup2``, where keys will be evaluated as a string and lookups as Python literals. Multiple lookups chain in and AND relationship. Allowing for inputting a list or a set of values. Ordering is done using the ``order_by`` field. Enter the order field in a snake_case and use ``-`` to reverse as in ``-order``. More on lookups in the Django `documentation`_. * **isOwn** Boolean If true filters only my objects, opposite if false. * **name** String * **pagination** :ref:`PaginationInput ` .. _Image: Image ***** Image(id, owner, is_public, name, image) ------------ In query use name: **images** ------------ Fields: ------- * **id** ID * **croppedUrl** (rendition) String Cropped version (400x400 rendition by default) * **image** String * **name** String Name for internal use. * **ownerName** String Filter only objects that belong to this owner * **thumbnailUrl** (rendition) String Thumbnail version (20x20 rendition by default) * **url** String ------------ Arguments: ---------- * **id** ID * **djangoFilter** :ref:`DjangoFilterInput ` This enables a direct connection to the PostgreSQL database through Django lookups (i.e.: ``id__in=[1,2,3]``). The lookup string to have the format ``key1=lookup1&key2=lookup2``, where keys will be evaluated as a string and lookups as Python literals. Multiple lookups chain in and AND relationship. Allowing for inputting a list or a set of values. Ordering is done using the ``order_by`` field. Enter the order field in a snake_case and use ``-`` to reverse as in ``-order``. More on lookups in the Django `documentation`_. * **isOwn** Boolean If true filters only my objects, opposite if false. * **name** String * **pagination** :ref:`PaginationInput ` .. _Ingredient: Ingredient ********** Ingredient. model_name: identifier for the Neural Network name: translated field Filters: tagsAnd `[]`: filter ingredients that have ALL the tags tagsOr `[]`: filter ingredients that have at least ONE of the tags matchTo `[]`: adds a field match_score -how well does the ingredient fit the input ids similarTo ``: adds a field similarity_score -how similar is an ingredient to the input ------------ In query use name: **ingredients** ------------ Fields: ------- * **id** ID * **created** DateTime * **icon** :ref:`Icon ` * **matchScore** Float * **measure** (isOwn) :ref:`Measure ` * **methodData** (isOwn, id) |lsqb| :ref:`MethodData ` |rsqb| * **modified** DateTime * **name** (forceField) MultilingualValue * **ownerName** String Filter only objects that belong to this owner * **products** (tagsAnd, tagsOr, searchName, isOwn, pagination, djangoFilter, ids, id, multilingualName, name, ean, brand) |lsqb| :ref:`Product ` |rsqb| * **similarityScore** Float * **substitutes** (tagsAnd, tagsOr, searchName, isOwn, pagination, djangoFilter, ids, matchTo, id, modelName, name) |lsqb| :ref:`Ingredient ` |rsqb| * **tagAsValue** (tag, field) TagValue * **tags** (shared, isOwn, pagination, djangoFilter, id, name, category) |lsqb| :ref:`Tag ` |rsqb| * **tagsAsBoolean** (tags, mode) Boolean ------------ Arguments: ---------- * **id** ID * **djangoFilter** :ref:`DjangoFilterInput ` This enables a direct connection to the PostgreSQL database through Django lookups (i.e.: ``id__in=[1,2,3]``). The lookup string to have the format ``key1=lookup1&key2=lookup2``, where keys will be evaluated as a string and lookups as Python literals. Multiple lookups chain in and AND relationship. Allowing for inputting a list or a set of values. Ordering is done using the ``order_by`` field. Enter the order field in a snake_case and use ``-`` to reverse as in ``-order``. More on lookups in the Django `documentation`_. * **ids** |lsqb| ID |rsqb| * **isOwn** Boolean If true filters only my objects, opposite if false. * **matchTo** |lsqb| ID |rsqb| The Foodpairing Fiter. Pass ingredient ids as input to the matchTo filter. The filter will set a value `matchScore` for each ingredient that tells you how well does it match to the ingredients you pass in. * **modelName** String * **name** String `name_value` in the active language. * **pagination** :ref:`PaginationInput ` * **searchName** String The fuzzy name filter. Pass name or a part of the name you're searching for. First results are items that start with the search string, followed by trigram similar items and lastly items that merely contain the passed string. * **tagsAnd** |lsqb| ID |rsqb| Filter objects that have all these Tags * **tagsOr** |lsqb| ID |rsqb| Filter objects that have any of these Tags .. _IngredientMask: IngredientMask ************** A mask can affect the result of suggested ingredients and substitutions. Matching ingredients is fairly static, and only varies based on a given selection of ingredients. So for the most part, a potato's good matches will stay the same. However, the context of how the potato is used can vary, and in those cases, you might want to nudge matches up or down. This is the job of the mask. Masks can be combined, and can be applied through Meta. ------------ In query use name: **ingredientMasks** ------------ Fields: ------- * **id** ID * **created** DateTime * **description** String Short description with the purpose of this mask * **dishes** (tagsAnd, tagsOr, isOwn, pagination, djangoFilter, ids, search, id) |lsqb| :ref:`Dish ` |rsqb| * **modified** DateTime * **name** (forceField) MultilingualValue * **nameInternal** String Name for internal use. * **ownerName** String Filter only objects that belong to this owner * **tagAsValue** (tag, field) TagValue * **tags** (shared, isOwn, pagination, djangoFilter, id, name, category) |lsqb| :ref:`Tag ` |rsqb| * **tagsAsBoolean** (tags, mode) Boolean * **values** |lsqb| :ref:`MaskValue ` |rsqb| * **weight** Float weight that this mask should be multiplied with ------------ Arguments: ---------- * **id** ID * **ids** |lsqb| ID |rsqb| * **isOwn** Boolean If true filters only my objects, opposite if false. * **name** String * **searchName** String The fuzzy name filter. Pass name or a part of the name you're searching for. First results are items that start with the search string, followed by trigram similar items and lastly items that merely contain the passed string. * **tagsAnd** |lsqb| ID |rsqb| Filter objects that have all these Tags * **tagsOr** |lsqb| ID |rsqb| Filter objects that have any of these Tags .. _IngredientUnitRanges: IngredientUnitRanges ******************** An object that carries information about allowed units and their counts for a specific ingredient within a given Units System. For each feasible amount of an ingredient measured in grams to provides a corresponding unit and it's count. ------------ Fields: ------- * **ingredient** :ref:`Ingredient ` * **unitRanges** |lsqb| :ref:`UnitRange ` |rsqb| For given ingredient measure computes possible units and their unit_counts within min-max limits and units system. .. _Instruction: Instruction *********** Instruction. An instruction for the recipe reader. Each instrucion has text and icon to display and a list of ingredients that it applies to. If an instruction has been generated by a special method, it also has access to its object. ------------ Fields: ------- * **displayVolume** Boolean * **icon** :ref:`Icon ` * **ingredients** |lsqb| :ref:`Ingredient ` |rsqb| Ingredients this instruction applies to. * **method** String Method that generated this instruction. * **order** Int * **text** String * **volumeModifier** Float .. _MaskValue: MaskValue ********* The value of a given ingredient in a mask. ------------ In query use name: **maskValues** ------------ Fields: ------- * **id** ID * **ingredient** :ref:`Ingredient ` * **isPublic** Boolean * **mask** :ref:`IngredientMask ` * **owner** :ref:`Client ` * **ownerName** String Filter only objects that belong to this owner * **value** Float Value of an ingredient's influence on a given mask. ------------ Arguments: ---------- * **isOwn** Boolean If true filters only my objects, opposite if false. .. _Measure: Measure ******* Measure is an unique object for each ingredient that carries information about volume convertions and allowed units. ``dry_weight_multiplier`` value represents how much does the weight increse after processing (boiling) the food. ------------ In query use name: **measures** ------------ Fields: ------- * **id** ID * **dryWeightMultiplier** Float What is the ratio between i.e. dry beans and soaked beans? * **gramsPerMl** Float How many grams per 1 ml? * **gramsPerPiece** Float How many grams per piece? * **ingredient** :ref:`Ingredient ` * **isPublic** Boolean * **maxValue** Float Maximal value per portion in grams * **minValue** Float Minimal value per portion in grams * **owner** :ref:`Client ` * **ownerName** String Filter only objects that belong to this owner * **units** (isOwn) |lsqb| :ref:`Unit ` |rsqb| ------------ Arguments: ---------- * **isOwn** Boolean If true filters only my objects, opposite if false. .. _Method: Method ****** Makes a blueprint step return 1 or more instructions based on Python code. Handles non-linearities in recipes such as different times of prepration for each ingredient. Example: Roast method - splits ingredients into oils, aromas and other. Returns multiple steps that say in which order and at what time to add ingredients in the oven and to splash them with the selected oil. ------------ In query use name: **methods** ------------ Fields: ------- * **id** ID * **availableLanguages** |lsqb| :ref:`Language ` |rsqb| * **created** DateTime * **definition** String * **icon** :ref:`Icon ` * **instructions** (ingredients) |lsqb| :ref:`Instruction ` |rsqb| Pass a list of ingredient ids to get a set of instructions. * **modified** DateTime * **name** String Non-translated internal name. * **originalLanguage** :ref:`Language ` * **ownerName** String Filter only objects that belong to this owner * **tagAsValue** (tag, field) TagValue * **tags** (shared, isOwn, pagination, djangoFilter, id, name, category) |lsqb| :ref:`Tag ` |rsqb| * **tagsAsBoolean** (tags, mode) Boolean * **time** Int ------------ Arguments: ---------- * **id** ID * **definition** String Pseudo-code definition of the method. * **isOwn** Boolean If true filters only my objects, opposite if false. * **name** String Name in the active language. * **tagsAnd** |lsqb| ID |rsqb| Filter objects that have all these Tags * **tagsOr** |lsqb| ID |rsqb| Filter objects that have any of these Tags .. _MethodData: MethodData ********** Data for the methods. A method might need information about each ingredient such as preparation time or temperature. Each ingredient is connected to a single MethodData object that holds a 'data' dictionary of all the possible parameters. ------------ In query use name: **methodData** ------------ Fields: ------- * **id** ID * **created** DateTime * **data** JSONString * **modified** DateTime * **ownerName** String Filter only objects that belong to this owner ------------ Arguments: ---------- * **id** ID * **isOwn** Boolean If true filters only my objects, opposite if false. .. _MultilingualName: MultilingualName **************** MultilingualName is represented by a CharField in the database. It is suitable for lookup and has a length of up to 80 characters. ------------ In query use name: **multilingualNames** ------------ Fields: ------- * **id** ID * **ar** String Arabic * **cs** String Czech * **da** String Danish * **de** String Deutsch * **deAt** String German (Austria) * **en** String English * **es** String Spanish * **es419** String Spanish (Latin America) * **et** String Estonian * **fr** String French * **it** String Italian * **ja** String Japanese * **lt** String Lithuanian * **lv** String Latvian * **nl** String Dutch * **no** String Norwegian * **ownerName** String Filter only objects that belong to this owner * **pl** String Polish * **ptBr** String Portuguese (Brazil) * **sv** String Swedish * **zhHans** String Mandarin Chinese (Simplified) ------------ Arguments: ---------- * **id** ID * **ar** String * **cs** String * **da** String * **de** String * **deAt** String * **en** String * **es** String * **es419** String * **et** String * **fr** String * **isOwn** Boolean If true filters only my objects, opposite if false. * **it** String * **ja** String * **lt** String * **lv** String * **nl** String * **no** String * **pl** String * **ptBr** String * **sv** String * **zhHans** String .. _MultilingualText: MultilingualText **************** MultilingualText is represented by a TextField in the database. Holds longer sections of text and is not suitable for lookups. ------------ In query use name: **multilingualTexts** ------------ Fields: ------- * **id** ID * **ar** String Arabic * **cs** String Czech * **da** String Danish * **de** String Deutsch * **deAt** String German (Austria) * **en** String English * **es** String Spanish * **es419** String Spanish (Latin America) * **et** String Estonian * **fr** String French * **it** String Italian * **ja** String Japanese * **lt** String Lithuanian * **lv** String Latvian * **nl** String Dutch * **no** String Norwegian * **ownerName** String Filter only objects that belong to this owner * **pl** String Polish * **ptBr** String Portuguese (Brazil) * **sv** String Swedish * **zhHans** String Mandarin Chinese (Simplified) ------------ Arguments: ---------- * **id** ID * **ar** String * **cs** String * **da** String * **de** String * **deAt** String * **en** String * **es** String * **es419** String * **et** String * **fr** String * **isOwn** Boolean If true filters only my objects, opposite if false. * **it** String * **ja** String * **lt** String * **lv** String * **nl** String * **no** String * **pl** String * **ptBr** String * **sv** String * **zhHans** String .. _Product: Product ******* Product. A specific purchasable product, belongs to an ingredient. ------------ In query use name: **products** ------------ Fields: ------- * **id** ID * **brand** String * **country** String * **created** DateTime * **description** String * **ean** String The EAN code. * **icon** :ref:`Icon ` * **image** :ref:`Image ` * **ingredient** :ref:`Ingredient ` * **isPublic** Boolean * **isValidated** Boolean Flag confirming that product-ingredient mapping is accurate. * **modified** DateTime * **multilingualDescription** (forceField) MultilingualValue * **multilingualName** (forceField) MultilingualValue * **name** String * **nutritionalValue** Int In kilocalories * **owner** :ref:`Client ` * **ownerName** String Filter only objects that belong to this owner * **source** :ref:`ProductSource ` Data aquisition method. * **substitutes** (tagsAnd, tagsOr, searchName, isOwn, pagination, djangoFilter, ids, id, multilingualName, name, ean, brand) |lsqb| :ref:`Product ` |rsqb| * **tagAsValue** (tag, field) TagValue * **tags** (shared, isOwn, pagination, djangoFilter, id, name, category) |lsqb| :ref:`Tag ` |rsqb| * **tagsAsBoolean** (tags, mode) Boolean * **unit** :ref:`Unit ` * **weight** Int In grams * **whitelistedInDishes** |lsqb| :ref:`Dish ` |rsqb| ------------ Arguments: ---------- * **id** ID * **brand** String * **djangoFilter** :ref:`DjangoFilterInput ` This enables a direct connection to the PostgreSQL database through Django lookups (i.e.: ``id__in=[1,2,3]``). The lookup string to have the format ``key1=lookup1&key2=lookup2``, where keys will be evaluated as a string and lookups as Python literals. Multiple lookups chain in and AND relationship. Allowing for inputting a list or a set of values. Ordering is done using the ``order_by`` field. Enter the order field in a snake_case and use ``-`` to reverse as in ``-order``. More on lookups in the Django `documentation`_. * **ean** String * **ids** |lsqb| ID |rsqb| * **isOwn** Boolean If true filters only my objects, opposite if false. * **multilingualName** String `name_value` in the active language. * **name** String Name * **pagination** :ref:`PaginationInput ` * **searchName** String The fuzzy name filter. Pass name or a part of the name you're searching for. First results are items that start with the search string, followed by trigram similar items and lastly items that merely contain the passed string. * **tagsAnd** |lsqb| ID |rsqb| Filter objects that have all these Tags * **tagsOr** |lsqb| ID |rsqb| Filter objects that have any of these Tags .. _Ratio: Ratio ***** Defines a ratio between ingredients. Can be evaluated to obtain a specific Volume. Each Dish points to a root Ratio. The root Ratio is static and defines the portion weight for the Dish. The total of ingredient volumes add up to this value. The volumes are then split between the root Ratio's children Ratios based on `Ratio.ratio`. ------------ In query use name: **ratios** ------------ Fields: ------- * **id** ID * **children** (isOwn, id, name) |lsqb| :ref:`Ratio ` |rsqb| * **created** DateTime * **ingredients** (tagsAnd, tagsOr, searchName, isOwn, pagination, djangoFilter, ids, matchTo, id, modelName, name) |lsqb| :ref:`Ingredient ` |rsqb| * **modified** DateTime * **name** String Name of the DishRatio component, for internal use. * **ownerName** String Filter only objects that belong to this owner * **parent** (isOwn, id, name) :ref:`Ratio ` * **ratio** Int On the root ratio level this value defines the total weight. * **static** Boolean If checked, the ratio will not be interpreted as a ratio, but as a static weight in grams. * **volumes** (ingredients, weight, portions, unitSelection) |lsqb| :ref:`Volume ` |rsqb| ------------ Arguments: ---------- * **id** ID * **isOwn** Boolean If true filters only my objects, opposite if false. * **name** String .. _Recipe: Recipe ****** An instance of a dish with a set of ingredients. A generated recipe provides direct access to instructions, volumes and substitutions that are all specific to the combination of a particular dish and set of ingredients. ------------ Fields: ------- * **availableTags** (category) |lsqb| :ref:`Tag ` |rsqb| Tags that are not currently applied to the recipe, but can be. * **description** String * **dish** :ref:`Dish ` * **estimatedPreparationTime** Int * **image** :ref:`Image ` * **ingredients** |lsqb| :ref:`Ingredient ` |rsqb| * **instructions** (ingredients) |lsqb| :ref:`Instruction ` |rsqb| Pass a list of ingredient ids to get a set of instructions. * **name** String * **products** |lsqb| :ref:`Product ` |rsqb| * **serving** :ref:`Serving ` * **substitutions** |lsqb| :ref:`Substitution ` |rsqb| Available substitutions for this particular recipe. * **tagAsValue** (tag, field) TagValue * **tags** (category) |lsqb| :ref:`Tag ` |rsqb| Tags that currently apply to the recipe. * **tagsAsBoolean** (tags, mode) Boolean * **volumes** (ingredients, weight, portions, unitSelection) |lsqb| :ref:`Volume ` |rsqb| .. _Serving: Serving ******* Serving(id, owner, is_public, name, amount) ------------ In query use name: **servings** ------------ Fields: ------- * **id** ID * **amount** Float Amount of per serving. I.e. 6 . * **dish** :ref:`Dish ` * **isPublic** Boolean * **name** (forceField) MultilingualValue * **owner** :ref:`Client ` * **ownerName** String Filter only objects that belong to this owner ------------ Arguments: ---------- * **isOwn** Boolean If true filters only my objects, opposite if false. .. _Step: Step **** Generates recipe instructions. Multiple steps create blueprints. Given ingredients as input, the step can generate an instruction. If text is specified, the instruction will contain that text and ingredients that overlap between the input and the step's ingredients. If a method is specified, both the text and ingredients returned will be generated by Python code in the method definition. Fields: evaluation_order: what order to evaluate the steps in (and exclude ingredients) display_order: order of the instructions after evaluation ingredients: what ingredients does the step apply to method: alternative to text, see the Method type text: Text to display. Can use placeholders: ``{ingredients}`` - display all ingredients ``{ids: 1,2}`` - display ingredients 1,2, exclude them from above {ingredients} ``{blueprint: 12}`` - evaluate as a blueprint ``{tag:oils}`` - ingredients with tag "oils" ``{tag:oils:components}`` - ingredients with tag oils from category components condition: Evaluated as a Python literal casted to bool. If the condition is ``False``, this step will be skipped. display_volume: volume_modifier: ------------ In query use name: **steps** ------------ Fields: ------- * **id** ID * **availableLanguages** |lsqb| :ref:`Language ` |rsqb| * **blueprint** (tagsAnd, tagsOr, isOwn, id, name) :ref:`Blueprint ` * **displayOrder** Int Determines in what order are instructions going to be shown after evaluation. * **displayVolume** Boolean * **evaluationOrder** Int Determines in what order are the steps going to be evaluated. * **excludeSteps** (tagsAnd, tagsOr, isOwn, pagination, djangoFilter, ids, id, text, evaluationOrder) |lsqb| :ref:`Step ` |rsqb| * **formatText** (ingredients, translate, language) String Pass a list of ingredient ids to replace placeholders with their names. * **ingredients** (tagsAnd, tagsOr, searchName, isOwn, pagination, djangoFilter, ids, matchTo, id, modelName, name) |lsqb| :ref:`Ingredient ` |rsqb| * **instructions** (ingredients) |lsqb| :ref:`Instruction ` |rsqb| Pass a list of ingredient ids to get a set of instructions. * **method** (tagsAnd, tagsOr, isOwn, id, name, definition) :ref:`Method ` * **ownerName** String Filter only objects that belong to this owner * **tagAsValue** (tag, field) TagValue * **tags** (shared, isOwn, pagination, djangoFilter, id, name, category) |lsqb| :ref:`Tag ` |rsqb| * **tagsAsBoolean** (tags, mode) Boolean * **text** String * **volumeModifier** Float ------------ Arguments: ---------- * **id** ID * **djangoFilter** :ref:`DjangoFilterInput ` This enables a direct connection to the PostgreSQL database through Django lookups (i.e.: ``id__in=[1,2,3]``). The lookup string to have the format ``key1=lookup1&key2=lookup2``, where keys will be evaluated as a string and lookups as Python literals. Multiple lookups chain in and AND relationship. Allowing for inputting a list or a set of values. Ordering is done using the ``order_by`` field. Enter the order field in a snake_case and use ``-`` to reverse as in ``-order``. More on lookups in the Django `documentation`_. * **evaluationOrder** Int * **ids** |lsqb| ID |rsqb| * **isOwn** Boolean If true filters only my objects, opposite if false. * **pagination** :ref:`PaginationInput ` * **tagsAnd** |lsqb| ID |rsqb| Filter objects that have all these Tags * **tagsOr** |lsqb| ID |rsqb| Filter objects that have any of these Tags * **text** String .. _SubstitutionOverride: SubstitutionOverride ******************** Force a substitution. If you're not happy with what the algorithm suggest as a substitute for an ingredient in your dish, you can override the algorithm by your own choice. Such an override is specific to a dish-ingredient-ingredient triplet. It does not matter what direction you place the ingredients (a/b), they will become mutual substitute both ways. ------------ In query use name: **substitutionOverrides** ------------ Fields: ------- * **id** ID * **dish** :ref:`Dish ` * **ingredientA** :ref:`Ingredient ` * **ingredientB** :ref:`Ingredient ` * **isPublic** Boolean * **owner** :ref:`Client ` * **ownerName** String Filter only objects that belong to this owner ------------ Arguments: ---------- * **id** ID * **dish** ID * **isOwn** Boolean If true filters only my objects, opposite if false. .. _Tag: Tag *** Tags are custom labels available on certain models. Name and category are together a unique pair. ------------ In query use name: **tags** ------------ Fields: ------- * **id** ID * **blueprints** (tagsAnd, tagsOr, isOwn, id, name) |lsqb| :ref:`Blueprint ` |rsqb| * **category** String Category name for internal use. * **created** DateTime * **description** String Description for internal use * **dishComponents** (tagsAnd, tagsOr, isOwn, djangoFilter, id, dish, mandatory) |lsqb| :ref:`DishComponent ` |rsqb| * **dishes** (tagsAnd, tagsOr, isOwn, pagination, djangoFilter, ids, search, id) |lsqb| :ref:`Dish ` |rsqb| * **floatValue** Float * **icon** :ref:`Icon ` * **image** :ref:`Image ` * **ingredients** (tagsAnd, tagsOr, searchName, isOwn, pagination, djangoFilter, ids, matchTo, id, modelName, name) |lsqb| :ref:`Ingredient ` |rsqb| * **masks** (tagsAnd, tagsOr, searchName, isOwn, ids, id, name) |lsqb| :ref:`IngredientMask ` |rsqb| * **methods** (tagsAnd, tagsOr, isOwn, id, name, definition) |lsqb| :ref:`Method ` |rsqb| * **modified** DateTime * **multilingualName** (forceField) MultilingualValue * **multilingualText** (forceField) MultilingualValue * **name** String Name for internal use. * **ownerName** String Filter only objects that belong to this owner * **products** (tagsAnd, tagsOr, searchName, isOwn, pagination, djangoFilter, ids, id, multilingualName, name, ean, brand) |lsqb| :ref:`Product ` |rsqb| ------------ Arguments: ---------- * **id** ID * **category** String * **djangoFilter** :ref:`DjangoFilterInput ` This enables a direct connection to the PostgreSQL database through Django lookups (i.e.: ``id__in=[1,2,3]``). The lookup string to have the format ``key1=lookup1&key2=lookup2``, where keys will be evaluated as a string and lookups as Python literals. Multiple lookups chain in and AND relationship. Allowing for inputting a list or a set of values. Ordering is done using the ``order_by`` field. Enter the order field in a snake_case and use ``-`` to reverse as in ``-order``. More on lookups in the Django `documentation`_. * **isOwn** Boolean If true filters only my objects, opposite if false. * **name** String * **pagination** :ref:`PaginationInput ` * **shared** :ref:`SharedTagInput ` .. _Translation: Translation *********** MultilingualText is represented by a TextField in the database. Holds longer sections of text and is not suitable for lookups. ------------ In query use name: **translations** ------------ Fields: ------- * **id** ID * **ar** String Arabic * **cs** String Czech * **da** String Danish * **de** String Deutsch * **deAt** String German (Austria) * **en** String English * **es** String Spanish * **es419** String Spanish (Latin America) * **et** String Estonian * **fr** String French * **it** String Italian * **ja** String Japanese * **lt** String Lithuanian * **lv** String Latvian * **nl** String Dutch * **no** String Norwegian * **ownerName** String Filter only objects that belong to this owner * **pl** String Polish * **ptBr** String Portuguese (Brazil) * **sv** String Swedish * **zhHans** String Mandarin Chinese (Simplified) ------------ Arguments: ---------- * **id** ID * **ar** String * **cs** String * **da** String * **de** String * **deAt** String * **djangoFilter** :ref:`DjangoFilterInput ` This enables a direct connection to the PostgreSQL database through Django lookups (i.e.: ``id__in=[1,2,3]``). The lookup string to have the format ``key1=lookup1&key2=lookup2``, where keys will be evaluated as a string and lookups as Python literals. Multiple lookups chain in and AND relationship. Allowing for inputting a list or a set of values. Ordering is done using the ``order_by`` field. Enter the order field in a snake_case and use ``-`` to reverse as in ``-order``. More on lookups in the Django `documentation`_. * **en** String * **es** String * **es419** String * **et** String * **fr** String * **isOwn** Boolean If true filters only my objects, opposite if false. * **it** String * **ja** String * **lt** String * **lv** String * **nl** String * **no** String * **pagination** :ref:`PaginationInput ` * **pl** String * **ptBr** String * **sv** String * **trigramSimilar** String Similar Translation Filter. Returns existing translations that are similar to the input text. * **zhHans** String .. _Unit: Unit **** Units are aggreated in units systems that provide relevant units for ingredients, i.e. metric. ------------ In query use name: **units** ------------ Fields: ------- * **id** ID * **Order** Int Determines in what order are units selected. * **basedOnGrams** Boolean Is the unit based on grams. * **increment** Float * **isPiece** Boolean Is the unit a piece. * **isPublic** Boolean * **measures** |lsqb| :ref:`Measure ` |rsqb| * **name** (forceField) MultilingualValue * **nameInternal** String Name for internal use. * **ownerName** String Filter only objects that belong to this owner * **perPortion** Float Grams/mls per one unit. * **productSet** |lsqb| :ref:`Product ` |rsqb| * **roundingMethod** :ref:`UnitRoundingMethod ` * **system** :ref:`UnitsSystem ` * **type** :ref:`UnitType ` ------------ Arguments: ---------- * **isOwn** Boolean If true filters only my objects, opposite if false. .. _UnitCounter: UnitCounter *********** Fields: ------- * **grams** Int * **unitCount** Float An allowed unit value. .. _UnitRange: UnitRange ********* Fields: ------- * **ranges** |lsqb| :ref:`UnitCounter ` |rsqb| A list of allowed values for a unit. * **unit** :ref:`Unit ` .. _UnitsSystem: UnitsSystem *********** ------------ In query use name: **unitsSystems** ------------ Fields: ------- * **id** ID * **ingredientUnitRanges** (ingredients, portions) |lsqb| :ref:`IngredientUnitRanges ` |rsqb| For given ingredient measure computes possible units and their unit_counts within min-max limits and units system. * **name** (forceField) MultilingualValue * **ownerName** String Filter only objects that belong to this owner ------------ Arguments: ---------- * **id** ID * **isOwn** Boolean If true filters only my objects, opposite if false. * **name** String .. _Volume: Volume ****** Volume of an ingredient to use in a recipe. Every Volume is an object that allows to represent weight of an ingredient using the most appropriate Unit. Units are picked based on the weight and measurement system and amounts are converted to human-readable rounded format. ------------ Fields: ------- * **grams** Int * **ingredient** :ref:`Ingredient ` * **unit** :ref:`Unit ` * **unitCount** Float .. _Mutations: Mutations ######### .. _refreshToken: refreshToken ************ Arguments: ---------- * **token** String .. _tokenAuth: tokenAuth ********* Obtain JSON Web Token mutation ------------ Arguments: ---------- * **email** String * **expirationDelta** Int Token expiry time in seconds * **password** String .. _verifyToken: verifyToken *********** Arguments: ---------- * **token** String .. _Inputs: Inputs ###### .. _ComponentIngredientInput: ComponentIngredientInput ************************ Input fields: ------------- * **default** Boolean Should this ingredient be a default selection in this component? * **ingredient** ID Ingredient ID .. _ComponentIngredientListInput: ComponentIngredientListInput **************************** Input fields: ------------- * **action** :ref:`ListActionEnum ` * **data** |lsqb| :ref:`ComponentIngredientInput ` |rsqb| .. _DishSearchInput: DishSearchInput *************** Input fields: ------------- * **ingredients** |lsqb| ID |rsqb| Find dishes based on ingredients they are often associated with. * **keywords** String Find dishes based on keywords that appear in the dish name or description. .. _DjangoFilterInput: DjangoFilterInput ***************** Input fields: ------------- * **exclude** String Django exclude expression. Excludes all objects fitting the filter. More info on lookups at docs.djangoproject.com/en/2.2/ref/models/querysets/#id4 * **filter** String Django filter expression. Only returns objects fitting the filter. More info on lookups at docs.djangoproject.com/en/2.2/ref/models/querysets/#id4 * **orderBy** String Single attribute or a tuple of attributes to sort the list by. Is evaluated as Python expression, so simple strings need double quotes. "'-example'". `matchTo` automatically sorts by highest score, can be overriden, but `score` can't be used for this field. .. _DualIngredientInput: DualIngredientInput ******************* Input fields: ------------- * **ingredientA** ID Ingredient ID * **ingredientB** ID Ingredient ID .. _IDListInput: IDListInput *********** Input fields: ------------- * **action** :ref:`ListActionEnum ` * **ids** |lsqb| ID |rsqb| .. _IngredientRatioInput: IngredientRatioInput ******************** An input type for defining a subratio. ------------ Input fields: ------------- * **ingredients** |lsqb| ID |rsqb| * **name** String * **ratio** Int * **static** Boolean If ``True``, volumes won't be calculated as ratios but always have static amount defined in ratio field. .. _MaskValueInput: MaskValueInput ************** Input fields: ------------- * **ingredient** ID Ingredient ID * **value** Float How much influence should this ingredient have? .. _MaskValueListInput: MaskValueListInput ****************** Input fields: ------------- * **action** :ref:`ListActionEnum ` * **data** |lsqb| :ref:`MaskValueInput ` |rsqb| .. _PaginationInput: PaginationInput *************** Input fields: ------------- * **limitTo** Int Limit the results to ``n``. * **offset** Int Offset the results by ``n``. .. _QueryMeta: QueryMeta ********* End user meta information. This context is common for the query execution. ------------ Input fields: ------------- * **diets** |lsqb| :ref:`Diet ` |rsqb| Setting diets will automatically filter out incompatible dishes and ingredients. * **endUserToken** String * **language** :ref:`Language ` * **masks** |lsqb| ID |rsqb| Setting masks will automatically apply masks to ingredients match scores. * **unitsSystem** :ref:`UnitsSystemEnum ` .. _SharedTagInput: SharedTagInput ************** Input fields: ------------- * **ids** |lsqb| ID |rsqb| * **type** :ref:`ModelTypeEnum ` .. _SubstitutionListInput: SubstitutionListInput ********************* Input fields: ------------- * **action** :ref:`ListActionEnum ` * **data** |lsqb| :ref:`DualIngredientInput ` |rsqb| .. _UnitSelectionInput: UnitSelectionInput ****************** Allows to preselect a specific unit for an inredient to calculate volumes. ------------ Input fields: ------------- * **ingredient** ID * **unit** ID .. _Enums: Enums ##### .. _AnyAllNoneEnum: AnyAllNoneEnum ************** Accepted values: ---------------- * **ALL** * **ANY** * **NONE** .. _ClientLanguage: ClientLanguage ************** An enumeration. ------------ Accepted values: ---------------- * **AR** Arabic * **CS** Czech * **DA** Danish * **DE** Deutsch * **DE_AT** German (Austria) * **EN** English * **ES** Spanish * **ES_419** Spanish (Latin America) * **ET** Estonian * **FR** French * **IT** Italian * **JA** Japanese * **LT** Lithuanian * **LV** Latvian * **NL** Dutch * **NO** Norwegian * **PL** Polish * **PT_BR** Portuguese (Brazil) * **SV** Swedish * **ZH_HANS** Mandarin Chinese (Simplified) .. _Diet: Diet **** Accepted values: ---------------- * **DIABETIC** Removes ingredients high in sugar content. * **EGGFREE** Removes eggs and ingredients containing them. * **FODMAPS** Removes FODMAPS ingredients (containing significant amounts of Fermentable Oligo-, Di-, Mono-saccharides And Polyols). * **GLUTENFREE** Removes ingredients that contain gluten. * **LACTOSEFREE** Removes dairy products. * **NOMEAT** Removes meat, seafood and ingredients containing it. * **NUTFREE** Removes nuts. * **VEGAN** Removes all animal products. .. _Language: Language ******** Accepted values: ---------------- * **ARABIC** * **CZECH** * **DANISH** * **DEUTSCH** * **DUTCH** * **ENGLISH** * **ESTONIAN** * **FRENCH** * **ITALIAN** * **JAPANESE** * **LATVIAN** * **LITHUANIAN** * **NORWEGIAN** * **POLISH** * **SPANISH** * **SWEDISH** * **ar** * **cs** * **da** * **de** * **de_AT** * **en** * **es** * **es_419** * **et** * **fr** * **it** * **ja** * **lt** * **lv** * **nl** * **no** * **pl** * **pt_BR** * **sv** * **zh_Hans** .. _LanguageOrId: LanguageOrId ************ Accepted values: ---------------- * **ARABIC** * **CZECH** * **DANISH** * **DEUTSCH** * **DUTCH** * **ENGLISH** * **ESTONIAN** * **FRENCH** * **ID** * **ITALIAN** * **JAPANESE** * **LATVIAN** * **LITHUANIAN** * **NORWEGIAN** * **POLISH** * **SPANISH** * **SWEDISH** * **ar** * **cs** * **da** * **de** * **de_AT** * **en** * **es** * **es_419** * **et** * **fr** * **it** * **ja** * **lt** * **lv** * **nl** * **no** * **pl** * **pt_BR** * **sv** * **zh_Hans** .. _ListActionEnum: ListActionEnum ************** Accepted values: ---------------- * **ADD** * **CLEAN** * **REMOVE** * **SET** .. _ModelTypeEnum: ModelTypeEnum ************* Accepted values: ---------------- * **BLUEPRINT** * **DISH** * **DISHCOMPONENT** * **INGREDIENT** * **METHOD** * **PRODUCT** * **STEP** .. _ProductSource: ProductSource ************* An enumeration. ------------ Accepted values: ---------------- * **COOPSE_1** Coop Sweden 1 * **MANUAL** manual .. _RenditionEnum: RenditionEnum ************* Accepted values: ---------------- * **CROP_SQUARE_400** * **CROP_SQUARE_660** * **THUMBNAIL_20** * **THUMBNAIL_250** .. _RoleEnum: RoleEnum ******** Accepted values: ---------------- * **CLIENT_API** * **CLIENT_CMS** * **PJ_CMS** .. _SuggestionModeEnum: SuggestionModeEnum ****************** Accepted values: ---------------- * **ALL** Sends a complete list of ingredients that form a dish. * **SINGLE** Suggests a list of matching ingredients. * **VARIATION_ALL** Same as ALL, but adds random variations to the selection process. .. _TagFieldEnum: TagFieldEnum ************ Accepted values: ---------------- * **FLOAT_VALUE** * **ICON** * **IMAGE** * **NAME** * **TEXT** .. _Taste: Taste ***** Accepted values: ---------------- * **AROMA** * **BITTER** * **BLAND** * **OIL** * **SALTY** * **SOUR** * **SPICY** * **SWEET** * **UMAMI** .. _UnitRoundingMethod: UnitRoundingMethod ****************** An enumeration. ------------ Accepted values: ---------------- * **DF** Differential round * **ID** No rounding * **IN** Round to integer .. _UnitType: UnitType ******** An enumeration. ------------ Accepted values: ---------------- * **CV** Custom volume-based * **CW** Custom weight-based * **GR** Grams * **ML** Mls * **PC** Pieces .. _UnitsSystemEnum: UnitsSystemEnum *************** Accepted values: ---------------- * **IMPERIAL** * **METRIC**