Skip to content

๐Ÿ“„ API ๋ฌธ์„œ ์ •๋ฆฌ

pc5401 edited this page Dec 3, 2024 · 2 revisions

์ €ํฌ licota ํŒ€์˜ notion์˜ API ๋ฌธ์„œ๋ฅผ ๋ชจ๋“ˆ๋ณ„๋กœ ์ •๋ฆฌํ•˜์—ฌ GitHub Wiki์— ์—…๋กœ๋“œํ•˜๊ธฐ ์œ„ํ•ด ๊ฐ ๋ชจ๋“ˆ๋ณ„๋กœ ์ฃผ์š” ์—”๋“œํฌ์ธํŠธ๋ฅผ ํ…Œ์ด๋ธ” ํ˜•์‹์œผ๋กœ ์ •๋ฆฌํ•˜์˜€์Šต๋‹ˆ๋‹ค.

  • ์ž์„ธํ•œ ๋‚ด์šฉ์€ ์ €ํฌ ํŒ€์˜ Notion API ๋ฌธ์„œ ์„ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.

Auth ๋ชจ๋“ˆ ๐Ÿ”‘

๊ฒฝ๋กœ (Path) ๋ฉ”์„œ๋“œ (Method) ์„ค๋ช… (Description)
/auth/{provider}/callback GET {provider}๋กœ๋ถ€ํ„ฐ ์ธ์ฆ ํ›„ ๋Œ์•„์˜ค๋Š” ์ฝœ๋ฐฑ ์—”๋“œํฌ์ธํŠธ
/auth/logout GET ๋กœ๊ทธ์•„์›ƒ ์ฒ˜๋ฆฌ ๋ฐ Refresh Token ์ œ๊ฑฐ
/auth/refresh POST ํ† ํฐ ๊ฐฑ์‹  ๋ฐ ์ƒˆ๋กœ์šด Access Token ๋ฐœ๊ธ‰
auth/lico/guest GET ๊ฐ€๊ณ„์ •์œผ๋กœ ๋กœ๊ทธ์ธ ๋ฐ ํšŒ์›๊ฐ€์ž…

์ฃผ์š” ๊ธฐ๋Šฅ ์„ค๋ช…

  • OAuth ์ธ์ฆ: ๋‹ค์–‘ํ•œ OAuth ์ œ๊ณต์ž (naver, github, google)๋ฅผ ํ†ตํ•œ ์‚ฌ์šฉ์ž ์ธ์ฆ์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.
  • ๋กœ๊ทธ์•„์›ƒ ๋ฐ ํ† ํฐ ๊ฐฑ์‹ : ์‚ฌ์šฉ์ž์˜ ์„ธ์…˜ ๊ด€๋ฆฌ๋ฅผ ์œ„ํ•ด ๋กœ๊ทธ์•„์›ƒ ๋ฐ ํ† ํฐ ๊ฐฑ์‹  ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  • ๊ฐ€๊ณ„์ • ๋กœ๊ทธ์ธ&ํšŒ์›๊ฐ€์ž… : ์„œ๋น„์Šค ์ด์šฉ๊ณผ ํ‰๊ฐ€์˜ ์šฉ์ด๋ฅผ ์œ„ํ•ด ๊ฐ€๊ณ„์ • ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.

Users ๋ชจ๋“ˆ ๐Ÿ‘ค

๊ฒฝ๋กœ (Path) ๋ฉ”์„œ๋“œ (Method) ์„ค๋ช… (Description)
/users/{userId} GET ํŠน์ • ์‚ฌ์šฉ์ž์˜ ํ”„๋กœํ•„ ์กฐํšŒ
/users/{userId} PUT ์‚ฌ์šฉ์ž ์ •๋ณด ์—…๋ฐ์ดํŠธ

