AdenForshaw/smarter-coffee-api

语言: Python

git: https://github.com/AdenForshaw/smarter-coffee-api

Python项目,充当智能咖啡的API。可以轻松地包装在Web服务中。
Python project that acts as a API for a Smarter Coffee. Could easily be wrapped in a web service.
README.md (中文)

聪明的咖啡-API

Python脚本充当智能咖啡机的非官方API - http://smarter.am/coffee/

设计用于Raspberry Pi,但可以在任何python上运行,并且可以轻松地包装在Web服务中以充当REST API。

基本安装指南:http://adenforshaw.com/smarter-coffee-machine-raspberry-pi-iot-coffeetime/

方法:作为唯一参数传递的字符串。 - “重置” - 将机器重置为默认设置。用于测试和保存您的bean很有用。 - “brew” - 使用当前设置开始酿造。它会成功响应,或者相应的错误消息。

响应: JSON - {code:String,success:Boolean,message:String}

安装: - 将回购克隆克隆到您的机器上 - 将IP地址编辑为智能咖啡机的IP地址 - 从命令行调用,例如$ python smarter-coffee-api.py brew

版: - 非常早期的版本 - v0.1

去做: - 添加更多错误检查 - 添加更多方法(杯子大小,酿造强度等) - 如何包装为Web服务的文档示例。

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

en_README.md

smarter-coffee-api

Python script that acts as an Unofficial API for a Smarter Coffee machine - http://smarter.am/coffee/

Designed to be used on a RaspberryPi, but could be run on anything with python, and easily be wrapped in a web service to act as a REST API.

Basic installation guide: http://adenforshaw.com/smarter-coffee-machine-raspberry-pi-iot-coffeetime/

Methods: a string passed as the only parameter.
- "reset" - resets the machine to default settings. Useful to test with and saves your beans.
- "brew" - Starts brewing with current settings. It'll respond with success, or the appropriate error message.

Response:
JSON - { code:String, success:Boolean, message:String }

Installation:
- Clone the repo to your machine
- Edit the IP address to that of your Smarter Coffee machine
- Call from the command line e.g. $python smarter-coffee-api.py brew

Version:
- Very early version - v0.1

ToDo:
- Add more error checking
- Add more methods (cup size, brew strength etc)
- Document example of how to wrap as a web service.