게시물 목록
게시물 목록 페이지를 구현하기 위해 필요한 요청 데이터 식별자와 응답 결과 구조를 안내합니다.
데이타 식별자
{
"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"
}| Key | Description |
|---|---|
| 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": []
}
| Key | Description |
|---|---|
| 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_html | HTML 태그를 제거한 본문(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_like | get_post_like_flg=Y 요청 시 로그인 회원이 좋아요한 게시물 목록 |
<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>User Discussions
ADD- 등록된 글이 없습니다.