cocktail-ninja/cocktail-arduino

语言:

git: https://github.com/cocktail-ninja/cocktail-arduino

README.md (中文)

鸡尾酒忍者 - Arduino Yun API

API规范

GET /状态

响应:

STATUS 503
{ "status": "busy" }

STATUS 404
{ "status": "glass not found" }

STATUS 200
{ "status": "ready" }

GET / make_drink

请求:/ {cid} - {amount}

  • cid:组件ID(泵:P1,P2,P3,P4,P5,P6 - 阀门:V1,V2,V3,V4)
  • 金额:金额(以毫升计)

例如。浇注Valve-1 1000ml,Pump-1 500ml和Pump-2 200ml

/make_drink/v1-1000/p1-500/p2-200

响应:

  • ready_in:总浇注时间
{ "ready_in": 1500 }

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

Cocktail Ninja - Arduino Yun API

API Specifications

GET /status

Response:

STATUS 503
{ "status": "busy" }

STATUS 404
{ "status": "glass not found" }

STATUS 200
{ "status": "ready" }

GET /make_drink

Request: /{cid}-{amount}

  • cid: Component id (Pump: P1, P2, P3, P4, P5, P6 - Valve: V1, V2, V3, V4)
  • amount: amount number (in ml)

E.g. pouring Valve-1 1000ml, Pump-1 500ml and Pump-2 200ml

/make_drink/v1-1000/p1-500/p2-200

Response:

  • ready_in: total pouring time
{ "ready_in": 1500 }