diff options
author | Niklas Halle <niklas@niklashalle.net> | 2020-08-24 19:04:13 +0200 |
---|---|---|
committer | Niklas Halle <niklas@niklashalle.net> | 2020-08-24 19:04:13 +0200 |
commit | 38e20390ddf38edd74447ef7db2af660b8e0ff32 (patch) | |
tree | 19139ea991ae5d99b28d5c1f9f509ff0ebf4b151 /include/Response.hpp | |
parent | 61464b6d069513eda07e4fc2638c8889cbce98f5 (diff) | |
download | n_core-38e20390ddf38edd74447ef7db2af660b8e0ff32.tar.gz n_core-38e20390ddf38edd74447ef7db2af660b8e0ff32.zip |
add all available commands (in this branch? @Max where are the others?)
Diffstat (limited to 'include/Response.hpp')
-rw-r--r-- | include/Response.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/Response.hpp b/include/Response.hpp new file mode 100644 index 0000000..53043c8 --- /dev/null +++ b/include/Response.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "crow.h" + +#include "AnnotationTypes.hpp" + +namespace Response { + using Reply::AnnotationType; + typedef crow::json::wvalue json; + + json simple_response(std::string const &text, std::string const &session = "null", bool success = true); + + json create_annotation(AnnotationType annotation = AnnotationType::none, std::string const &extra = ""); + + json create_text(std::string const &text); + + json create_text(std::string const &text, std::vector<json> &&annotations); + + json create_response(std::vector<json> &&reply, std::string const &session = "null", bool success = true); +}
\ No newline at end of file |