Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/11 : 무한스크롤 기능 구현 #12

Merged
merged 6 commits into from
Sep 26, 2024
Merged

Feat/11 : 무한스크롤 기능 구현 #12

merged 6 commits into from
Sep 26, 2024

Conversation

thsghdud13
Copy link
Member

  • MongoDB에 방명록 데이터 저장
  • 방명록 데이터 불러오는 API 구현

API URI : /message, GET
RequestParameter : page
요청 URI 예시 : https://api.festime.submeet.shop/message?page=0 (페이지 번호 0부터 시작)
Http Header : none
Response :

{
    "isSuccess": true,
    "code": "GUESTBOOK2001",
    "message": "message list returned",
    "result": {
        "messageDtoList": [
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:56.628"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:56.491"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:56.359"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:56.21"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:56.078"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:55.946"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:55.675"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:55.559"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:55.41"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:55.311"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:55.194"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:54.942"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:54.842"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:54.713"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:54.559"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:54.41"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:54.258"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:54.094"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:53.943"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:53.779"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:53.625"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:53.475"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:53.327"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:53.195"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:53.063"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:52.878"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:52.713"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:47.093"
            },
            {
                "memberName": "호영",
                "memberId": "uuid",
                "message": "하잉",
                "createdAt": "2024-09-26T22:16:45.898"
            }
        ],
        "isFirst": true,
        "isLast": true,
        "totalElements": 29,
        "listSize": 29,
        "totalPage": 1
    }
}

응답 설명

messageDtoList : 메세지들 jsonArray 가장 최근 메세지부터 보여줌
isFirst : 첫번째 페이지인지
isLast : 마지막 페이지인지
totalElements : 메세지들이 총 몇개인지
listSize : 불러온 array 사이즈
totalPage : 페이지 수

@thsghdud13 thsghdud13 linked an issue Sep 26, 2024 that may be closed by this pull request
@thsghdud13 thsghdud13 merged commit 40903a0 into main Sep 26, 2024
@thsghdud13 thsghdud13 self-assigned this Sep 26, 2024
@thsghdud13 thsghdud13 added the enhancement New feature or request label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat : 채팅 메세지 저장 및 불러오기 API
1 participant