Users - Gachon-P-project/Back GitHub Wiki
μ¬μ©μ λ±λ‘, μΈλΆ APIμ μ°λνμ¬ λ±λ‘λ μ¬μ©μμΈμ§ νμΈ, μ¬μ©μ μ 보 μ‘°ν, μκ°ν μ‘°νλ₯Ό μννλ λ‘μ§
- μ¬μ©μ λ±λ‘
- μ¬μ©μ νμΈ λ° μ‘°ν
- μκ°ν μ‘°ν
- λλ€μ μ€λ³΅νμΈ
- λλ€μ μμ
-
URL
/users
-
Method
POST
-
Data Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
user_no | μ¬μ©μ νλ² | Int | O |
user_id | μ¬μ©μ ID | VARCHAR(20) | O |
user_name | μ¬μ©μ μ΄λ¦ | VARCHAR(20) | O |
nickname | μ¬μ©μ λλ€μ | VARCHAR(10) | O |
user_major | μ¬μ©μ νκ³Ό | VARCHAR(30) | O |
- Sample Call
http://localhost:17394/users
- Data Input Exaple:
{
"user_no" : "201700000",
"user_id" : "user_test",
"user_name": "ν
μ€νΈ",
"nickname" : "ν
μ€νΈκ³μ μ΄λ€",
"user_major": "μ»΄ν¨ν°κ³΅νκ³Ό"
}
-
Success Response
Code: 200
-
Error Response
Code: 400 BAD REQUEST
-
URL
/users/check
-
Method
POST
-
Data Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
id | μ¬μ©μ ID | String | O |
pwd | μ¬μ©μ Password | String | O |
- Sample Call
http://localhost:17394/users/check
- Data Input Exaple:
{
"id" : "GACHON_ID",
"pwd" : "GACHON_PWD"
}
-
Success Response
* λ±λ‘λ μ¬μ©μμΌ κ²½μ°
{
"code": 200,
"data": {
"user_no": "201739412",
"user_id": "jy11290",
"user_name": "κΉμ§μ",
"user_major": "μ»΄ν¨ν°κ³΅νκ³Ό",
"nickname": "jy-kkkim"
}
}
* λ±λ‘λμ§ μμ μ¬μ©μμΌ κ²½μ°
{
"code": 204,
"data": {
"user_no": "201739412",
"user_id": "jy11290",
"user_name": "κΉμ§μ",
"user_major": "μ»΄ν¨ν°κ³΅νκ³Ό"
}
}
-
Error Response
* λ‘κ·ΈμΈ μ€ν¨
{ "ID/PWλ₯Ό νμΈνμΈμ." }
* μλ² μ°κ²° μ€ν¨
{ "DB μ°κ²° μ€λ₯" }
-
URL
/users/timetable/:user_no/:year/:sem
-
Method
GET
-
URL Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
user_no | μ¬μ©μ νλ² | String | O |
year | μ‘°νν λ λ | String | O |
sem | μ‘°νν νκΈ°(10: 1νκΈ°, 11: μ¬λ¦νκΈ°, 20: 2νκΈ°, 21: 겨μΈνκΈ°) | String | O |
- Sample Call
http://localhost:17394/user/timetable/201739412/2020/20
-
Success Response
[
{
"day": "μμμΌ MONDAY",
"data": [
{
"subject": "μ°½μ
κ³Ό κΈ°μ
κ°μ μ / λΉμ νμ-B201 / μ΅μ°½λͺ
",
"time": "1100 ~ 1150"
},
{
"subject": "μ°½μ
κ³Ό κΈ°μ
κ°μ μ / λΉμ νμ-B201 / μ΅μ°½λͺ
",
"time": "1200 ~ 1250"
},
{
"subject": "μ»΄ν¨ν°κ΅¬μ‘° / ITλν-602 / μ΄μμ",
"time": "1430 ~ 1545"
},
{
"subject": "μ’
ν©νλ‘μ νΈ / ITλν-502 / μμ€μ",
"time": "1825 ~ 1915"
},
{
"subject": "μ’
ν©νλ‘μ νΈ / ITλν-502 / μμ€μ",
"time": "1920 ~ 2010"
},
{
"subject": "μ’
ν©νλ‘μ νΈ / ITλν-502 / μμ€μ",
"time": "2015 ~ 2105"
}
]
},
{
"day": "νμμΌ TUESDAY",
"data": [
{
"subject": "μ»΄ν¨ν°κ΅¬μ‘° / ITλν-602 / μ΄μμ",
"time": "1600 ~ 1715"
},
{
"subject": "μ’
ν©νλ‘μ νΈ / ITλν-502 / μμ€μ",
"time": "1825 ~ 1915"
},
{
"subject": "μ’
ν©νλ‘μ νΈ / ITλν-502 / μμ€μ",
"time": "1920 ~ 2010"
}
]
},
{
"day": "μμμΌ WEDNESDAY",
"data": [
{
"subject": "λκΈ°μ
Β·μ€κ²¬κΈ°μ
μ·¨μ
μ€λΉμ λ΅ / κ°μ²κ΄-B101 / μ‘°μ§μ",
"time": "1300 ~ 1350"
},
{
"subject": "λκΈ°μ
Β·μ€κ²¬κΈ°μ
μ·¨μ
μ€λΉμ λ΅ / κ°μ²κ΄-B101 / μ‘°μ§μ",
"time": "1400 ~ 1450"
}
]
}
]
-
Error Response
Code: 400 BAD REQUEST
-
URL
/user/nickname/check/:nickname
-
Method
GET
-
URL Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
nickname | μ¬μ©ν λλ€μ | String | O |
- Sample Call
http://localhost:17394/users/nickname/check/ν
μ€νΈκ³μ μ΄λ€
-
Success Response
* μ¬μ© κ°λ₯
"μ¬μ©κ°λ₯ν λλ€μ μ
λλ€."
* μ¬μ© λΆκ°λ₯
"μ΄λ―Έ λ±λ‘λ λλ€μ μ
λλ€."
-
Error Response
Code: 400 BAD REQUEST
-
URL
/users/nickname
-
Method
PUT
-
Data Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
nickname | μ¬μ©μ λλ€μ | VARCHAR(10) | O |
user_no | μ¬μ©μ νλ² | Int | O |
- Sample Call
http://localhost:17394/users/nickname
- Data Input Exaple:
{
"nickname": "λλ€μμμ ",
"user_no": "201700000"
}
-
Success Response
Code: 200
-
Error Response
Code: 400 BAD REQUEST
-
URL
/users/subject-url
-
Method
POST
-
Data Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
subject | μμ μ΄λ¦ | VARCHAR(70) | O |
professor | κ΅μ μ΄λ¦ | VARCHAR(30) | O |
- Sample Call
http://localhost:17394/users/subject-url
- Data Input Exaple:
[
{
"subject" : "λͺ¨λ°μΌμΉ",
"professor" : "μ΅μ§μ°"
},
{
"subject" : "ERPνλ‘μ νΈ",
"professor" : "μ΄μνΈ"
}
]
-
Success Response
[
{
"subject": "λͺ¨λ°μΌμΉ",
"professor": "μ΅μ§μ°",
"url": "http://gachon.webex.com/meet/jwchoi"
},
{
"subject": "ERPνλ‘μ νΈ",
"professor": "μ΄μνΈ",
"url": "http://gachon.webex.com/meet/lyh"
}
]
-
Error Response
Code: 400 BAD REQUEST