From 845049cc77426ddf14d351b9d548b1fbb53925d1 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 6 Mar 2016 01:39:42 -0500 Subject: add stub tag api methods --- src/guff/api-handler.cr | 5 +++++ src/guff/api-methods.cr | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) 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 # ################ -- cgit v1.2.3