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;
Method
Method used for the command.
Definition Action.h:44
@ post
POST request.
Definition Action.h:45
@ put
PUT request.
Definition Action.h:46
@ deleteMethod
DELETE request.
Definition Action.h:47
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
Action(const nlohmann::json &json)
Create Action from json.
Definition Action.cpp:28
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