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