์ฃผ์š” ๊ธฐ๋Šฅ ์„ค๋ช…

  • ์‚ฌ์šฉ์ž ํ”„๋กœํ•„ ์กฐํšŒ ๋ฐ ์ˆ˜์ •: ์‚ฌ์šฉ์ž ํ”„๋กœํ•„ ์ •๋ณด ์กฐํšŒ ๋ฐ ๋‹‰๋„ค์ž„, ํ”„๋กœํ•„ ์ด๋ฏธ์ง€ ๋“ฑ์˜ ์ •๋ณด๋ฅผ ์—…๋ฐ์ดํŠธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Categories ๋ชจ๋“ˆ ๐Ÿ“‚

๊ฒฝ๋กœ (Path) ๋ฉ”์„œ๋“œ (Method) ์„ค๋ช… (Description)
/categories GET ์นดํ…Œ๊ณ ๋ฆฌ ๋ชฉ๋ก ์กฐํšŒ
/categories/{categoriesId} GET ํŠน์ • ์นดํ…Œ๊ณ ๋ฆฌ ์ƒ์„ธ ์ •๋ณด ์กฐํšŒ
/categories/{categoriesId}/lives GET ํŠน์ • ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋ฐฉ์†ก ๋ชฉ๋ก ์กฐํšŒ

์ฃผ์š” ๊ธฐ๋Šฅ ์„ค๋ช…

  • ์นดํ…Œ๊ณ ๋ฆฌ ๊ด€๋ฆฌ: ์„œ๋น„์Šค ๋‚ด์—์„œ ์ œ๊ณต๋˜๋Š” 7๊ฐ€์ง€ ๊ณ ์ • ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋ชฉ๋ก ๋ฐ ์ƒ์„ธ ์ •๋ณด๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  • ์นดํ…Œ๊ณ ๋ฆฌ๋ณ„ ๋ฐฉ์†ก ์กฐํšŒ: ํŠน์ • ์นดํ…Œ๊ณ ๋ฆฌ์— ์†ํ•œ ๋ผ์ด๋ธŒ ๋ฐฉ์†ก ๋ชฉ๋ก์„ ์กฐํšŒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Live ๋ชจ๋“ˆ ๐ŸŽฅ

๊ฒฝ๋กœ (Path) ๋ฉ”์„œ๋“œ (Method) ์„ค๋ช… (Description)
/lives GET ์‹ค์‹œ๊ฐ„ ์ง„ํ–‰ ์ค‘์ธ ์ŠคํŠธ๋ฆฌ๋ฐ ๋ชฉ๋ก ์กฐํšŒ
/lives/{channelId} GET ํŠน์ • ๋ผ์ด๋ธŒ ๋ฐฉ์†ก์˜ ์ƒ์„ธ ์ •๋ณด ์กฐํšŒ
/lives/{channelId} PATCH ๋ฐฉ์†ก ์ •๋ณด ์ˆ˜์ •
/lives/streaming-key GET ์ŠคํŠธ๋ฆฌ๋ฐ ํ‚ค ์กฐํšŒ (JWT ์ธ์ฆ ํ•„์š”)
/lives/channel-id/{streamingKey} GET ์ฑ„๋„ ID ํš๋“ (์ธ์ฝ”๋”ฉ ์„œ๋ฒ„์—์„œ ์‚ฌ์šฉ)
/lives/onair/{streamingKey} POST ๋ฐฉ์†ก ์‹œ์ž‘ ๋ฐ ์‹œ์ž‘ ์‹œ๊ฐ„ ๊ฐฑ์‹ 
/lives/onair/{streamingKey} DELETE ๋ฐฉ์†ก ์ข…๋ฃŒ
/lives/status/{channelId} GET ์ฑ„๋„ ์ •๋ณด ์กฐํšŒ
/lives/onair/{streamingKey} GET ๋ฐฉ์†ก ์‹œ์ž‘ ์ƒํƒœ ์ •๋ณด

