post
postDTO
postId: Long createdDate: LocalDate // YYYY-MM-DD userId: Long username: String emotionType: Integer content: String comments: commentDTO[]
postSimpleDTO
postId: Long createdDate: LocalDate userId: Long username: String emotionType: Integer content: String
commentDTO
commentId: Long userId: Long emojiImgUrl: String x: Double y: Double
/api/auth
토큰 - post /token
로그인 - post /signin
req
{
code: String;
}
res -> 200 / 401
/api/post
게시글 작성 - post ``
req
{
emotionType: Integer;
content: String;
}
res -> http status code
게시글 수정 - put/fetch /{postId}
게시글 삭제 - delete /{postId}
게시글 조회 - get
by postId /{postId}
res{ postDTO }
마이페이지 캘린더 용 /mypage
query string
year | int(YYYY) | 캘린더 년도 |
---|---|---|
month | int(MM) | 캘린더 월 |
res{
posts: postSimpleDTO[];
}
개인오늘글 용 /myPost
res{ postSimpleDto }
메인페이지 용 /postList
query string
category | String(,구분자로 구분되게) | emotionType들을 담아 보내주세요 |
---|---|---|
howMany | Integer | 리턴할 postList 길이 |
pageNum | Integer | howMany가 리스트 길이 일 때, 쪽 수(0부터시작) |
res{
posts: postSimpleDTO[];
}
그땐 머랭 용 /myLikePostList
query string
emotionType | Integer | 조회할 반응을 단 게시물의 감정카테고리 |
---|
res{
posts: postSimepleDTO[];
}
그땐 머랭 카운팅 용 /myLikeCountList
res{
// ex) [16, 25, 34, 24, 12]
[emotionType1Count, emotionType2Count, ...]
}
/api/saveEmoji
반응 달기 - post ``
req
{
postId: Long;
emojiUrl: String;
x: Double;
y: Double;
}
res -> 200 / -
/api/emoji