|
@@ -0,0 +1,26 @@
|
|
1
|
+import Application from require "lapis"
|
|
2
|
+
|
|
3
|
+class Docs extends Application
|
|
4
|
+ @path: "/docs"
|
|
5
|
+ @name: "docs_"
|
|
6
|
+
|
|
7
|
+ [index: ""]: =>
|
|
8
|
+ @html ->
|
|
9
|
+ h3 "Hi there."
|
|
10
|
+ a href: @url_for("docs_v1"), "click here"
|
|
11
|
+
|
|
12
|
+ [v1: "/v1"]: =>
|
|
13
|
+ @html ->
|
|
14
|
+ p "ToDo. Write this."
|
|
15
|
+
|
|
16
|
+ -- /new { content: "string" }
|
|
17
|
+ -- /get { id: # } or content
|
|
18
|
+ -- /do { id: # } or content
|
|
19
|
+ -- /undo { id: # } or content
|
|
20
|
+ -- /delete { id: # } or content
|
|
21
|
+ -- /random { count: #, done: bool } (both args optional, defaults count 1, done false)
|
|
22
|
+ -- /list { count: #, done: bool, page: #, order: asc/desc } (if done not specified, returns all,
|
|
23
|
+ -- default count is 50, default page is 1, default order is latest first
|
|
24
|
+
|
|
25
|
+ -- /key/new
|
|
26
|
+ -- /key/delete { id: #, key: "str" }
|