Unit Conversion
Use case request example
API endpoint
Url:
Fields:
RECIPE_FIELD_NORMALIZED_INGREDIENTS
Request example(pls use your token and recipe id):
We use RECIPE_FIELD_NORMALIZED_INGREDIENTS
field to have normalised ingredients with their measurements in response
Response example (for single normalised ingredient):
Default quantity and measurement should be taken from analysis.quantity
and analysis.unit
Default view would containt original ingredients quantity and measurment despite whether it metric or imperial.
If user switches measurement to Metric, on FE we should take quantity and measurement from analysis.alternative_measurments.ammount.quantity
and analysis.alternative_measurments.ammount.unit
where "measurement_system": "MEASUREMENT_SYSTEM_METRIC"
Or "measurement_system": "MEASUREMENT_SYSTEM_IMPERIAL"
for imperial.
Last updated