HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🧚
[1기]최종 프로젝트 데브코스
/
🏀
[팀14] 슬램 - 우리 주변 농구장 예약
/
🧭
Domain 설계
/
[GET] /api/v1/courts/?params

[GET] /api/v1/courts/?params

✅
사용자가 날짜, 시간, 바운더리로 농구장 검색하기

Request

Headers

headers { Authorization: "Bearer ${token}" }
RequestParam
Field
Type
Description
비고
date
String
요일
절대시간으로 변경
time
String
새벽 아침 낮 저녁
dawn | morning | afternoon | night | all
start.latitude
Number
시작 위도
start.longtitude
Number
시작 경도
end.latitude
Number
끝 위도
end.longtitude
Number
끝 경도
 
 

Response

Body
Filed
Type
Description
비고
conten[].courtId
Number
농구장 아이디
courts.[].courtName
String
농구장 이름
courts[].courtReservation
Number
코트 예약자 수
courts[].latitude
Number
농구장 위도
courts[].longitud
Number
농구장 경도
courts.[].updatedAt
String
농구장 수정 시간
날짜 포맷: YYYY-mm-DDThh:MM:ss
courts.[].createdAt
String
농구장 생성 시간
날짜 포맷: YYYY-mm-DDThh:MM:ss
  • Body 예시
{ "contents": [ { "court": { "id": "1", // string으로 변경 "name": "관악구민운동장 농구장", "latitude": 23, "longitude": 24, "createdAt": "2021-01-01T12:20:10", "updatedAt": "2021-01-01T12:20:10", }, "reservationMaxCount": 3, }, { "court": { "id": "2", //string으로 변경 "courtName": "서울시 농구장", "latitude": 23, "longitude": 24, "createdAt": "2021-01-01T12:20:10", "updatedAt": "2021-01-01T12:20:10", }, "reservationMaxCount": 3, } ] }
  • reservationMaxCount
    • 시작시간 : 절대시간
    • 종료시간 : 절대시간 + time( dawn, mor, after, night, all)
    • 시작 ~ 종료 사이에 예약된 최대 개수 세기
      • 30분 단위로 나눈 블록
        • ex) 2021-11-01-09:00 ~ 2021-11-01-09:29 : 1명
          • 2021-11-01-09:30 - 2021-11-01-09:59 : 3명
          • max ⇒ 3명