BeerXML 规范
Samovar 接受常见酿造软件使用的 BeerXML 1.0 格式。
格式
- 根节点为 RECIPES,其后是一条或多条 RECIPE 记录,包含 HOPS、FERMENTABLES、YEASTS、MISCS、WATERS 以及可选的 MASH。
- 数量使用 BeerXML 基本单位:千克、升、摄氏度和分钟。
- 门户导入每次上传只接受一个配方;同一文档中多余的记录会被忽略。
示例
目录中的每个配方都是可用的示例,例如 10 Heads High。 下载 BeerXML · 查看配方
文件和 API
| 方法 | 路径和参数 | 响应 |
|---|---|---|
| GET | /recipes?q&catalog&family&styleType&recipeType&source&abvMin&abvMax&ibuMin&ibuMax&sort&page&perPage&lang | 分页的公开配方摘要 |
| GET | /recipes/{slug}?lang | 以 JSON 返回的单个公开配方 |
| GET | /recipes/{slug}/beerxml | BeerXML 文档 |
| GET | /calculators | 计算器定义 |
| POST | /calculators/{code}/calculate JSON {"inputs":{}} | 计算结果 |
公开 API 基址: https://www.samovar-tool.ru/beerxml/v1/
错误
400 cheesexml_validation_error, 401 cheesexml_unauthorized, 404 cheesexml_not_found, 405 cheesexml_method_not_allowed. 每个 JSON 错误都包含稳定的 code 和 message 字段。
