1.0.3 • Published 6 months ago

picogw-plugin-db v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
6 months ago

node-picogw-plugin-db is a mandatory plugin module for PicoGW, a Home Automation and Building Automation devices gateway server, developed by Kanagawa Institute of Technology, Smart House Research Center, released under MIT license. This is automatically installed when you install PicoGW.

Plugin API

Database plugin provides an API for simple key-value database within GW. The (arbitrary ) path becomes the key of the data. Also, the source code of database plugin is a good example of basic plugin implementation. If you want to develop your own plugin, please refer to v1/plugins/db/index.js.

GET /v1/db

List of all stored keys.

GET /v1/db/PATH_AS_A_KEY

returns the stored value.

PUT|POST /v1/db/PATH_AS_A_KEY

Stores a value (specified in the body). The value should be in JSON format. It is stringified before stored. The written value is published from the specified path using PubSub.

DELETE /v1/db/PATH_AS_A_KEY

Deletes the key and the corresponding data. Publishes {}.

DELETE /v1/db

Deletes all data. (/v1/db path remains.)

1.0.3

6 months ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago