aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-03-06 01:39:42 -0500
committerPaul Duncan <pabs@pablotron.org>2016-03-06 01:39:42 -0500
commit845049cc77426ddf14d351b9d548b1fbb53925d1 (patch)
tree1ba8f5e01a7710bf76348f226bd6232386df9dc5 /src
parenta1318dd3ebd41d9ce8528a51a8099985fa18f763 (diff)
downloadold-guff-845049cc77426ddf14d351b9d548b1fbb53925d1.tar.bz2
old-guff-845049cc77426ddf14d351b9d548b1fbb53925d1.zip
add stub tag api methods
Diffstat (limited to 'src')
-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 #
################