๐Ÿ“ API ๋ช…์„ธ์„œ - prgrms-be-devcourse/NBE4-5-3-Team01 GitHub Wiki

์Œ์•… ์บ˜๋ฆฐ๋” API Documentation

์Œ์•… ์บ˜๋ฆฐ๋” ์„œ๋น„์Šค์˜ API ๋ฌธ์„œ๋ฅผ ๋‹ด๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.


Overview

  • Title: ์Œ์•… ์บ˜๋ฆฐ๋” API
  • Description: ์Œ์•… ์บ˜๋ฆฐ๋” ์„œ๋น„์Šค์— ๊ด€ํ•œ API ๋ฌธ์„œํ™”
  • Version: 1.0.0
  • Base URL: http://localhost:8080/api/v1
  • Security: JWT (Bearer ํ† ํฐ ์‚ฌ์šฉ)

Endpoints

Users API

Method URL Summary
POST /user/signup ํšŒ์›๊ฐ€์ž…
POST /user/login ๋กœ๊ทธ์ธ
POST /user/refresh JWT ์žฌ๋ฐœ๊ธ‰
POST /user/image ์ด๋ฏธ์ง€ ๋ณ€๊ฒฝ
PUT /user/userIntro ์ž๊ธฐ์†Œ๊ฐœ ๋ณ€๊ฒฝ
PUT /user/profileName ์ด๋ฆ„ ๋ณ€๊ฒฝ
PATCH /user/calendar-visibility ์บ˜๋ฆฐ๋” ๊ณต๊ฐœ ์—ฌ๋ถ€ ์ˆ˜์ •
GET /user/search ์œ ์ € ๊ฒ€์ƒ‰
GET /user/getUsers ๋‚ด ์œ ์ € ์ •๋ณด ์กฐํšŒ
GET /user/{user-id} ์œ ์ € ID๋กœ ์กฐํšŒ
GET /user/byToken ํ† ํฐ์œผ๋กœ ์œ ์ € ์กฐํšŒ
GET /user/byCookie ์ฟ ํ‚ค๋กœ ์œ ์ € ์กฐํšŒ
GET /user/spotify-token Spotify ํ† ํฐ ์กฐํšŒ
GET /user/logout ๋กœ๊ทธ์•„์›ƒ
GET /user/testApi ํ…Œ์ŠคํŠธ API
GET /user/check-duplicate ์•„์ด๋”” ์ค‘๋ณต ํ™•์ธ

Calendar API

Method URL Summary
GET /calendar ๋จผ์Šฌ๋ฆฌ ์บ˜๋ฆฐ๋” ์กฐํšŒ
POST /calendar ์บ˜๋ฆฐ๋” ์ƒ์„ฑ
GET /calendar/{calendar-date-id} ํŠน์ • ๋‚ ์งœ ์บ˜๋ฆฐ๋” ์กฐํšŒ
PATCH /calendar/{calendar-date-id}/memo ๋ฉ”๋ชจ ์ˆ˜์ •
PUT /calendar/{calendar-date-id}/music ์Œ์•… ๊ธฐ๋ก ์ˆ˜์ •
GET /calendar/today ์˜ค๋Š˜ ๋‚ ์งœ ์บ˜๋ฆฐ๋” ์กฐํšŒ

Music API

Method URL Summary
GET /music ์ „์ฒด ์Œ์•… ๋ชฉ๋ก ์กฐํšŒ
GET /music/{id} ID๋กœ ์Œ์•… ์กฐํšŒ
DELETE /music/{id} ID๋กœ ์Œ์•… ์‚ญ์ œ
POST /music/save-all ์Œ์•… ๋ฆฌ์ŠคํŠธ ์ €์žฅ
GET /music/spotify/{id} Spotify ID๋กœ ๊ฒ€์ƒ‰
POST /music/spotify/{id} Spotify ID๋กœ ์ €์žฅ
GET /music/spotify/search ํ‚ค์›Œ๋“œ๋กœ Spotify ๊ฒ€์ƒ‰
GET /music/spotify/playlist ์‚ฌ์šฉ์ž Spotify Playlist ์กฐํšŒ
GET /music/spotify/playlist/{playlistId} Playlist ํŠธ๋ž™ ์กฐํšŒ
GET /music/spotify/artist/{artistId}/top-tracks ์•„ํ‹ฐ์ŠคํŠธ ์ธ๊ธฐ๊ณก ์กฐํšŒ
GET /music/recent/random/{userId} ๋žœ๋ค ์ตœ๊ทผ ์Œ์•… ์กฐํšŒ

