Rest API - smuTeam15/Gradation_server GitHub Wiki
Gradation Rest API
index
νλ‘ν μ½ | URI | λ΄μ© |
---|---|---|
GET | / | λ©μΈ νλ©΄ |
GET | /v1/login | λ‘κ·ΈμΈ μ 보μ μ¬μ©μμ μ±λ λͺ©λ‘ λ°ν |
GET /
Request Data
//nothing
Response Data
//nothing
GET /v1/login
Request Data
//nothing
Response Data
{
"userId" : λ‘κ·ΈμΈν μ¬μ©μ ID,
"userName" : "λ‘κ·ΈμΈν μ¬μ©μ λλ€μ",
"userPicture" : "λ‘κ·ΈμΈν μ¬μ©μ μ΄λ―Έμ§"
"channelList" : [
{
"id" : "μ±λ id",
"firstSchool" : "λ±λ‘ν 첫λ²μ§Έ νκ΅ μ΄λ¦",
"secondSchool" : "λ±λ‘ν λλ²μ§Έ νκ΅ μ΄λ¦",
"description" : "μ±λ μ€λͺ
",
"category" : "μ±λ λΆλ₯",
"firstPicture" : "첫λ²μ§Έ νκ΅ μ¬μ§",
"secondPicture" : "λλ²μ§Έ νκ΅ μ¬μ§",
"owner" : "μ±λμ λ±λ‘ν μ¬λ id",
},
{
//List νμ : μλ¨κ³Ό λμΌ
}
]
}
login
νλ‘ν μ½ | URI | λ΄μ© |
---|---|---|
GET | /oauth/authorization/naver | λ€μ΄λ² λ‘κ·ΈμΈ |
GET | /oauth/authorization/google | κ΅¬κΈ λ‘κ·ΈμΈ |
channel
νλ‘ν μ½ | URI | λ΄μ© |
---|---|---|
POST | /api/v1/channel | μ±λ μμ± |
GET | /api/v1/channel | μ¬μ©μκ° λ±λ‘ν μ±λ μ‘°ν |
PUT | /api/v1/channel/{channelId} | μ±λ μμ |
DEL | /api/v1/channel/{channelId} | μ±λ μμ |
POST | /api/v1/channel/{channelCode} | λ€λ₯Έ μ±λμ κ°μ |
POST /api/v1/channel
Request Data
form-data
"firstSchool" : "첫λ²μ§Έ νκ΅ μ΄λ¦",
"secondSchool" : "λλ²μ§Έ νκ΅ μ΄λ¦",
"description" : "μ±λ μ€λͺ
",
"category" : "μ±λ λΆλ₯",
"firstPicture" : "첫λ²μ§Έ νκ΅ μ¬μ§",
"secondPicture" : "λλ²μ§Έ νκ΅ μ¬μ§"
Response Data
μμ±λ μ±λ ID
GET /api/v1/channel1
Request Data
//nothing
Response Data
[
{
"id" : μ±λ ID,
"firstSchool" : "λ±λ‘ν 첫λ²μ§Έ νκ΅ μ΄λ¦",
"secondSchool" : "λ±λ‘ν λλ²μ§Έ νκ΅ μ΄λ¦",
"description" : "μ±λ μ€λͺ
",
"category" : "μ±λ λΆλ₯",
"firstPicture" : "첫λ²μ§Έ νκ΅ μ¬μ§μ CDN μ£Όμ",
"secondPicture" : "λλ²μ§Έ νκ΅ μ¬μ§μ CDN μ£Όμ",
"owner" : μ±λμ μμ±ν μ¬μ©μ ID
},
{
//List νμ : μλ¨κ³Ό λμΌ
}
]
PUT /api/v1/channel/{channelId}
channelId : μμ νλ €λ μ±λ ID
Request Data
form-data
"firstSchool" : "첫λ²μ§Έ νκ΅ μ΄λ¦",
"secondSchool" : "λλ²μ§Έ νκ΅ μ΄λ¦",
"description" : "μ±λ μ€λͺ
",
"category" : "μ±λ λΆλ₯",
"firstPicture" : "첫λ²μ§Έ νκ΅ μ¬μ§",
"secondPicture" : "λλ²μ§Έ νκ΅ μ¬μ§"
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν μ±λ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μμ κΆνμ΄ μλ μ±λμ μ κ·Ό
DELETE /api/v1/channel/{channelId}
channelId : μμ νλ €λ μ±λ ID
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν μ±λ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μμ κΆνμ΄ μλ μ±λμ μ κ·Ό
POST /api/v1/channel/{channelCode}
channelCode : κ°μ νλ €λ μ±λμ κ°μ μ½λ
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν μ±λ κ°μ
μ½λκ° μ‘΄μ¬νμ§ μμ
post
νλ‘ν μ½ | URI | λ΄μ© |
---|---|---|
POST | /api/v1/post | κ²μκΈ μμ± |
GET | /api/v1/post/{channelId} | μ±λμ λ±λ‘λ κ²μκΈ μ‘°ν |
PUT | /api/v1/post/{postId} | κ²μκΈ μμ |
DEL | /api/v1/post/{postId} | κ²μκΈ μμ |
POST /api/v1/post
Request Data
form-data
"picture" : "κ²μκΈ μ¬μ§",
"content" : "κ²μκΈ λ΄μ©",
"channelId" : "μ±λ ID"
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν μ±λ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : κ²μκΈ μμ± κΆνμ΄ μλ μ±λμ μ κ·Ό
GET /api/v1/post/{channelId}
channelId : κ²μκΈμ μ‘°ννλ €λ μ±λ ID
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
[
{
"id" : κ²μκΈ ID,
"picture" : "κ²μκΈ μ¬μ§μ CDN",
"content" : "κ²μκΈ λ΄μ©",
"userId" : κ²μκΈμ λ±λ‘ν μ¬μ©μ ID
"userName" : "κ²μκΈμ λ±λ‘ν μ¬μ©μ μ΄λ¦",
"userPicture" : "κ²μκΈ λ±λ‘ν μ¬μ©μ μ¬μ§ CDN",
"likesId" : [
{
"userId" : κ²μκΈ μ’μμλ₯Ό λλ₯Έ μ¬μ©μ ID,
},
{
//List νμ : μλ¨κ³Ό λμΌ
}
]
"comments" : [
{
"commentId" : λκΈ ID,
"userId" : λκΈμ μμ±ν μ¬μ©μ ID,
"userName" : "λκΈμ μμ±ν μ¬μ©μ μ΄λ¦"
"comment" : "λκΈ λ΄μ©"
},
{
//List νμ : μλ¨κ³Ό λμΌ
}
]
},
{
//List νμ : μλ¨κ³Ό λμΌ
}
]
Response 204 : μμ²ν μ±λ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μ‘°ν κΆνμ΄ μλ κ²μκΈμ μ κ·Ό
PUT /api/v1/post/{postId}
postId : μμ νλ €λ κ²μκΈ ID
Request Data
form-data
"picture" : "κ²μκΈ μ¬μ§",
"content" : "κ²μκΈ λ΄μ©"
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν κ²μκΈ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μμ κΆνμ΄ μλ κ²μκΈμ μ κ·Ό
DELETE /api/v1/post/{postId}
postId : μμ νλ €λ κ²μκΈ ID
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν κ²μκΈ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μμ κΆνμ΄ μλ κ²μκΈμ μ κ·Ό
postlikes
νλ‘ν μ½ | URI | λ΄μ© |
---|---|---|
POST | /api/v1/post/likes/{postId} | κ²μκΈμ μ’μμ μΆκ° |
GET | /api/v1/post/likes/{postId} | κ²μκΈμ λ±λ‘λ μ’μμ μ‘°ν |
DEL | /api/v1/post/likes/{likesId} | κ²μκΈμ λ±λ‘ν μ’μμ μμ |
POST /api/v1/post/likes/{postId}
postId : μ’μμλ₯Ό λ±λ‘ν κ²μκΈ ID
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν κ²μκΈ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μ’μμ μμ± κΆνμ΄ μλ κ²μκΈμ μ κ·Ό
GET /api/v1/post/likes/{postId}
postId : μ’μμλ₯Ό μ‘°ννλ €λ κ²μκΈ ID
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
[
{
"id" : κ²μκΈ μ’μμ ID,
"userId" : μ’μμλ₯Ό λ±λ‘ν μ¬μ©μ ID,
},
{
//List νμ : μλ¨κ³Ό λμΌ
}
]
Response 204 : μμ²ν κ²μκΈ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μ‘°ν κΆνμ΄ μλ κ²μκΈμ μ κ·Ό
DELETE /api/v1/post/likes/{likesId}
likesId : μμ ν μ’μμ ID
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν κ²μκΈ μ’μμ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μμ κΆνμ΄ μλ κ²μκΈ μ’μμμ μ κ·Ό
postcomment
νλ‘ν μ½ | URI | λ΄μ© |
---|---|---|
POST | /api/v1/post/comment/{postId} | κ²μκΈ λκΈ μμ± |
GET | /api/v1/post/comment/{postId} | κ²μκΈ λκΈ μ‘°ν |
DEL | /api/v1/post/comment/{postCommentId} | κ²μκΈ μμ |
POST /api/v1/post/comment/{postId}
postId : λκΈμ μμ±ν κ²μκΈ ID
Request Data
{
"comment" : "λκΈ λ΄μ©"
}
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν κ²μκΈ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : λκΈ μμ± κΆνμ΄ μλ κ²μκΈμ μ κ·Ό
GET /api/v1/post/comment/{postId}
postId : λκΈμ μ‘°νν κ²μκΈ ID
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
[
{
"commentId" : λκΈ ID,
"userId" : "λκΈ μμ±μ ID",
"userName" : "λκΈ μμ±μ μ΄λ¦",
"comment" : "λκΈ λ΄μ©"
},
{
//List νμ : μλ¨κ³Ό λμΌ
}
]
Response 204 : μμ²ν κ²μκΈ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μ‘°ν κΆνμ΄ μλ κ²μκΈμ μ κ·Ό
DELETE /api/v1/post/comment/{postCommentId}
postCommentId : μμ ν κ²μκΈ λκΈ ID
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν κ²μκΈ λκΈ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μμ κΆνμ΄ μλ κ²μκΈ λκΈμ μ κ·Ό
dailymission
νλ‘ν μ½ | URI | λ΄μ© |
---|---|---|
POST | /api/v1/dailymission | μΌμΌ λ―Έμ μμ± |
GET | /api/v1/dailymission/{channelId} | μ±λμ λ±λ‘λ μΌμΌ λ―Έμ μ‘°ν |
PUT | /api/v1/dailymission/{channelId} | μΌμΌ λ―Έμ μμ |
DEL | /api/v1/dailymission/{dailyMissionId} | μΌμΌ λ―Έμ μμ |
POST /api/v1/dailymission
Request Data
form-data
"picture" : "μΌμΌ λ―Έμ
μ¬μ§",
"content" : "μΌμΌ λ―Έμ
λ΄μ©",
"channelId" : "μΌμΌ λ―Έμ
μ λ±λ‘ν μ±λ ID"
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν μ±λ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μΌμΌ λ―Έμ
μμ± κΆνμ΄ μλ μ±λμ μ κ·Ό
GET /api/v1/dailymission/{channelId}
channelId : μΌμΌ λ―Έμ μ΄ μν μ±λμ ID
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
[
{
"id" : dailyMission ID,
"picture" : "μΌμΌ λ―Έμ
μ¬μ§ CDN",
"content" : "μΌμΌ λ―Έμ
λ΄μ©"
},
{
//List νμ : μλ¨κ³Ό λμΌ
}
]
Response 204 : μμ²ν μ±λ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μ‘°ν κΆνμ΄ μλ μ±λμ μ κ·Ό
PUT /api/v1/dailyMission/{dailyMissionId}
dailyMissionId : μΌμΌ λ―Έμ ID
Request Data
form-data
"picture" : "μΌμΌ λ―Έμ
μ¬μ§",
"content" : "μΌμΌ λ―Έμ
λ΄μ©",
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν μΌμΌ λ―Έμ
IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μμ κΆνμ΄ μλ μΌμΌ λ―Έμ
μ μ κ·Ό
DELETE /api/v1/dailymission/{dailyMissionId}
dailyMissionId : μμ νλ €λ μΌμΌ λ―Έμ ID
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν μΌμΌ λ―Έμ
IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μμ κΆνμ΄ μλ μΌμΌ λ―Έμ
μ μ κ·Ό
weeklytopic
νλ‘ν μ½ | URI | λ΄μ© |
---|---|---|
POST | /api/v1/weeklytopic/{channelId} | μ£Όκ° νμ μμ± |
GET | /api/v1/weeklytopic/{channelId} | μ±λμ λ±λ‘λ μ£Όκ° νμ μ‘°ν |
PUT | /api/v1/weeklytopic/{weeklyTopicId} | μ£Όκ° νμ μμ |
DEL | /api/v1/weeklytopic/{weeklyTopicId} | μ£Όκ° νμ μμ |
POST /api/v1/weeklytopic{channelId}
Request Data
{
"title" : "μ£Όκ° νμ μ λͺ©",
"category" : "μ£Όκ° νμ λΆλ₯",
"content" : "μ£Όκ° νμ λ΄μ©",
}
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν μ±λ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μ£Όκ° νμ μμ± κΆνμ΄ μλ μ±λμ μ κ·Ό
GET /api/v1/weeklytopic/{channelId}
channelId : μ£Όκ° νμ κ° μν μ±λμ ID
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
[
{
"id" : μ£Όκ° νμ ID,
"title" : "μ£Όκ° νμ μ λͺ©",
"category" : "μ£Όκ° νμ λΆλ₯",
"content" : "μ£Όκ° νμ λ΄μ©",
"weeklyTopicComments" : [
{
"userId" : μ¬μ©μ ID,
"userName" : "μ¬μ©μ μ΄λ¦",
"commentId" : μΌμΌ νμ λκΈ ID,
"comment" : "μΌμΌ νμ λκΈ λ΄μ©",
},
{
//List νμ : μλ¨κ³Ό λμΌ
}
]
},
{
//List νμ : μλ¨κ³Ό λμΌ
}
]
Response 204 : μμ²ν μ±λ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μ‘°ν κΆνμ΄ μλ μ±λμ μ κ·Ό
PUT /api/v1/weeklytopic/{weeklyTopicId}
weeklyTopicId : μ£Όκ° νμ ID
Request Data
{
"title" : "μ£Όκ° νμ μ λͺ©",
"category" : "μ£Όκ° νμ λΆλ₯",
"content" : "μ£Όκ° νμ λ΄μ©"
}
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν μ£Όκ° νμ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μμ κΆνμ΄ μλ μ£Όκ° νμ μ μ κ·Ό
DELETE /api/v1/weeklytopic/{weeklyTopicId}
weeklyTopicId : μμ νλ €λ μ£Όκ° νμ ID
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν μ£Όκ° νμ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μμ κΆνμ΄ μλ μ£Όκ° νμ μ μ κ·Ό
weeklytopiccomment
νλ‘ν μ½ | URI | λ΄μ© |
---|---|---|
POST | /api/v1/weeklytopic/comment/{weeklyTopicId} | μ£Όκ° νμ λκΈ μμ± |
GET | /api/v1/weeklytopic/comment/{weeklyTopicId} | μ£Όκ° νμ μ λ±λ‘λ λκΈ μ‘°ν |
DEL | /api/v1/weeklytopic/comment/{weeklyTopicCommentId} | μ£Όκ° νμ λκΈ μμ |
POST /api/v1/weeklytopic/comment/{weeklyTopicId}
weeklyTopicId : λκΈμ λ±λ‘ν μ£Όκ° νμ ID
Request Data
{
"comment" : "λκΈ λ΄μ©"
}
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν μ£Όκ° νμ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : λκΈ μμ± κΆνμ΄ μλ μ£Όκ° νμ μ μ κ·Ό
GET /api/v1/weeklytopic/comment/{weeklyTopicId}
weeklyTopicId : λκΈμ μ‘°νν μ£Όκ° νμ ID
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
[
{
"userId" : λκΈμ μμ±ν μ¬μ©μ ID,
"userName" : "λκΈμ μμ±ν μ¬μ©μ μ΄λ¦",
"commentId" : "λκΈ ID",
"comment" : "λκΈ λ΄μ©"
},
{
//List νμ : μλ¨κ³Ό λμΌ
}
]
Response 204 : μμ²ν μ£Όκ° νμ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μ‘°ν κΆνμ΄ μλ μ£Όκ° νμ μ μ κ·Ό
DELETE /api/v1/weeklytopic/comment/{weeklyTopicCommentId}
weeklyTopicCommentId : μ£Όκ° νμ λκΈ ID
Request Data
//nothing
Response Data
Response 200 : μ±κ³΅
Response 204 : μμ²ν μ£Όκ° νμ λκΈ IDκ° μ‘΄μ¬νμ§ μμ
Response 403 : μμ κΆνμ΄ μλ μ£Όκ° νμ λκΈμ μ κ·Ό