aboutsummaryrefslogtreecommitdiffstats
path: root/include/Response.hpp
diff options
context:
space:
mode:
authorNiklas Halle <niklas@niklashalle.net>2020-08-24 19:04:13 +0200
committerNiklas Halle <niklas@niklashalle.net>2020-08-24 19:04:13 +0200
commit38e20390ddf38edd74447ef7db2af660b8e0ff32 (patch)
tree19139ea991ae5d99b28d5c1f9f509ff0ebf4b151 /include/Response.hpp
parent61464b6d069513eda07e4fc2638c8889cbce98f5 (diff)
downloadn_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.hpp20
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