Bases: models.Interface
Class implementing the Interface interface to make Majordom accessible through HTTP.
Runs the Bottle server.
Receives and processes the request received by the server.
alias of HTTPInterface
This plugin sends and receives json messages, that are directly translated into Python dictionaries. An incoming (for the server) message always has a ‘command’ key in its dictionaries. This HTTP interface handles the following commands :
Then, the structure of the rest of the json message depends on the command: it can be seen as a function (the command) that has to be called with specific arguments (the rest of the json message). The structure of the json message and the purpose of each command will be described here in the future. For the moment, refer to the HTTP Interface Python code.