aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/guff/api-handler.cr5
-rw-r--r--src/guff/api-methods.cr24
2 files changed, 29 insertions, 0 deletions
diff --git a/src/guff/api-handler.cr b/src/guff/api-handler.cr
index dce351f..2b4cfb0 100644
--- a/src/guff/api-handler.cr
+++ b/src/guff/api-handler.cr
@@ -90,6 +90,11 @@ module Guff
get_posts,
],
+ tag: [
+ get_tags,
+ remove_tags,
+ ],
+
test: [
version,
get_posts,
diff --git a/src/guff/api-methods.cr b/src/guff/api-methods.cr
index dc0e1e8..5ef3dae 100644
--- a/src/guff/api-methods.cr
+++ b/src/guff/api-methods.cr
@@ -40,6 +40,12 @@ module Guff
},
},
+ "tag": {
+ "get_tags": {
+ text: "Get list of tags",
+ },
+ },
+
"test": {
"version": {
text: "Get version",
@@ -112,6 +118,24 @@ module Guff
[{foo: "bar"}, {foo: "asdf"}].to_json
end
+ ###############
+ # tag methods #
+ ###############
+
+ private def do_tag_get_tags(
+ context : HTTP::Server::Context,
+ args : Hash(String, String)
+ )
+ [{foo: "bar"}, {foo: "asdf"}].to_json
+ end
+
+ private def do_tag_remove_tags(
+ context : HTTP::Server::Context,
+ args : Hash(String, String)
+ )
+ true.to_json
+ end
+
################
# test methods #
################