rework of the API, added /api/post, /api/getPosts
This commit is contained in:
parent
2c58b4626f
commit
f8c42fd0c3
|
@ -9,6 +9,8 @@ print_help() {
|
||||||
echo "./manager.sh create_thread [boardId] [threadTitle] [content] <isLocked> <isPinned> <options>"
|
echo "./manager.sh create_thread [boardId] [threadTitle] [content] <isLocked> <isPinned> <options>"
|
||||||
echo "./manager.sh get_boards"
|
echo "./manager.sh get_boards"
|
||||||
echo "./manager.sh get_threads [boardId]"
|
echo "./manager.sh get_threads [boardId]"
|
||||||
|
echo "./manager.sh post [options] [content] [threadId] [boardId]"
|
||||||
|
echo "./manager.sh get_posts [boardId] [threadId]"
|
||||||
}
|
}
|
||||||
|
|
||||||
curl_post() {
|
curl_post() {
|
||||||
|
@ -38,6 +40,12 @@ case $ACTION in
|
||||||
"get_threads")
|
"get_threads")
|
||||||
curl_get /api/getThreads/${2}
|
curl_get /api/getThreads/${2}
|
||||||
;;
|
;;
|
||||||
|
"post")
|
||||||
|
curl_post '{"options":"'${2}'","content":"'${3}'","threadId":"'${4}'","boardId":"'${5}'"}' ${BASE_URL}/api/post
|
||||||
|
;;
|
||||||
|
"get_posts")
|
||||||
|
curl_get /api/getPosts/${2}/${3}
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
print_help
|
print_help
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue