게시물 목록

게시물 목록 페이지를 구현하기 위해 필요한 요청 데이터 식별자와 응답 결과 구조를 안내합니다.

데이타 식별자

{
  "dataID": "GET_POST_LIST",
  "page": 1,
  "page_link_url": "/post/list",
  "page_link_hash": "HASH",
  "board_seq": 200,
  "list_per_page": 20,
  "block_per_page": 5,
  "search_type": "default",
  "search_keyword": "keyword",
  "order": "create_date",
  "sort": "desc"
}
KeyDescription
dataID데이터 고유값
page페이지 번호
page_link_url페이지 이동 링크 URL
page_link_hash페이지 이동 링크 Hash(Hash 페이지 내에서 Hash링크로 이동해야 하는경우 필요)
board_seq게시판 시퀀스
list_per_page페이지당 출력될 목록 개수
block_per_page페이지 내 페이징 블럭에 표시될 페이지 링크 수
search_type검색 필터 구분(default:작성자/제목/본문, distance:거리m)
search_keyword검색 키워드
order정렬구분(create_date:작성일, distance:거리)
sort정렬방식(asc:내림차순, desc:오름차순)

HTML

<div id="post_list">
    <div v-for="post in output.post_list">
        <div>
            <small>{{post.reg_name}}</small>
            <small> / </small>
            <small>{{post.create_date}}</small>
        </div>
        <h3>{{post.subject}}</h3>
        <p>
            {{post.content}}
        </p>
    </div>
</div>
  • div
    <div id="post_list"></div>

    게시글 목록이 표시될 영역입니다.

  • div
    <div v-for="post in output.post_list"></div>

    게시글 표시를 위한 반복문

Response Result

