SwarmJS 的 REST API
应用程序接口
读取单个数据对象
请求 id = A~GoImd Mouse实例:
GET /Mouse#A~GoImd HTTP/1.0
响应: {"/Mouse#A~GoImd":{"x":200,"y":10,"symbol":"X","ms":0}}
读取多个数据对象
请求两个 id 为 ( A~GoImd , A000un ) 的Mouse实例:
GET /Mouse#A~GoImd#A000un HTTP/1.0
响应: {"/Mouse#A~GoImd":{"x":200,"y":10,"symbol":"X","ms":0},"/Mouse#A000un":{"x":46,"y":203,"symbol":"Y","ms":0}}
运行一些操作
运行 id = A~GoImd的Mouse实例的set操作并传递 json
1