Post
게시물 도메인 API 명세
게시물 등록
게시물 등록
POST
http://localhost:8080/posts/write
회원이 게시물을 등록할 수 있도록 합니다.
Headers
Name
Type
Description
token*
String
로그인 시 발급받은 JWT
Request Body
Name
Type
Description
title*
String
게시물 제목
content*
String
게시물 내용
time*
String
원하는 공유 시간대
people*
Integer
원하는 공유 인원
place*
String
원하는 공유 장소
menu*
String
원하는 메뉴
{
"success": true,
"response": null,
"error": null
}
전체 게시물 조회
전체 게시물 조회
GET
http://localhost:8080/posts
전체 게시물을 화면에 로딩 합니다.
{
"success": true,
"response": {
"posts": [ //게시물 리스트 시작
{
"idx": 1,
"image": "https://postfiles.pstatic.net/MjAyMDA5MDdfMjM2/MDAxNTk5NDUwMDU3MTMx.R3LJwbRiMdZcwnqlJ4nRG5EbSi8KLyYMBdbgbw95dHog.VKCpNcHkFkAGL8bGiZTAM8zWyoGJtVvVA0tz7s-y82wg.JPEG.gaonnuri51/Untitled-1.jpg?type=w966",
"title": "굽네치킨 나눠드실 분?",
"time": "17시~22시",
"place" "연산동",
"people": 2
},
{
"idx": 2,
"image": "놀자포차 가게 상표 링크"
"title": "놀자포차에서 한잔 하실 분",
"time": "17시~22시",
"place" "밀양캠퍼스 앞",
"people": 9999
},
... ] //게시물 리스트 끝
},
"error": null
}
게시물 조회
게시물 조회
GET
http://localhost:8080/posts/{id}
개별 게시물을 조회합니다.
{
"success": true,
"response": {
"idx": 1,
"title": "굽네치킨 나눠드실 분?",
"content": "같이 드실분 찾습니다. 자메이카 통다리 두 조각씩 먹어요.",
"author": "MinseokGo",
"address": "연산동"
"createAt": "2시간 전",
"time": "17시~22시",
"place" "연산동",
"people": 2,
"options": [
{
"idx": 1,
"optionName": "뼈치킨",
"quantity": 5
},
{
"idx": 10,
"optionName": "콜라 라지 변경",
"quantity": 5
}
]
"image": "https://postfiles.pstatic.net/MjAyMDA5MDdfMjM2/MDAxNTk5NDUwMDU3MTMx.R3LJwbRiMdZcwnqlJ4nRG5EbSi8KLyYMBdbgbw95dHog.VKCpNcHkFkAGL8bGiZTAM8zWyoGJtVvVA0tz7s-y82wg.JPEG.gaonnuri51/Untitled-1.jpg?type=w966",
"shopName": "굽네치킨 부산안락점",
"tip": 3000
},
"error": null
}
게시물 수정
게시물 수정
PUT
http://localhost:8080/posts/update
게시물을 수정합니다.
Headers
Name
Type
Description
token*
String
로그인 시 발급받은 JWT
Request Body
Name
Type
Description
title*
String
게시물 제목
content*
String
게시물 내용
time*
String
원하는 공유 시간대
place*
String
원하는 공유 장소
people*
String
원하는 공유 인원
idx
String
게시물의 고유 아이디
{
"success": true,
"response": null,
"error": null
}
게시물 삭제
게시물 삭제
DELETE
http://localhost:8080/posts/delete
게시물을 삭제합니다.
Headers
Name
Type
Description
token*
String
로그인 시 발급받은 JWT
Request Body
Name
Type
Description
idx*
String
게시물의 고유 아이디
{
"success": true,
"response": null,
"error": null
}
Last updated