Skip to content

[Web21] ERD & API

jsl0149 edited this page Dec 2, 2021 · 3 revisions

ERD & API

GET /api/music/{MID}

  • ์Œ์•… ์žฌ์ƒ์— ํ•„์š”ํ•œ API
  • MID๋ฅผ ์ด์šฉํ•ด ์Œ์•… ์ •๋ณด ํ˜ธ์ถœ
//response
{
    path : ์Œ์•…์ด ์„œ๋ฒ„์— ์ €์žฅ๋œ ๊ฒฝ๋กœ (path)
}

GET /api/musics/{name}

  • ์Œ์•… ๊ฒ€์ƒ‰๊ฒฐ๊ณผ์— ํ•„์š”ํ•œ API
//resopnse
{
    MID : ์Œ์•… id (MID),
    name : ๊ณก๋ช…
    thumbnail : ์„œ๋ฒ„ ์ธ๋„ค์ผ ์ €์žฅ ๊ฒฝ๋กœ,
    singer : ๊ฐ€์ˆ˜,
    description : ๊ณก ์„ค๋ช…,
    path : ์„œ๋ฒ„ ์Œ์•… ์ €์žฅ ๊ฒฝ๋กœ
}

GET /api/rooms/{name}

  • ๋ฐฉ ๊ฒ€์ƒ‰๊ฒฐ๊ณผ์— ํ•„์š”ํ•œ API
//reponse
{
    RID : ์†Œ์ผ“ room id,
    name : ๋ฐฉ ์ด๋ฆ„,
    description : ๋ฐฉ ์„ค๋ช…,
    count : ๋ฐฉ ํ˜„์žฌ ์ธ์› ์ˆ˜
}

POST /upload

  • ์Œ์•… ์—…๋กœ๋“œ์— ํ•„์š”ํ•œ API
//body
{
    singer : ๊ฐ€์ˆ˜,
    description : ๊ณก ์„ค๋ช…,
    thumbnail : ์‚ฌ์ง„ ํŒŒ์ผ,
    music : ์Œ์•… ํŒŒ์ผ,
}
//response
status 200

GET /api/rooms/userList/{roomTitle}

  • ์œ ์ €๋ฆฌ์ŠคํŠธ ์ถœ๋ ฅ์— ํ•„์š”ํ•œ API
//reponse
{
   userList : ๋ฐฉ์— ์ ‘์†ํ•ด์žˆ๋Š” ์œ ์ € ๋ฆฌ์ŠคํŠธ,
}

GET /download

  • ๋…ธ๋ž˜ ์žฌ์ƒ์— ํ•„์š”ํ•œ API
//reponse
{
   sigendURL : ์˜ค๋ธŒ์ ํŠธ ์Šคํ† ๋ฆฌ์ง€์— ์žˆ๋Š” ๋ฐ์ดํ„ฐ์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋Š” URL, 
}

GET /oauth/kakao

  • KAKAO ์ธ์ฆ์— ํ•„์š”ํ•œ API
//reponse
{
   userID : userID๋ฅผ ์ €์žฅํ•œ Cookie,
   userEmail : userEmail์„ ์ €์žฅํ•œ Cookie,
   jwt : jwt๋ฅผ ์ €์žฅํ•œ Cookie,
}

GET /oauth/github

  • GITHUB ์ธ์ฆ์— ํ•„์š”ํ•œ API
//reponse
{
   userID : userID๋ฅผ ์ €์žฅํ•œ Cookie,
   userEmail : userEmail์„ ์ €์žฅํ•œ Cookie,
   jwt : jwt๋ฅผ ์ €์žฅํ•œ Cookie,
}

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ SWS

๐Ÿ“ ๋ฌธ์„œ

๊ธฐํš์„œ

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป ์Šคํฌ๋Ÿผ

ํšŒ์˜๋ก

๐Ÿค” ํšŒ๊ณ 

ํšŒ๊ณ ๋ก

๐Ÿง‘โ€๐Ÿซ ๋ฉ˜ํ† ๋ง

๋ฉ˜ํ† ๋ง
Clone this wiki locally