-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Request
POST /user/login
Body
Parameter | Type | Description | Necessary |
---|---|---|---|
user_address | ๋ฌธ์์ด | ์ ์ ์ ์ง๊ฐ ์ฃผ์ | ํ์ |
user_network | ๋ฌธ์์ด | ์ ์ ์ ๋คํธ์ํฌ ์ ๋ณด | ํ์ |
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
- ์๋ก์ด ์ง๊ฐ ์ฃผ์, ๋คํธ์ํฌ ์ ๋ณด๋ก ์ฐ๊ฒฐํ์ ๊ฒฝ์ฐ
{
"data": [
{
"user_id": 6,
"user_address": "0xe8cf73e4e60c7fbc60a7d5931009abbae21b8465",
"user_nickname": "Sam Yoon",
"user_introduction": "I'm Sam Yoon!"
}
],
"message": "๋ก๊ทธ์ธ์ ์ฑ๊ณตํ์์ต๋๋ค."
}
- ๋ฑ๋ก๋ ์ง๊ฐ ์ฃผ์, ๋คํธ์ํฌ ์ ๋ณด๋ก ์ฐ๊ฒฐํ์ ๊ฒฝ์ฐ
{
"data": [
{
"user_id": 6,
"user_address": "0xe8cf73e4e60c7fbc60a7d5931009abbae21b8465",
"user_nickname": "Sam Yoon",
"user_introduction": "I'm Sam Yoon!"
}
],
"message": "๋ก๊ทธ์ธ์ ์ฑ๊ณตํ์์ต๋๋ค."
}
Request
POST /logout
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
-
session์ ์ ์ฅ๋ ์ ๋ณด๊ฐ ์์ ๋ ์ํ์ฝ๋ 400๊ณผ "not authorized" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
-
session์ ์ ์ฅ๋ ์ ๋ณด๊ฐ ์์ ๋ ์ํ์ฝ๋ 200๊ณผ "๋ก๊ทธ์์" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
Request
PUT /profile
Body
Parameter | Type | Description | Necessary |
---|---|---|---|
user_address | ๋ฌธ์์ด | ์ ์ ์ ์ง๊ฐ ์ฃผ์ | ํ์ |
user_nickname | ๋ฌธ์์ด | ์ ์ ์ ๋๋ค์ | ํ์ |
user_introduction | ๋ฌธ์์ด | ์ ์ ์ ์๊ธฐ์๊ฐ | ํ์ |
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
{
"user_nickname": "dao",
"user_introduction": "hello vote"
}
Request
GET /user/userinfo
Parameter
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
ex) /user/userinfo?user_id=6
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
[
{
"user_id": 6,
"user_address": "0xe8cf73e4e60c7fbc60a7d5931009abbae21b8465",
"user_nickname": "Sam Yoon",
"user_introduction": "I'm Sam Yoon!"
}
]
Request
POST /article
Body
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
article_content | ๋ฌธ์์ด | ๊ฒ์๊ธ ๋ด์ฉ | ํ์ |
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
-
๊ธ ๋ฑ๋ก์ ์ฑ๊ณตํ๋ฉด ์ํ์ฝ๋ 201๊ณผ "post article success" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
-
๊ธ ๋ฑ๋ก์ ์คํจํ๋ฉด ์ํ์ฝ๋ 500๊ณผ "Server Error" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
Request
-
์ต์ ์ GET /article/recent
-
์ถ์ฒ ์ GET /article/like
Response
- ์ต์ ์ ์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค. (created_at ์ต์ ์ ์ ๋ ฌ)
[
{
"article_id": 155,
"user_id": 5,
"article_content": "ใดใ
ใ
ใ
",
"comment_count": 1,
"like_count": 0,
"created_at": "2022-09-30T16:53:47.226Z",
"user": {
"user_nickname": "์ฝ๋ฆฐ์ด"
}
},
{
"article_id": 118,
"user_id": 6,
"article_content": "์จ๋ผ์ธ์ผ๋ก ์ฝ๋ฉํ
์คํธ ์คํฐ๋ ๊ฐ์ด ํ์ค ๋ถ ๊ณ์ ๊ฐ์?",
"comment_count": 0,
"like_count": 3,
"created_at": "2022-09-28T18:42:49.154Z",
"user": {
"user_nickname": "Sam Yoon"
}
},
{
"article_id": 113,
"user_id": 8,
"article_content": "ํ๋ฌํฐ์ ๊ด์ฌ์ด ๋ง์ด ์๊ฒผ๋๋ฐ, ํ๋ฌํฐ ๊ฐ์๋ ์์์ผ๋ฉด ์ข๊ฒ ๋ค์. ํน์ ๊ฐ์ ๊ณํ ์์ผ์ ๋ถ ์๋์? ๋ง๋ค์ด์ฃผ์ธ์! ๊ฐ์ ๋์ค๋ฉด ์ ๊ฐ ์๊ฐํฉ๋๋ค. ๐ฅ๐ฅ๐ฅ",
"comment_count": 0,
"like_count": 3,
"created_at": "2022-09-27T14:21:39.015Z",
"user": {
"user_nickname": "์ํฐ"
}
},
{
"article_id": 112,
"user_id": 5,
"article_content": "10์ ๋ถํฐ 8์ฃผ ๋์ 'ํด๋ฆฐ์ฝ๋' ์ฑ
๊ฐ์ด ์ฝ์ด๋ด์ ๐ ์ฌ๋๊ณ ์ฝ์ง ์์์ ์ฑ
์ฅ์๋ง ์๋ ํด๋ฆฐ์ฝ๋ ์ฑ
..\n8์ฃผ๋์ ๊ฐ์ด ์ฝ์ด๋ด์!",
"comment_count": 0,
"like_count": 3,
"created_at": "2022-09-27T13:01:01.769Z",
"user": {
"user_nickname": "์ฝ๋ฆฐ์ด"
}
},
{
"article_id": 111,
"user_id": 5,
"article_content": "์๋
ํ์ธ์ :)\n๊ฐ๋จ์ญ ๊ทผ์ฒ์์ ํจ๊ป ์คํฐ๋(๋ชจ๊ฐ์ฝ)ํ ์คํฐ๋์์ ์ถ๊ฐ ๋ชจ์งํฉ๋๋ค.\nํ์ฌ 6์ฃผ ๋์ ์งํํ์๊ณ ํจ๊ป ํ๋ ์คํฐ๋์์ด ์ด์ง์ ์ฑ๊ณตํ์๋ฉด์ ๊ณต์์ด ์๊ฒจ ์ถ๊ฐ ๋ชจ์ง์ ํ๊ฒ ๋์์ต๋๋ค. ์ฐธ์ฌ๋ฅผ ์ํ์ ๋ค๋ฉด ์๋ ์ด๋ฉ์ผ๋ก ์ฐ๋ฝ์ฃผ์ธ์!\[email protected]",
"comment_count": 1,
"like_count": 2,
"created_at": "2022-09-27T13:00:39.919Z",
"user": {
"user_nickname": "์ฝ๋ฆฐ์ด"
}
},
{
"article_id": 110,
"user_id": 5,
"article_content": "๋ฌด๋ฃ ๊ฐ์ ๊ฐ์ฌํฉ๋๋ค! ์ฑ๊ณ ์์!! ์ดํด ์์ ๐๐๐",
"comment_count": 1,
"like_count": 1,
"created_at": "2022-09-27T12:59:12.034Z",
"user": {
"user_nickname": "์ฝ๋ฆฐ์ด"
}
},
{
"article_id": 109,
"user_id": 5,
"article_content": "๋๋ฌด ์ข์๊ฐ์ ์
๋๋ค. ์๋ ์ ์ ์ ๋ฐฐ์ด ์น๊ณต๋ถ์ธ๋ฐ ์๋๋ก์ด๋์์๋ udf๊ฐ ์ ์ ๋์
๋๊ณ ์์ด์ ๋ค์ ๋ค์ผ๋ฌ ์๋ค์ ๋๋ฌด ๋ช
๊ฐ์๋ผ ์ฐธ๊ณ ํ๊ธฐ ๋๋ฌด ์ข์ต๋๋ค ๊ฐ์ฌํฉ๋๋ค",
"comment_count": 0,
"like_count": 1,
"created_at": "2022-09-27T12:58:40.142Z",
"user": {
"user_nickname": "์ฝ๋ฆฐ์ด"
}
}
]
- ์ถ์ฒ ์ ์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค. (like_count ๋์ ์ ์ ๋ ฌ)
[
{
"article_id": 118,
"user_id": 6,
"article_content": "์จ๋ผ์ธ์ผ๋ก ์ฝ๋ฉํ
์คํธ ์คํฐ๋ ๊ฐ์ด ํ์ค ๋ถ ๊ณ์ ๊ฐ์?",
"comment_count": 0,
"like_count": 3,
"created_at": "2022-09-28T18:42:49.154Z",
"user": {
"user_nickname": "Sam Yoon"
}
},
{
"article_id": 113,
"user_id": 8,
"article_content": "ํ๋ฌํฐ์ ๊ด์ฌ์ด ๋ง์ด ์๊ฒผ๋๋ฐ, ํ๋ฌํฐ ๊ฐ์๋ ์์์ผ๋ฉด ์ข๊ฒ ๋ค์. ํน์ ๊ฐ์ ๊ณํ ์์ผ์ ๋ถ ์๋์? ๋ง๋ค์ด์ฃผ์ธ์! ๊ฐ์ ๋์ค๋ฉด ์ ๊ฐ ์๊ฐํฉ๋๋ค. ๐ฅ๐ฅ๐ฅ",
"comment_count": 0,
"like_count": 3,
"created_at": "2022-09-27T14:21:39.015Z",
"user": {
"user_nickname": "์ํฐ"
}
},
{
"article_id": 112,
"user_id": 5,
"article_content": "10์ ๋ถํฐ 8์ฃผ ๋์ 'ํด๋ฆฐ์ฝ๋' ์ฑ
๊ฐ์ด ์ฝ์ด๋ด์ ๐ ์ฌ๋๊ณ ์ฝ์ง ์์์ ์ฑ
์ฅ์๋ง ์๋ ํด๋ฆฐ์ฝ๋ ์ฑ
..\n8์ฃผ๋์ ๊ฐ์ด ์ฝ์ด๋ด์!",
"comment_count": 0,
"like_count": 3,
"created_at": "2022-09-27T13:01:01.769Z",
"user": {
"user_nickname": "์ฝ๋ฆฐ์ด"
}
},
{
"article_id": 111,
"user_id": 5,
"article_content": "์๋
ํ์ธ์ :)\n๊ฐ๋จ์ญ ๊ทผ์ฒ์์ ํจ๊ป ์คํฐ๋(๋ชจ๊ฐ์ฝ)ํ ์คํฐ๋์์ ์ถ๊ฐ ๋ชจ์งํฉ๋๋ค.\nํ์ฌ 6์ฃผ ๋์ ์งํํ์๊ณ ํจ๊ป ํ๋ ์คํฐ๋์์ด ์ด์ง์ ์ฑ๊ณตํ์๋ฉด์ ๊ณต์์ด ์๊ฒจ ์ถ๊ฐ ๋ชจ์ง์ ํ๊ฒ ๋์์ต๋๋ค. ์ฐธ์ฌ๋ฅผ ์ํ์ ๋ค๋ฉด ์๋ ์ด๋ฉ์ผ๋ก ์ฐ๋ฝ์ฃผ์ธ์!\[email protected]",
"comment_count": 1,
"like_count": 2,
"created_at": "2022-09-27T13:00:39.919Z",
"user": {
"user_nickname": "์ฝ๋ฆฐ์ด"
}
},
{
"article_id": 110,
"user_id": 5,
"article_content": "๋ฌด๋ฃ ๊ฐ์ ๊ฐ์ฌํฉ๋๋ค! ์ฑ๊ณ ์์!! ์ดํด ์์ ๐๐๐",
"comment_count": 1,
"like_count": 1,
"created_at": "2022-09-27T12:59:12.034Z",
"user": {
"user_nickname": "์ฝ๋ฆฐ์ด"
}
},
{
"article_id": 109,
"user_id": 5,
"article_content": "๋๋ฌด ์ข์๊ฐ์ ์
๋๋ค. ์๋ ์ ์ ์ ๋ฐฐ์ด ์น๊ณต๋ถ์ธ๋ฐ ์๋๋ก์ด๋์์๋ udf๊ฐ ์ ์ ๋์
๋๊ณ ์์ด์ ๋ค์ ๋ค์ผ๋ฌ ์๋ค์ ๋๋ฌด ๋ช
๊ฐ์๋ผ ์ฐธ๊ณ ํ๊ธฐ ๋๋ฌด ์ข์ต๋๋ค ๊ฐ์ฌํฉ๋๋ค",
"comment_count": 0,
"like_count": 1,
"created_at": "2022-09-27T12:58:40.142Z",
"user": {
"user_nickname": "์ฝ๋ฆฐ์ด"
}
},
{
"article_id": 155,
"user_id": 5,
"article_content": "ใดใ
ใ
ใ
",
"comment_count": 1,
"like_count": 0,
"created_at": "2022-09-30T16:53:47.226Z",
"user": {
"user_nickname": "์ฝ๋ฆฐ์ด"
}
}
]
Request
GET /article/select
Parameter
Parameter | Type | Description | Necessary |
---|---|---|---|
article_id | ์ซ์ | ๊ฒ์๊ธ id | ํ์ |
ex) /article/select?article_id=1
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
[
{
"article_id": 155,
"user_id": 5,
"article_content": "ใดใ
ใ
ใ
",
"comment_count": 1,
"like_count": 0,
"created_at": "2022-09-30T16:53:47.226Z",
"user": {
"user_nickname": "์ฝ๋ฆฐ์ด"
},
"comments": [
{
"id": 113,
"comment_content": "ใดใ
ใ
ใดใ
",
"created_at": "2022-09-30T16:53:50.847Z",
"user": {
"user_id": 5,
"user_nickname": "์ฝ๋ฆฐ์ด"
}
}
]
}
]
Request
PUT /article
Body
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
article_id | ์ซ์ | ๊ฒ์๊ธ id | ํ์ |
article_content | ๋ฌธ์์ด | ๊ฒ์๊ธ ๋ด์ฉ | ํ์ |
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
-
๊ธ ์์ฑ์๊ฐ ์์ฒญ์ ๋ณด๋์ ๊ฒฝ์ฐ ์ํ์ฝ๋ 201๊ณผ "edit article success" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
-
๊ธ ์์ฑ์๊ฐ ์๋ ์ฌ๋์ด ์์ฒญ์ ๋ณด๋์ ๊ฒฝ์ฐ ์ํ์ฝ๋ 403๊ณผ "you're not the author" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
Request
DELETE /article
Body
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
article_id | ์ซ์ | ๊ฒ์๊ธ id | ํ์ |
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
-
๊ธ ์์ฑ์๊ฐ ์์ฒญ์ ๋ณด๋์ ๊ฒฝ์ฐ ์ํ์ฝ๋ 201๊ณผ "delete article success" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
-
๊ธ ์์ฑ์๊ฐ ์๋ ์ฌ๋์ด ์์ฒญ์ ๋ณด๋์ ๊ฒฝ์ฐ ์ํ์ฝ๋ 403๊ณผ "you're not the author" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
Request
POST /comment
Body
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
article_id | ์ซ์ | ๊ฒ์๊ธ id | ํ์ |
comment_content | ๋ฌธ์์ด | ๊ฒ์๊ธ ๋ด์ฉ | ํ์ |
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
-
๋๊ธ ๋ฑ๋ก์ ์ฑ๊ณตํ๋ฉด ์ํ์ฝ๋ 201๊ณผ "post comment success" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
-
๋๊ธ ๋ฑ๋ก์ ์คํจํ๋ฉด ์ํ์ฝ๋ 500๊ณผ "Server Error" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
Request
GET /comment
Parameter
Parameter | Type | Description | Necessary |
---|---|---|---|
article_id | ์ซ์ | ๊ฒ์๊ธ id | ํ์ |
ex) /comment?article_id=1
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค. (๋๊ธ ์ต์ ์ ์ ๋ ฌ)
[
{
"id": 113,
"article_id": 155,
"user_id": 5,
"comment_content": "ใดใ
ใ
ใดใ
",
"created_at": "2022-09-30T16:53:50.847Z",
"user": {
"user_nickname": "์ฝ๋ฆฐ์ด"
}
}
]
Request
Delete /comment
Body
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
comment_id | ์ซ์ | Comment ํ ์ด๋ธ id | ํ์ |
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
-
๋๊ธ ์์ฑ์๊ฐ ์์ฒญ์ ๋ณด๋์ ๊ฒฝ์ฐ ์ํ์ฝ๋ 201๊ณผ "delete comment success" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
-
๋๊ธ ์์ฑ์๊ฐ ์๋ ์ฌ๋์ด ์์ฒญ์ ๋ณด๋์ ๊ฒฝ์ฐ ์ํ์ฝ๋ 403๊ณผ "you're not the author" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
Request
POST /like
Body
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
article_id | ์ซ์ | ๊ฒ์๊ธ id | ํ์ |
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
-
ํด๋น ๊ธ์ ์ถ์ฒ์ ๋๋ฅธ ์ ์ด ์์ ๊ฒฝ์ฐ ์ํ์ฝ๋ 201๊ณผ "post like success" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
-
ํด๋น ๊ธ์ ์ถ์ฒ์ ๋๋ฅธ ์ ์ด ์์ ๊ฒฝ์ฐ ์ํ์ฝ๋ 201๊ณผ "delete like success" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
Request
POST /lecture
Body
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
lecture_title | ๋ฌธ์์ด | ๊ฐ์ ์ ๋ชฉ | ํ์ |
lecture_summary | ๋ฌธ์์ด | ๊ฐ์ ์์ฝ | ํ์ |
lecture_introduction | ๋ฌธ์์ด | ๊ฐ์ ์๊ฐ | ํ์ |
insturctor_introduction | ๋ฌธ์์ด | ๊ฐ์ฌ ์๊ฐ | ํ์ |
lecture_url | ๋ฌธ์์ด | ๊ฐ์ ์ฃผ์ | ํ์ |
lecture_image | ๋ฌธ์์ด | ๊ฐ์ ์ด๋ฏธ์ง | ํ์ |
lecture_price | ์ซ์ | ๊ฐ์ ๊ฐ๊ฒฉ | ํ์ |
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
-
๊ฐ์ ๋ฑ๋ก์ ์ฑ๊ณตํ๋ฉด ์ํ์ฝ๋ 201๊ณผ "post Lecture success" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
-
๊ฐ์ ๋ฑ๋ก์ ์คํจํ๋ฉด ์ํ์ฝ๋ 500๊ณผ "Server Error" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
Request
GET /lecture
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
[
{
"lecture_id": 35,
"lecture_title": "ํ๋ธ๋ฃจํ DAO ์์ฐ ์์",
"lecture_image": "http://img.youtube.com/vi/JYMnGRqSQsM/maxresdefault.jpg",
"lecture_price": 0,
"user": {
"user_id": 14,
"user_nickname": "Jaden1"
}
},
{
"lecture_id": 34,
"lecture_title": "ํ๋ธ๋ฃจํ DAO ๋ฐํ ์์",
"lecture_image": "http://img.youtube.com/vi/A3ZG5HiVyUU/maxresdefault.jpg",
"lecture_price": 10,
"user": {
"user_id": 14,
"user_nickname": "Jaden1"
}
},
{
"lecture_id": 33,
"lecture_title": "๋ธ๋ก์ฒด์ธ ๊ธฐ์ ์ด ๊ฟ๊พธ๋ ๋ฏธ๋ ์์ฅ ๊ฑฐ๋ ์์คํ
์ ๋ณํ",
"lecture_image": "http://img.youtube.com/vi/W-ZARauLKc8/maxresdefault.jpg",
"lecture_price": 0,
"user": {
"user_id": 1,
"user_nickname": "Jaden"
}
},
{
"lecture_id": 32,
"lecture_title": "ํ ์คใ
ฃSLASH 21 - ํ๋ก ํธ์๋ ์น ์๋น์ค์์ ์ฐ์ํ๊ฒ ๋น๋๊ธฐ ์ฒ๋ฆฌํ๊ธฐ",
"lecture_image": "http://img.youtube.com/vi/FvRtoViujGg/maxresdefault.jpg",
"lecture_price": 10,
"user": {
"user_id": 6,
"user_nickname": "Sam Yoon"
}
},
{
"lecture_id": 31,
"lecture_title": "NFT๊ฐ ๋ฏธ๋๋ฅผ ๋ฐ๊ฟ ๋ฐฉ๋ฒ, DAO์ ์๋ค? ๊ธฐ์
์ ๋ฏธ๋, DAO ์ด์ ๋ฆฌ!",
"lecture_image": "http://img.youtube.com/vi/GNIH44WC-ao/maxresdefault.jpg",
"lecture_price": 15,
"user": {
"user_id": 1,
"user_nickname": "Jaden"
}
},
{
"lecture_id": 30,
"lecture_title": "[๋ธํ์ค] ํฌ์ DAO | ํ์ํฌ",
"lecture_image": "http://img.youtube.com/vi/asPEIhl8_R8/maxresdefault.jpg",
"lecture_price": 3,
"user": {
"user_id": 1,
"user_nickname": "Jaden"
}
},
{
"lecture_id": 29,
"lecture_title": "AI๊ฐ ๋ ๋์ ์ฝ๋ฉ์? ๊นํ 'Copilot' ์ ์ฌ์ฉํด๋ดค๋ค!",
"lecture_image": "http://img.youtube.com/vi/x_Yw2f161CU/maxresdefault.jpg",
"lecture_price": 0,
"user": {
"user_id": 1,
"user_nickname": "Jaden"
}
},
{
"lecture_id": 28,
"lecture_title": "์ฝ๋ฉ์ ์ด์ผ๊ฒ ์ต๋๋ค ๋ง์์ง๋ฆฌ AI๊ฐ ๋ ์ฝ๋ฉ ์ํจ",
"lecture_image": "http://img.youtube.com/vi/R-lIeSR8-hE/maxresdefault.jpg",
"lecture_price": 8,
"user": {
"user_id": 1,
"user_nickname": "Jaden"
}
},
{
"lecture_id": 27,
"lecture_title": "์ ์์์ด ํ๋ฆฐ ์ด์ ๋ฅผ ์ค๋ช
ํด๋ณด์ญ์ผ (๊ฐ๋ฐ๋ฉด์ ํ์)",
"lecture_image": "http://img.youtube.com/vi/-GsrYvZoAdA/maxresdefault.jpg",
"lecture_price": 12,
"user": {
"user_id": 1,
"user_nickname": "Jaden"
}
},
{
"lecture_id": 26,
"lecture_title": "ํจ์จ์ ์ธ ํ
์คํธ ์ฝ๋ ์์ฑ๋ฒ",
"lecture_image": "http://img.youtube.com/vi/gs1qM1TF5zA/maxresdefault.jpg",
"lecture_price": 10,
"user": {
"user_id": 1,
"user_nickname": "Jaden"
}
},
{
"lecture_id": 25,
"lecture_title": "React Query์ ์ํ๊ด๋ฆฌ :: 2์ ์ฐ์ํํ
ํฌ์ธ๋ฏธ๋",
"lecture_image": "http://img.youtube.com/vi/MArE6Hy371c/maxresdefault.jpg",
"lecture_price": 20,
"user": {
"user_id": 6,
"user_nickname": "Sam Yoon"
}
},
{
"lecture_id": 24,
"lecture_title": "ํ ์คใ
ฃSLASH 21 - ์ค๋ฌด์์ ๋ฐ๋ก ์ฐ๋ Frontend Clean Code",
"lecture_image": "http://img.youtube.com/vi/edWbHp_k_9Y/maxresdefault.jpg",
"lecture_price": 0,
"user": {
"user_id": 1,
"user_nickname": "Jaden"
}
}
]
Request
GET /lecture/limit
Parameter
Parameter | Type | Description | Necessary |
---|---|---|---|
limit | ์ซ์ | ์ํ๋ ๊ฐ์ ๊ฐ์ | ํ์ |
ex)/lecture/limit?limit=2
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
[
{
"lecture_id": 35,
"lecture_title": "ํ๋ธ๋ฃจํ DAO ์์ฐ ์์",
"lecture_image": "http://img.youtube.com/vi/JYMnGRqSQsM/maxresdefault.jpg",
"lecture_price": 0,
"user": {
"user_id": 14,
"user_nickname": "Jaden1"
}
},
{
"lecture_id": 34,
"lecture_title": "ํ๋ธ๋ฃจํ DAO ๋ฐํ ์์",
"lecture_image": "http://img.youtube.com/vi/A3ZG5HiVyUU/maxresdefault.jpg",
"lecture_price": 10,
"user": {
"user_id": 14,
"user_nickname": "Jaden1"
}
}
]
Request
Delete /lecture
Body
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
lecture_id | ์ซ์ | Lecture ํ ์ด๋ธ lecture_id | ํ์ |
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
-
๊ฐ์ ๋ฑ๋กํ ์ฌ๋์ด ์์ฒญ์ ๋ณด๋์ ๊ฒฝ์ฐ ์ํ์ฝ๋ 201๊ณผ "delete lecture success" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
-
๊ฐ์ ๋ฑ๋กํ์ง ์์ ์ฌ๋์ด ์์ฒญ์ ๋ณด๋์ ๊ฒฝ์ฐ ์ํ์ฝ๋ 403๊ณผ "you're not the author" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
Request
GET /lecture/detail
Parameter
Parameter | Type | Description | Necessary |
---|---|---|---|
lecture_id | ์ซ์ | ๊ฐ์ ์ ๋ชฉ | ํ์ |
ex) /lecture/detail?lecture_id=1
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
[
{
"lecture_id": 35,
"user_id": 14,
"lecture_title": "ํ๋ธ๋ฃจํ DAO ์์ฐ ์์",
"lecture_summary": "์ฝ๋์คํ
์ด์ธ BEB 5๊ธฐ ํ์ด๋ ํ๋ก์ ํธ 7ํ Team Vote ํ๋ธ๋ฃจํ DAO ์์ฐ ์์ ์๋ง์ ์ผ๊ณ ์์ฒญํด ์ฃผ์ธ์.",
"lecture_introduction": "์ฝ๋์คํ
์ด์ธ BEB 5๊ธฐ \nํ์ด๋ ํ๋ก์ ํธ 7ํ Team Vote ํ๋ธ๋ฃจํ DAO ์์ฐ ์์\n\n์๋ง์ ์ผ๊ณ ์์ฒญํด ์ฃผ์ธ์.",
"instructor_introduction": "์ฝ๋์คํ
์ด์ธ BEB 5๊ธฐ \nํ์ด๋ ํ๋ก์ ํธ 7ํ Team Vote",
"lecture_url": "https://youtu.be/JYMnGRqSQsM",
"lecture_image": "http://img.youtube.com/vi/JYMnGRqSQsM/maxresdefault.jpg",
"lecture_price": 0
}
]
Request
POST /userlecture
Body
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
lecture_id | ์ซ์ | ๊ฐ์ ์ ๋ชฉ | ํ์ |
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
์ํ์ฝ๋ 201๊ณผ "post userlecture success" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
Request
GET /userlecture
Parameter
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
lecture_id | ์ซ์ | ๊ฐ์ ์ ๋ชฉ | ํ์ |
ex)/userlecture?user_id=10&lecture_id=2
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
- ์๊ฐ ์ ์ฒญํ ๊ธฐ๋ก์ด ์์ ๊ฒฝ์ฐ
[
{
"id": 3,
"user_id": 10,
"lecture_id": 2,
"created_at": "2022-09-13T10:14:06.559Z",
"updated_at": "2022-09-13T10:14:06.560Z"
}
]
- ์๊ฐ ์ ์ฒญํ ๊ธฐ๋ก์ด ์์ ๊ฒฝ์ฐ
[]
Request
GET: user/userarticle
Parameter
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
ex)/user/userarticle?user_id=14
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
[
{
"article_id": 118,
"user_id": 6,
"article_content": "์จ๋ผ์ธ์ผ๋ก ์ฝ๋ฉํ
์คํธ ์คํฐ๋ ๊ฐ์ด ํ์ค ๋ถ ๊ณ์ ๊ฐ์?",
"comment_count": 0,
"like_count": 3,
"created_at": "2022-09-28T18:42:49.154Z"
}
]
GET: user/usercomment
Parameter
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
ex)/user/usercomment?user_id=14
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
[
{
"id": 96,
"article_id": 110,
"user_id": 6,
"comment_content": "์ต๊ณ !!๐",
"created_at": "2022-09-27T13:05:14.103Z"
}
]
GET: user/userlecture
Parameter
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
ex)/user/userlecture?user_id=12
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
[
{
"lecture_id": 32,
"lecture_image": "http://img.youtube.com/vi/FvRtoViujGg/maxresdefault.jpg",
"lecture_title": "ํ ์คใ
ฃSLASH 21 - ํ๋ก ํธ์๋ ์น ์๋น์ค์์ ์ฐ์ํ๊ฒ ๋น๋๊ธฐ ์ฒ๋ฆฌํ๊ธฐ",
"lecture_price": 10
},
{
"lecture_id": 25,
"lecture_image": "http://img.youtube.com/vi/MArE6Hy371c/maxresdefault.jpg",
"lecture_title": "React Query์ ์ํ๊ด๋ฆฌ :: 2์ ์ฐ์ํํ
ํฌ์ธ๋ฏธ๋",
"lecture_price": 20
}
]
Request
POST /nft
Body
Parameter | Type | Description | Necessary |
---|---|---|---|
recipient | ๋ฌธ์์ด | nft ๋ฐ์ ๊ณ์ ์ฃผ์ | ํ์ |
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
-
ํ ํฐ ์์ก์ด ์ถฉ๋ถํด์ nft ๋ฏผํ ์ ์ฑ๊ณตํ์ ๊ฒฝ์ฐ ์ํ์ฝ๋ 201๊ณผ "mint nft success" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
-
ํ ํฐ ์์ก์ด ๋ถ์กฑํ ๊ฒฝ์ฐ ์ํ์ฝ๋ 403๊ณผ "insufficient token balance" ๋ฉ์์ง๋ก ์๋ตํฉ๋๋ค.
Request
GET /user/userclass
Parameter
Parameter | Type | Description | Necessary |
---|---|---|---|
user_id | ์ซ์ | User ํ ์ด๋ธ user_id | ํ์ |
ex) /user/userclass?user_id=9
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
[
{
"lecture": {
"lecture_id": 33,
"lecture_image": "http://img.youtube.com/vi/W-ZARauLKc8/maxresdefault.jpg",
"lecture_title": "๋ธ๋ก์ฒด์ธ ๊ธฐ์ ์ด ๊ฟ๊พธ๋ ๋ฏธ๋ ์์ฅ ๊ฑฐ๋ ์์คํ
์ ๋ณํ",
"lecture_price": 0
}
},
{
"lecture": {
"lecture_id": 32,
"lecture_image": "http://img.youtube.com/vi/FvRtoViujGg/maxresdefault.jpg",
"lecture_title": "ํ ์คใ
ฃSLASH 21 - ํ๋ก ํธ์๋ ์น ์๋น์ค์์ ์ฐ์ํ๊ฒ ๋น๋๊ธฐ ์ฒ๋ฆฌํ๊ธฐ",
"lecture_price": 10
}
}
]
Request
GET /nft
Parameter
Parameter | Type | Description | Necessary |
---|---|---|---|
user_address | ๋ฌธ์์ด | ์ ์ ์ ์ง๊ฐ ์ฃผ์ | ํ์ |
ex) /nft?user_address=0x...
Response
์๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
16