{
  "post_list": [
    {
      "post_key": "E477FEEB837326JEUDYFC505D20C022",
      "parent_post_key": "E477FEEB837326JEUDYFC505D20C022",
      "board_key": "E477FEEBEE4D444D208AFC505D20C022",
      "board_seq": "301",
      "board_name": "Community",
      "subject": "post subject",
      "depth": 2,
      "member_key": "E477FEEBEE4DB8BD208AFC505D20C022",
      "member_seq": "3",
      "nickname": "John",
      "avatar_url": "/_images/face_icons_circle/face_icons-circle-01.svg",
      "email": "poster@email.com",
      "cell_phone": "01000001111",
      "reg_name": "John",
      "status": "published",
      "notice_flg": "N",
      "comment_flg": "Y",
      "create_date": "2025-05-20 02:53:34",
      "create_date_type_mdhi": "05-20 02:53",
      "modify_date": "2025-05-30 02:53:34",
      "read_count": 500,
      "read_per_day_rate": "7.40",
      "like_cnt": "3",
      "child_post_count": "0",
      "content": "<p>This is the post content.</p>",
      "content_without_html": "This is the post content.",
      "content_summary": "This is the post content.",
      "files": "/post/2025/05/sample.jpg",
      "files_url": "https://api.hdevplus.com/_upload/post/2025/05/sample.jpg",
      "tags": [
        {"post_seq": "12", "tag": "#notice"}
      ],
      "comment_list": [
        {"comment_key": "A1B2C3D4E5F6837326JEUDYFC505D20C", "comment": "Comment content", "name": "Jane", "create_date": "2025-05-21 10:00:00"}
      ],
      "comment_cnt": "1"
    }
  ],
  "pagination": {
    "page": 1,
    "total_result_num": 42,
    "total_page_num": 5,
    "reault_per_page": 10,
    "block_num": 5,
    "prev_page": 1,
    "next_page": 2,
    "prev_page_link": "/community?page=1",
    "next_page_link": "/community?page=2",
    "paging": {
      "first": {"number": 1, "link": "/community?page=1"},
      "end": {"number": 5, "link": "/community?page=5"},
      "prev": {"number": 1, "link": "/community?page=1"},
      "next": {"number": 5, "link": "/community?page=5"},
      "page": [
        {"number": 1, "link": "/community?page=1"},
        {"number": 2, "link": "/community?page=2"}
      ]
    }
  },
  "search_keyword": "",
  "total_post_count": 42,
  "board_list": [
    {"seq": "301", "board_name": "Community"}
  ],
  "board": {"seq": ["301"]},
  "member_like": []
}
KeyDescription
post_list게시물 목록 배열
post_list[n].post_key게시물 고유 Key
post_list[n].parent_post_key부모(원글) 게시물 키 - 답글이 아니면 자기 자신의 키
post_list[n].board_key게시판 고유 Key
post_list[n].board_seq게시판 시퀀스
post_list[n].board_name게시판 이름
post_list[n].subject게시물 제목
post_list[n].depth게시물 들여쓰기 단계
post_list[n].member_key작성자 회원 key(회원일 경우만)
post_list[n].member_seq작성 회원 시퀀스
post_list[n].nickname작성 회원 닉네임
post_list[n].avatar_url작성 회원 아바타 이미지 URL
post_list[n].email작성자 이메일
post_list[n].cell_phone작성자 휴대폰 번호
post_list[n].reg_name작성자 이름
post_list[n].status게시물 상태(published: 발행됨)
post_list[n].notice_flg공지 여부(Y/N)
post_list[n].comment_flg코멘트 허용 여부(Y/N)
post_list[n].create_date작성일
post_list[n].create_date_type_mdhi등록일의 월-일 시:분 포맷 문자열
post_list[n].modify_date변경일
post_list[n].read_count게시물 조회수
post_list[n].read_per_day_rate일평균 조회율 - 조회수를 게시 경과일로 나눈 값
post_list[n].like_cnt좋아요 수
post_list[n].child_post_count답글(하위 게시물) 수
post_list[n].content게시물 본문(HTML)
post_list[n].content_without_htmlHTML 태그를 제거한 본문(a 태그만 유지)
post_list[n].content_summary태그 제거 후 255자로 자른 본문 요약
post_list[n].files첨부 파일 경로(콤마 구분 문자열, 없으면 null)
post_list[n].files_url첨부 파일의 접근 가능한 URL(콤마 구분 문자열)
post_list[n].tags게시물 태그 배열 - 각 요소는 post_seq, tag 필드를 가집니다
post_list[n].comment_list게시물별 코멘트 목록(최대 5개) - 코멘트 목록 응답과 동일한 필드
post_list[n].comment_cnt게시물의 전체 코멘트 수
pagination페이지네이션 정보 - page, total_result_num, total_page_num, prev/next 링크와 paging(첫/끝/이전/다음/페이지별 링크)
search_keyword요청에 사용된 검색 키워드
total_post_count게시판 전체 게시물 수
board_list게시판 목록
board요청한 게시판 시퀀스 정보
member_likeget_post_like_flg=Y 요청 시 로그인 회원이 좋아요한 게시물 목록

Example

Micky2025-10-10 11:11:11

Post Subject Here

Post Content Here

<div id="post_list" data-load-type="vue-pagination" class="row">
<div class="col-12 my-3" vv-for="post in output.post_list">
  <div class="card h-100">
    <img />
    <div class="card-body">
      <div class="d-flex justify-content-between align-items-center">
        <small>{{post.reg_name}}</small><small>{{post.create_date}}</small>
      </div>
      <hr/>
      <h5 class="card-title">{{ post.subject }}</h5>
      <p class="card-text">
        {{ post.content }}
      </p>
    </div>
  </div>
</div>
</div>
<div id="post_list" data-load-type="page-link" class="row">
    <?php foreach($output['post_list'] as $intKey=>$arrPost){ ?>
        <div class="col-12 my-3">
            <div class="card h-100">
                <img src="<?=$arrPost['files'];?>"/>
                <div class="card-body">
                    <div class="d-flex justify-content-between align-items-center">
                        <small><?=$arrPost['reg_name'];?></small><small><?=$arrPost['create_date'];?></small>
                    </div>
                    <hr/>
                    <h5 class="card-title"><?=$arrPost['subject'];?></h5>
                    <p class="card-text">
                        <?=$arrPost['content'];?>
                    </p>
                </div>
            </div>
        </div>
    <? } ?>
</div>