Notification API

Method URL Summary
GET /notifications ์ „์ฒด ์•Œ๋ฆผ ์กฐํšŒ
GET /notifications/{notification-id} ์•Œ๋ฆผ ๋‹จ๊ฑด ์กฐํšŒ
GET /notifications/modify ๋ณ€๊ฒฝ ๊ฐ€๋Šฅ ์•Œ๋ฆผ ๋ชฉ๋ก ์กฐํšŒ
GET /notifications/lists ์‚ฌ์šฉ์ž ์•Œ๋ฆผ ์กฐํšŒ
PUT /notifications/{notification-id}/modify ์•Œ๋ฆผ ์‹œ๊ฐ„ ๋ณ€๊ฒฝ
PATCH /notifications/update ์•Œ๋ฆผ ์„ค์ • ์—…๋ฐ์ดํŠธ

Notification List API

Method URL Summary
GET /notification-lists ๋‚ด ์•Œ๋ฆผ๋ฆฌ์ŠคํŠธ ์กฐํšŒ
PATCH /notification-lists/{notificationList-id} ์•Œ๋ฆผ ์ฝ์Œ ์ฒ˜๋ฆฌ ๋‹จ๊ฑด
DELETE /notification-lists/{notificationList-id} ์•Œ๋ฆผ ์‚ญ์ œ
PATCH /notification-lists/mark-all-read ์ „์ฒด ์ฝ์Œ ์ฒ˜๋ฆฌ

Subscription (ํ‘ธ์‹œ ๊ตฌ๋…)

Method URL Summary
POST /push/subscribe ํ‘ธ์‹œ ๊ตฌ๋… ์ •๋ณด ์ €์žฅ

Follows API

Method URL Summary
POST /follows/{user-id} ํŒ”๋กœ์šฐ ์š”์ฒญ
DELETE /follows/delete/{user-id} ํŒ”๋กœ์šฐ ์‚ญ์ œ
DELETE /follows/reject/{user-id} ํŒ”๋กœ์šฐ ๊ฑฐ์ ˆ
PUT /follows/accept/{user-id} ํŒ”๋กœ์šฐ ์ˆ˜๋ฝ
GET /follows/my ๋‚ด ํŒ”๋กœ์ž‰ ๋ชฉ๋ก ์กฐํšŒ
GET /follows/my/pending ํŒ”๋กœ์›Œ ์š”์ฒญ ๋ชฉ๋ก ์กฐํšŒ
GET /follows/following/{user-id} ์œ ์ €์˜ ํŒ”๋กœ์ž‰ ๋ชฉ๋ก ์กฐํšŒ
GET /follows/follower/{user-id} ์œ ์ €์˜ ํŒ”๋กœ์›Œ ๋ชฉ๋ก ์กฐํšŒ
GET /follows/count/{user-id} ํŒ”๋กœ์šฐ ์ˆ˜ ์กฐํšŒ

Membership API

Method URL Summary
POST /membership/init ๊ธฐ๋ณธ ๋ฉค๋ฒ„์‹ญ ์ƒ์„ฑ
POST /membership/cancel ๋ฉค๋ฒ„์‹ญ ํ•ด์ง€
GET /membership/my ๋‚ด ๋ฉค๋ฒ„์‹ญ ์กฐํšŒ
GET /membership/admin ์ „์ฒด ๋ฉค๋ฒ„์‹ญ ๋ชฉ๋ก (๊ด€๋ฆฌ์ž ์ „์šฉ)
PATCH /membership/admin/{id} ๋ฉค๋ฒ„์‹ญ ์ˆ˜์ • (๊ด€๋ฆฌ์ž ์ „์šฉ)

Payment API

Method URL Summary
POST /payment/subscribe ์ •๊ธฐ ๊ฒฐ์ œ ๊ตฌ๋… ์š”์ฒญ (ํ† ์Šค)
POST /payment/confirm ๊ฒฐ์ œ ํ™•์ธ ์š”์ฒญ

Recap API

Method URL Summary
GET /recap?startDate=&endDate= ์ „์ฒด ์Œ์•… ๊ธฐ๋ก ์กฐํšŒ

Email API

Method URL Summary
GET /userEmail/emailAuth?email= ์ด๋ฉ”์ผ ์ธ์ฆ์ฝ”๋“œ ๋ฐœ์†ก

Spotify Connect API

Method URL Summary
GET /spotify/callback Spotify ๊ณ„์ • ์—ฐ๋™ ์ฝœ๋ฐฑ
GET /spotify/logout Spotify ๋กœ๊ทธ์•„์›ƒ