Written by kotlin, based on spark, mybatis
Given up, Just for fun
-
Init DB
src/storage/storage.sql
-
Create
conf/app.conf
, example inconf/app.default.conf
-
Run
./gradlew run
-
Test
./gradlew test
Errors are in response's err
json field
-
[POST]
/api/author
-
Body:
{ "name": "author" }
-
Response:
{ "data": "init_token" }
Token is for publishing sheet. Once forgetting your token, you have to recreate author
-
-
[POST]
/api/sheet
-
Header:
X-Token
: your token -
Body:
{ "type": "TEXT | LINK", "text": "required", "link": "required if type == LINK" }
-
Response:
{ "data": "next_token" }
-
-
[GET]
/api/sheet
-
Parameters:
offset, count for pagination
-
Reposne:
{ data: [ { id: "1e7b03e5-9820-426f-ba52-65e925f5ad54", author: "authorName", type: "TEXT", text: "sheetText", link: "sheetLink" }, { id: "bd9e42ad-bafe-4cf5-9320-8088f7e87255", author: "authorName", type: "TEXT", text: "sheetText", link: "sheetLink" } ] }
-