์ฃผ์š” ๊ธฐ๋Šฅ ์„ค๋ช…

  • ๋ผ์ด๋ธŒ ๋ฐฉ์†ก ๊ด€๋ฆฌ: ๋ผ์ด๋ธŒ ๋ฐฉ์†ก์˜ ์‹œ์ž‘, ์ข…๋ฃŒ, ์ •๋ณด ์กฐํšŒ ๋ฐ ์ˆ˜์ • ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  • ์ŠคํŠธ๋ฆฌ๋ฐ ํ‚ค ๋ฐ ์ฑ„๋„ ID ๊ด€๋ฆฌ: ์ŠคํŠธ๋ฆฌ๋ฐ์— ํ•„์š”ํ•œ ํ‚ค์™€ ์ฑ„๋„ ์ •๋ณด๋ฅผ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
  • ์‹ค์‹œ๊ฐ„ ๋ฐฉ์†ก ๋ชฉ๋ก ์กฐํšŒ: ํ˜„์žฌ ์ง„ํ–‰ ์ค‘์ธ ๋ผ์ด๋ธŒ ๋ฐฉ์†ก๋“ค์˜ ๋ชฉ๋ก์„ ํŽ˜์ด์ง• ๋ฐ ์ •๋ ฌ ์˜ต์…˜๊ณผ ํ•จ๊ป˜ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

Follow ๋ชจ๋“ˆ ๐Ÿค

๊ฒฝ๋กœ (Path) ๋ฉ”์„œ๋“œ (Method) ์„ค๋ช… (Description)
/follow GET ์‚ฌ์šฉ์ž๊ฐ€ ํŒ”๋กœ์šฐํ•œ ์ŠคํŠธ๋ฆฌ๋จธ ๋ชฉ๋ก ์กฐํšŒ
/follow/{streamerId} POST ์ŠคํŠธ๋ฆฌ๋จธ ํŒ”๋กœ์šฐ
/follow/{streamerId} DELETE ์ŠคํŠธ๋ฆฌ๋จธ ์–ธํŒ”๋กœ์šฐ
/follow/count/{streamerId} GET ์ŠคํŠธ๋ฆฌ๋จธ์˜ ๊ตฌ๋…์ž ์ˆ˜ ์กฐํšŒ

์ฃผ์š” ๊ธฐ๋Šฅ ์„ค๋ช…

  • ํŒ”๋กœ์šฐ ๊ด€๋ฆฌ: ์‚ฌ์šฉ์ž๊ฐ€ ์ŠคํŠธ๋ฆฌ๋จธ๋ฅผ ํŒ”๋กœ์šฐํ•˜๊ฑฐ๋‚˜ ์–ธํŒ”๋กœ์šฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ํŒ”๋กœ์šฐ ๋ชฉ๋ก ๋ฐ ์นด์šดํŠธ: ์‚ฌ์šฉ์ž๊ฐ€ ํŒ”๋กœ์šฐํ•œ ์ŠคํŠธ๋ฆฌ๋จธ ๋ชฉ๋ก๊ณผ ์ŠคํŠธ๋ฆฌ๋จธ์˜ ๊ตฌ๋…์ž ์ˆ˜๋ฅผ ์กฐํšŒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋„๋ฉ”์ธ ์ •๋ณด ๐ŸŒ

๋„๋ฉ”์ธ ์„ค๋ช… (Description)
lico.digital ํ”„๋ก ํŠธ์—”๋“œ ํŽ˜์ด์ง€
api.lico.digital ํ”„๋กœ๋•์…˜ API ์„œ๋ฒ„ ๋„๋ฉ”์ธ
devapi.lico.digital ๊ฐœ๋ฐœ์šฉ API ์„œ๋ฒ„ ๋„๋ฉ”์ธ
relay.lico.digital RTMP ๋ฐ WebRTC ์ˆ˜์‹  ์„œ๋ฒ„
chats.lico.digital ์ฑ„ํŒ… ์„œ๋ฒ„ ์›น์†Œ์ผ“ ์—ฐ๊ฒฐ ์ฃผ์†Œ
rtc.lico.digital/rtc/v1/publish/ WebRTC ์‹œ๊ทธ๋„๋ง ์ฃผ์†Œ
https://kr.object.ncloudstorage.com Ncloud Object Storage (์ธ๋„ค์ผ ๋ฐ ์ŠคํŠธ๋ฆฌ๋ฐ ๋งค๋‹ˆํŽ˜์ŠคํŠธ)

