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

게시판 목록 조회 #3

Open
changmink opened this issue Jun 9, 2021 · 1 comment
Open

게시판 목록 조회 #3

changmink opened this issue Jun 9, 2021 · 1 comment
Assignees

Comments

@changmink
Copy link
Contributor

  1. Method : GET
  2. Request Header
    1. 유저 정보 token
  3. Params
  4. Request Body
    1. ( 관심사 ID ) id : number / nullable
    2. ( 페이지 인덱스 )page_index : number / nullable ( API 내에서 defalut : 1 )
    3. ( 불러올 page 수 ) page_size : number / Required
    4. 검색
  5. Response Body
    1. ( 게시글 목록 ) post_list : post_info / Required / List
      1. post_info
        1. ( 게시글 ID ) post_id : number / Required
        2. ( 게시글 제목 ) title : String / Required
        3. ( 게시글 태그 ) post_tags : String ( 태그 명 ) / List / Required
        4. ( 채택 여부 ) status_accept : Boolean / Required
        5. ( 좋아요 여부 ) status_like : Boolean / Required
        6. ( 답변 수 ) reply_num : number / Required
        7. ( 좋아요 수 ) like_num : number / Required
        8. ( post 작성일 ) create_date : Date / Required
        9. ( user ID ) user_id : number / Required
        10. ( user Name ) user_name : String / Required
        11. ( user 경험치 ) user_exp : number / Required
        12. ( user profile image ) user_profile : String / nullable
  6. Response Code : 상단 참조
  7. URI : /postlist/posts
  8. 기타 참고 사항
    1. 최신순으로 정렬
@changmink changmink self-assigned this Jun 9, 2021
@changmink
Copy link
Contributor Author

응답 예시

{
    "statusCode": "OK",
    "responseMessage": "FOUND_POST",
    "data": {
        "content": [
            {
                "postId": 26,
                "title": "title_0",
                "tags": [
                    "tag_0"
                ],
                "statusAccept": false,
                "statusLike": true,
                "replyNum": 40,
                "likeNum": 1,
                "createdDate": "2021-06-09T22:05:51.445362",
                "userId": 6,
                "username": "name_0",
                "userExp": 345,
                "userProfile": "hi"
            },
            {
                "postId": 31,
                "title": "title_1",
                "tags": [
                    "tag_1"
                ],
                "statusAccept": false,
                "statusLike": true,
                "replyNum": 40,
                "likeNum": 1,
                "createdDate": "2021-06-09T22:05:51.56174",
                "userId": 6,
                "username": "name_0",
                "userExp": 345,
                "userProfile": "hi"
            },
            {
                "postId": 36,
                "title": "title_2",
                "tags": [
                    "tag_2"
                ],
                "statusAccept": false,
                "statusLike": true,
                "replyNum": 40,
                "likeNum": 1,
                "createdDate": "2021-06-09T22:05:51.661487",
                "userId": 6,
                "username": "name_0",
                "userExp": 345,
                "userProfile": "hi"
            },
            {
                "postId": 41,
                "title": "title_0",
                "tags": [
                    "tag_0"
                ],
                "statusAccept": false,
                "statusLike": true,
                "replyNum": 40,
                "likeNum": 1,
                "createdDate": "2021-06-09T22:05:51.761295",
                "userId": 7,
                "username": "name_1",
                "userExp": 345,
                "userProfile": "hi"
            },
            {
                "postId": 46,
                "title": "title_1",
                "tags": [
                    "tag_1"
                ],
                "statusAccept": false,
                "statusLike": true,
                "replyNum": 40,
                "likeNum": 1,
                "createdDate": "2021-06-09T22:05:51.866124",
                "userId": 7,
                "username": "name_1",
                "userExp": 345,
                "userProfile": "hi"
            },
            {
                "postId": 51,
                "title": "title_2",
                "tags": [
                    "tag_2"
                ],
                "statusAccept": false,
                "statusLike": true,
                "replyNum": 40,
                "likeNum": 1,
                "createdDate": "2021-06-09T22:05:51.96176",
                "userId": 7,
                "username": "name_1",
                "userExp": 345,
                "userProfile": "hi"
            },
            {
                "postId": 56,
                "title": "title_0",
                "tags": [
                    "tag_0"
                ],
                "statusAccept": false,
                "statusLike": true,
                "replyNum": 40,
                "likeNum": 1,
                "createdDate": "2021-06-09T22:05:52.074486",
                "userId": 8,
                "username": "name_2",
                "userExp": 345,
                "userProfile": "hi"
            },
            {
                "postId": 61,
                "title": "title_1",
                "tags": [
                    "tag_1"
                ],
                "statusAccept": false,
                "statusLike": true,
                "replyNum": 40,
                "likeNum": 1,
                "createdDate": "2021-06-09T22:05:52.16891",
                "userId": 8,
                "username": "name_2",
                "userExp": 345,
                "userProfile": "hi"
            },
            {
                "postId": 66,
                "title": "title_2",
                "tags": [
                    "tag_2"
                ],
                "statusAccept": false,
                "statusLike": true,
                "replyNum": 40,
                "likeNum": 1,
                "createdDate": "2021-06-09T22:05:52.274367",
                "userId": 8,
                "username": "name_2",
                "userExp": 345,
                "userProfile": "hi"
            },
            {
                "postId": 71,
                "title": "title_0",
                "tags": [
                    "tag_0"
                ],
                "statusAccept": false,
                "statusLike": true,
                "replyNum": 40,
                "likeNum": 1,
                "createdDate": "2021-06-09T22:05:52.374847",
                "userId": 9,
                "username": "name_3",
                "userExp": 345,
                "userProfile": "hi"
            }
        ],
        "pageable": {
            "sort": {
                "unsorted": true,
                "sorted": false,
                "empty": true
            },
            "offset": 0,
            "pageNumber": 0,
            "pageSize": 10,
            "paged": true,
            "unpaged": false
        },
        "last": false,
        "totalPages": 6,
        "totalElements": 60,
        "sort": {
            "unsorted": true,
            "sorted": false,
            "empty": true
        },
        "first": true,
        "numberOfElements": 10,
        "number": 0,
        "size": 10,
        "empty": false
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant