-
Notifications
You must be signed in to change notification settings - Fork 1
댓글 읽기
devi_kya edited this page Mar 12, 2018
·
23 revisions
- Method : GET
- URL : /comments/:id
- Content-Type : application/json; charset=utf-8
http GET https://:your-site/comments/1/
필드명 | 타입 | 필수여부 | 설명 |
---|---|---|---|
id | Int | Required | 댓글 pk |
createdAt | Datetime | Required | 댓글이 달린 시각 |
text | String | Required | 댓글 내용 |
author | Users | Required | 댓글 작성자 |
rootDocument | Documents | Required | 이 댓글이 달린 게시글 |
likedBy | List of Users | None | 댓글 좋아요한 유저 |
replies | List of Comments | None | 대댓글 |
rootComment | Comments | None | 이 대댓글이 달린 댓글 |
- 예제
{
"id": 1,
"createdAt": "2018-03-12T10:24:24.000Z",
"title": "",
"text": "oha_yohane!",
"author": {
"id": 1,
"fullname": "yoshiko_tsushima",
"nTh": 20,
"dateOfBirth": "1999-07-13",
"username": "yohane",
"password": "1234",
"department": "computer engineering",
"studentNumber": 2018123456,
"email": "example@example.com",
"phoneNumber": "080-1111-2222",
"favoriteComic": "",
"favoriteCharacter": "",
"dataJoined": "2018-03-12T10:11:12.000Z",
"isAnon": false,
"profileText": "",
"isSuperUser": false,
"isActivated": false,
"isGraduated": false,
"isRegularMember": false,
"numberOfDocuments": 0,
"numberOfComments": 2,
"numberOfDocumentLikes": 0,
"numberOfCommentLikes": 0,
"profileImage": {
"id": 1,
"file": "yohane.jpg",
"savedPath": "MIKI"
}
},
"comments": [
{
"id": 1,
"createdAt": "2018-03-12T10:26:28.000Z",
"title": "",
"text": "oha_yoshiko!"
},
{
"id": 2,
"createdAt": "2018-03-12T10:30:11.000Z",
"title": "",
"text": "dakara_yohaneyot!"
}
],
"likedBy": []
}
http status code | code | message | comment |
---|---|---|---|
200 | 0 | SUCCESS | 정상 응답 |
400 | 0 | FAIL | 비정상 응답 |
401 | 0 | Unathorized | 로그인 필요 |
403 | 0 | Forbidden | 권한 없음 |