์ฃผ์š” ๊ธฐ๋Šฅ ์„ค๋ช…

  • ๋„๋ฉ”์ธ ๋ฐ ์„œ๋ฒ„ ์ •๋ณด: ์„œ๋น„์Šค์—์„œ ์‚ฌ์šฉํ•˜๋Š” ์ฃผ์š” ๋„๋ฉ”์ธ๊ณผ ์„œ๋ฒ„์˜ ์ •๋ณด๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  • ์ŠคํŠธ๋ฆฌ๋ฐ ๊ด€๋ จ URL: ๋ผ์ด๋ธŒ ์ŠคํŠธ๋ฆฌ๋ฐ์— ํ•„์š”ํ•œ RTMP, WebRTC, ๋งค๋‹ˆํŽ˜์ŠคํŠธ ๋“ฑ์˜ URL์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

Socket ํ†ต์‹  ๐Ÿ’ฌ

๋ฉ”์‹œ์ง€ ์ „์†ก ์–‘์‹

  • ๋ธŒ๋ผ์šฐ์ € โ†’ ์„œ๋ฒ„
{
  "channelId": "UUID",
  "message": "์ฑ„ํŒ… ๋ฉ”์‹œ์ง€"
}
  • ์„œ๋ฒ„ โ†’ ๋ธŒ๋ผ์šฐ์ €
{
  "userId": 2,
  "nickname": "Viewer456",
  "message": "์•ˆ๋…•ํ•˜์„ธ์š”, ๋ฉ‹์ง„ ์ŠคํŠธ๋ฆผ์ด์—์š”!",
  "timestamp": "2023-10-01T12:34:56Z",
  "filteringResult": true
}

์ฃผ์š” ๊ธฐ๋Šฅ ์„ค๋ช…

  • ์ฑ„ํŒ… ๊ธฐ๋Šฅ: ์‹ค์‹œ๊ฐ„ ๋ผ์ด๋ธŒ ๋ฐฉ์†ก ์ค‘ ์ฑ„ํŒ…์„ ํ†ตํ•ด ์ŠคํŠธ๋ฆฌ๋จธ์™€ ์‹œ์ฒญ์ž ๊ฐ„์˜ ์†Œํ†ต์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
  • ๋ฉ”์‹œ์ง€ ํ•„ํ„ฐ๋ง: Clova Studio ๋ฅผ ํ™œ์šฉํ•ด ๋น„์†์–ด ๋“ฑ์˜ ํ•„ํ„ฐ๋ง ๊ธฐ๋Šฅ์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.
๐Ÿ‘‹ ์†Œ๊ฐœ
๐Ÿ“– ํšŒ์˜๋ก
๐Ÿ—“๏ธ ๊ฐœ๋ฐœ์ผ์ง€
J010 ๊ณ ์€์ˆ˜
J106 ๋ฐ•๋ฏผ์„
J207 ์ž„๊ตญํฌ
J254 ์ตœ๋ช…๊ถŒ
๐Ÿ—ƒ ์„ค๊ณ„ ๋ฌธ์„œ
๐Ÿ•ต๏ธโ€โ™‚๏ธ ํšŒ๊ณ ๋ก
๐Ÿ’ช ๋ฉ˜ํ† ๋ง ์ผ์ง€
๐ŸŽณ ํŠธ๋Ÿฌ๋ธ” ์ŠˆํŒ…
๐Ÿ’ฝ ๋ฐœํ‘œ์ž๋ฃŒ
Clone this wiki locally