Recipe - Food - Nutrition

ÜCRETSİZ PREMIUM
Verified
Taraf David | Güncelleyen 22 days ago | Food
Popülerlik

9.9 / 10

Gecikme

518ms

Hizmet Düzeyi

100%

Health Check

N/A

Tüm Tartışmalara Dön

Get list of all possible amount and unitLong values

Rapid account: Juji 555
juji555
8 years ago

I want to compare extendedIngredient amounts between ingredients in different recipes that may or may not be listed using the same unitLong. So, on my end I will do some math to convert two things listed in teaspoons and tablespoons, for example, to both be teaspoons, so I can properly compare the amounts using the same unit of measure. However, first I need a list of all possible amounts and unitLongs to know what I am working with.

I think amount will be easier so I’ll start there. Is the amount format always numerical decimal format, no matter how it was listed in the originalString? Meaning, is it always “1” instead of “one” or “.5” instead of “one half”?

Then for unitLong, what are all the possible choices? There are obvious ones like teaspoon, tablespoon, cup, etc. but I need a complete list to be able to set up the conversions for each one.

Rapid account: Spoonacular
spoonacular Commented 8 years ago

Yes, amount will always be a decimal number like 1 instead of one or 1.5 instead of “1 1/2”.

About conversion: We use some rather advanced conversions for ingredients depending on densities etc. So one cup of butter is not the same grams as one cup of flour for example. If you want to do something on your end, this is a list of currently used long unit names - the list might change:`

ounces

grams

milliliters

pints

pounds

cups

liters

teaspoons

package

tablespoons

Aşağıya yorum ekleyerek tartışmaya katılın:

Yeni yorumlar göndermek için giriş yapın / kaydolun