메소드 |
경로 |
설명 |
GET |
/posts/all?topic="#{topic}" |
글감별로 전체공개 된 모든 글(다른사람 포함) 가져오기 -> 최신순 |
GET |
/posts/all?topic="#{topic}"&filter="popular" |
글감별로 전체공개 된 모든 글(다른사람 포함) 가져오기 -> 인기순 |
Request Header
{
"Content-Type": "application/json",
"token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJTQU5HTEUiLCJ1c2VySWR4IjoyLCJleHAiOjE2MDQxMjgyMzJ9.ZIyE8yKyMZyxdE1QBMPYGlllPvWjVyWNosX-r4H7iDo"
}
- /posts/all?topic="#{topic}" 일 때, 최신순
- "#{topic}" : "해"
[
{
"postIdx": 13,
"profileImg": "https://outsopt26.s3.ap-northeast-2.amazonaws.com/profile7.png",
"nickName": "ha",
"myNickName": "d",
"topic": "해",
"postWrite": "내용",
"date": "2020.10.04",
"time": "PM 08:27",
"day": "일",
"likes": 5,
"liked": false,
"modified": true,
"isBan": false
},
{
"postIdx": 2,
"profileImg": "https://outsopt26.s3.ap-northeast-2.amazonaws.com/profile7.png",
"nickName": "s",
"myNickName": "d",
"topic": "해",
"postWrite": "둥근해가 떴습니다~",
"date": "2020.10.03",
"time": "PM 02:00",
"day": "토",
"likes": 10,
"liked": true,
"modified": false,
"isBan": false
}
]
- /posts/all?topic="#{topic}"&filter="popular" 일 때, 인기순
[
{
"postIdx": 2,
"profileImg": "https://outsopt26.s3.ap-northeast-2.amazonaws.com/profile7.png",
"nickName": "s",
"myNickName": "효원",
"topic": "해",
"postWrite": "둥근해가 떴습니다~",
"date": "2020.10.03",
"time": "PM 02:00",
"day": "토",
"likes": 10,
"liked": true,
"modified": false,
"isBan": false
},
{
"postIdx": 13,
"profileImg": "https://outsopt26.s3.ap-northeast-2.amazonaws.com/profile7.png",
"nickName": "ha",
"myNickName": "효원",
"topic": "해",
"postWrite": "내용",
"date": "2020.10.04",
"time": "PM 08:27",
"day": "일",
"likes": 5,
"liked": false,
"modified": true,
"isBan": false
}
]
- postIdx: 글 인덱스
- profileImg : 프로필 이미지
- nickName : 글 작성자
- myNickName : 계정 사용자
- topic: 글감
- postWrite: 글 내용
- date: 작성 년도월일
- time: 작성 시간
- day: 작성 요일
- likes: 좋아요 개수
- liked: 이미 좋아요 눌렀으면 true, 안 눌렀으면 false
- modified: 수정여부 (true/false)
- 메소드 에러 (405)
- 경로 에러 (404 or 400)