I'm using the API to extract a list of fermentables into a Google Sheets document. I can successfully retrieve recipe #1432181 using the API
(curl -H "X-API-Key: myAPIKey" https://api.brewersfriend.com/v1/recipes/1432181.xml). Parsing the fermentable AMOUNT elements of the XML document, I see that it's not handling mixed units in the recipe properly. (Or perhaps just amounts specified in grams in the recipe?) To reproduce the problem, I've created a recipe with two fermentables: 10 pounds of 2-row and 44 grams of Black Patent malt. Looking at the XML representation of the recipe, 10 pounds of 2-row is properly converted to <AMOUNT>4.5359237</AMOUNT> (kg), but the 44 grams of Black Patent are shown as <AMOUNT>44</AMOUNT>. (Should be 0.044 kg). The BEER XML spec indicates that all fermentable amounts should be specified in kilograms.
Thanks!
Lee Smith
(curl -H "X-API-Key: myAPIKey" https://api.brewersfriend.com/v1/recipes/1432181.xml). Parsing the fermentable AMOUNT elements of the XML document, I see that it's not handling mixed units in the recipe properly. (Or perhaps just amounts specified in grams in the recipe?) To reproduce the problem, I've created a recipe with two fermentables: 10 pounds of 2-row and 44 grams of Black Patent malt. Looking at the XML representation of the recipe, 10 pounds of 2-row is properly converted to <AMOUNT>4.5359237</AMOUNT> (kg), but the 44 grams of Black Patent are shown as <AMOUNT>44</AMOUNT>. (Should be 0.044 kg). The BEER XML spec indicates that all fermentable amounts should be specified in kilograms.
Thanks!
Lee Smith