junnetworks / house_administrator Goto Github PK
View Code? Open in Web Editor NEWアドミニストレータ様になれます.
アドミニストレータ様になれます.
一応今考えているのは, APIのURLは api/
で始まる.
そんで, 例えばJUNの部屋のエアコンの気温上げる場合には api/jun_room/air_conditioner
みたいな.
しかし, 今までのようなAPIじゃなくて, gRPCを使ってAPI作ってみてもいいかもしれん.
現在基本的にAPIのURLは /rooms/:RoomID/...
のような形式で, センサーや測定情報, コントローラー全てがこの部屋のIDから始まっている形式になっている.
しかし, 普通に /sensors/:SensorID
などの方が良い気がしてきた.
この形式だと /sensors/
で全センサー取得出来るし, 綺麗にURLが設計出来る気がする.
/
: 未定GET /rooms
: 部屋一覧POST /rooms
: 部屋追加GET /rooms/:roomID
: 部屋情報の取得 PUT /rooms/:roomID
: 部屋情報の更新DELETE /rooms/:roomID
: 部屋の削除GET /sensors
: 全てのセンサーの情報を取得. (部屋やセンサータイプなどの条件でフィルター出来るようにする)POST /sensors
: センサーを追加 (どの部屋に所属するかなどはHTTPのBodyに載せる)GET /sensors/:sensorID
: 特定のセンサーの情報を取得PUT /sensors/:sensorID
: 特定のセンサーを更新DELETE /rooms/:roomID/sensors/:sensorID
: 特定のセンサーを削除GET /sensors/:sensorID/measurements
: 特定のセンサーが記録した記録を返すPOST /sensors/:sensorID/measurements
: 特定のセンサーの記録を記録するGET /sensors/:sensorID/measurements/latest
: 特定のセンサーの最新の記録を返すGET /controllers
: 全てのコントローラーを取得 (部屋やセンサータイプなどの条件でフィルター出来るようにする)POST /controllers
: 新しいコントローラーを登録するGET /controllers/:controllerID
: 特定のコントローラーの情報を取得GET /controllers/:controllerID/commands
: 特定のコントローラーのコマンドを全て取得POST /controllers/:controllerID/commands
: 特定のコントローラーにコマンドを追加GET /controllers/:controllerID/commands/:commandID
: コマンド情報の取得POST /controllers/:controllerID/commands/:commandID/execute
: コマンド実行 (HTTPのボディは基本空)PUT /controllers/:controllerID/commands/:commandID
: コマンドを更新DELETE /controllers/:controllerID/commands/:commandID
: コマンドを削除とりあえずは装飾なしでも良いかもしれんが...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.