-
Notifications
You must be signed in to change notification settings - Fork 1
게시글 읽기
devi_kya edited this page Mar 8, 2018
·
3 revisions
- Method : GET
- URL : /documents/:id/
- Content-Type : application/json; charset=utf-8
- 예제
http GET https://your-site/documents/1/
필드명 | 타입 | 필수여부 | 설명 |
---|---|---|---|
id | Int | Required | 게시글 PK |
author | Users | Required | 게시글 작성자 |
comments | List of Comments | Required | 댓글 내용 |
text | String | Required | 게시글 내용 |
- 예제
{
"id": 1,
"user": {
"id": 1,
"profileImage" : {
"id":"1",
"file":"asdf1234.png",
"savedPath":"/files/qwer9876.png"
},
"nTh" : 12,
"fullname" : "링 샤오유",
"department" : "컴소과",
"numberOfDocuments" : 1,
"numberOfComments" : 2,
"numberOfLikes" : 3
},
"comments": [
{
"id": 2,
"comments": [
],
"createdAt": "2017-12-12Z12:34:56",
"text": "댓글",
"user": {
"id": 1,
"profileImage" : {
"id":"1",
"file":"asdf1234.png",
"savedPath":"/files/qwer9876.png"
},
"nTh" : 12,
"fullname" : "링 샤오유",
"department" : "컴소과",
"numberOfDocuments" : 1,
"numberOfComments" : 2,
"numberOfLikes" : 3
}
},
{
"id": 2,
"comments": [
],
"createdAt": "2017-12-12Z12:34:56",
"text": "댓글",
"user": {
"id": 1,
"profileImage" : {
"id":"1",
"file":"asdf1234.png",
"savedPath":"/files/qwer9876.png"
},
"nTh" : 12,
"fullname" : "링 샤오유",
"department" : "컴소과",
"numberOfDocuments" : 1,
"numberOfComments" : 2,
"numberOfLikes" : 3
}
}
]
"text" : "aaaaaaaaaaaa"
}
http status code | code | message | comment |
---|---|---|---|
200 | 0 | SUCCESS | 정상 응답 |
400 | 0 | FAIL | 비정상 응답 |
401 | 0 | Unathorized | 로그인 필요 |
403 | 0 | Forbidden | 권한 없음 |