-
Notifications
You must be signed in to change notification settings - Fork 0
Protocol Comment
zoizer edited this page Mar 5, 2018
·
13 revisions
##################################################
########## GET ALL COMMENT(S) (DEV) ##########
##################################################
GET localhost:8080/api/comment/
input: -
output: json [{
"ownerid":"123", // id of user who comment
"postid":"123", // id of post where commented
"id":"123", // id of comment
"nick":"abc", // nick of owner
"text":"abc", // text of comment
"time":timestamp // timestamp of when it was commented
}, ...]
status: 200 OK
##################################################
##################################################
########## GET COMMENT(S)(RELEASE) V3.0 ##########
##################################################
GET localhost:8080/api/comment/get/
input: json '{
"userid":"123", // userid must be valid user - 401 Not Implemented
"ownerid":"123", // ownerid of comment must match completely - 401 Not Implemented
"postid":"123", // post must be in this group - 401 Not Implemented
"nick":"xnick", // nick of poster must contain this string - 401 Not Implemented
"id":"123", // id of post must match completely - 401 Not Implemented
"text":"abc", // text of post must contain this string - 401 Not Implemented
"before":timestamp}, // get posts before - 401 Not Implemented
"after":timestamp}, // get posts after - 401 Not Implemented
"count":"10" // Max amount to get - 401 Not Implemented
}'
output: json [{
"ownerid":"123", // id of user who comment
"postid":"123", // id of post where commented
"id":"123", // id of comment
"nick":"abc", // nick of owner
"text":"abc", // text of comment
"time":timestamp // timestamp of when it was commented
}, ...]
status: 200 OK
##################################################
##################################################
########## PUT COMMENT (RELEASE) V3.0 ##########
##################################################
PUT localhost:8080/api/post/put/
input: json '{
"userid":"123", // userid must be valid user and have authority - 401 Not Implemented
"id":"123", // id of post - 401 Not Implemented
"text":"abc", // text of post - 401 Not Implemented
"status":"hidden" // status the post will have - 401 Not Implemented
}'
output: json '{
"ownerid":"123", // id of user who comments
"postid":"123", // id of the commented post
"id":"123", // id of comment
"nick":"abc", // nick of owner
"text":"abc", // text of comment
"time":timestamp // timestamp of when it was commented
}'
status: 200 OK
##################################################
##################################################
########## POST COMMENT (RELEASE) V3.0 ##########
##################################################
POST localhost:8080/api/post/post/
input: json '{
"userid":"123", // userid must be valid user - 401 Not Implemented
"postid":"123", // id of the commented post - 401 Not Implemented
"text":"abc", // text of post - 401 Not Implemented
"status":"visible" // status the post will have - 401 Not Implemented
}'
output: json '{
"ownerid":"123", // id of user who comment
"postid":"123", // id of post where commented
"id":"123", // id of comment
"nick":"abc", // nick of owner
"text":"abc", // text of comment
"time":timestamp // timestamp of when it was commented
}'
status: 200 OK
##################################################