blob: 7549c11d8f129320d8d8bb46d6093c7aa62cd640 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
require "json"
module Guff
module API
module TestAPI
private def do_test_version(
context : HTTP::Server::Context,
args : Hash(String, String)
)
{version: Guff::VERSION}.to_json
end
private def do_test_get_posts(
context : HTTP::Server::Context,
args : Hash(String, String)
)
[{foo: "bar"}, {foo: "asdf"}].to_json
end
private def do_test_error(
context : HTTP::Server::Context,
args : Hash(String, String)
)
raise "some random error"
end
end
end
end
|