22 #ifndef INCLUDE_HUEPLUSPLUS_ACTION_H 23 #define INCLUDE_HUEPLUSPLUS_ACTION_H 25 #include "json/json.hpp" 40 explicit Action(
const nlohmann::json& json);
55 const nlohmann::json&
getBody()
const;
58 const nlohmann::json&
toJson()
const;
Method getMethod() const
Get request method.
Definition: Action.cpp:35
Action executed by the bridge, e.g. as a Schedule command.
Definition: Action.h:35
Namespace for the hueplusplus library.
Definition: Action.h:27
static Method parseMethod(const std::string &s)
Parse Method from string.
Definition: Action.cpp:50
const nlohmann::json & toJson() const
Get json object of command.
Definition: Action.cpp:45
Method
Method used for the command.
Definition: Action.h:43
static std::string methodToString(Method m)
Get string from Method.
Definition: Action.cpp:67
const nlohmann::json & getBody() const
Get request body.
Definition: Action.cpp:40
std::string getAddress() const
Get address the request is made to.
Definition: Action.cpp:30
Action(const nlohmann::json &json)
Create Action from json.
Definition: Action.cpp:28