API Documentation - LikeLion-KNU/dongBTI GitHub Wiki
λBTI κ²μ¬λ₯Ό μ§νν μ 체 μ¬μ©μ μλ₯Ό μ‘°νν©λλ€
METHOD
GET
PATH/stats/total
200 μ±κ³΅
{ "status" : 200, "total_count" : 0 }
λBTI κ²μ¬λ₯Ό μ§νν μ 체 μ¬μ©μ μ λλΉ ν΄λΉ MBTI κ²°κ³Όκ° λμ¨ μΈμ μλ₯Ό μ‘°νν©λλ€
METHOD
GET
PATH/stats?type=TYPE
200 μ±κ³΅
{ "status" : 200, "count" : 0, "total_count" : 0 }
400 BAD REQUEST (μ ν¨νμ§ μμ Type)
{ "status" : 400, "message" : "type μ κ°μ΄ μ ν¨νμ§ μμ΅λλ€" }
λBTI κ²μ¬λ₯Ό μ§νν κ²°κ³Όλ₯Ό μ μ₯ν©λλ€
METHOD
POST
PATH/stats
BODY
{ "department" : "enum", "mbti" : "string" }
βοΈ
department
νλμ λ€μ΄κ° μ μλ κ°
"humanities", "social-sciences", "natural-sciences", "economics", "engineering", "it", "agriculture", "arts", "teachers", "medicine", "dentisty", "vet", "human-sciences", "nursing", "pharmacy", "advanced-technology", "environment", "science-technology", "administration", "undeclared"
201 μ±κ³΅
{ "status" : 201, "data" : { "id" : "string", "total_count" : 0 } }
400 BAD REQUEST (μ ν¨νμ§ μμ Department)
{ "status" : 400, "message" : "department μ κ°μ΄ μ ν¨νμ§ μμ΅λλ€" }
400 BAD REQUEST (μ ν¨νμ§ μμ mbti)
{ "status" : 400, "message": "mbti λ string κ°μ΄μ΄μΌ ν©λλ€" }
μ 체 μ¬μ©μ μ€ MBTI μ ν μμ 10κ°λ₯Ό μ‘°νν©λλ€
METHOD
GET
PATH/stats/top/mbti
200 μ±κ³΅
{ "status" : 200, "top" : [ ["MBTI TYPE", 10], ["MBTI TYPE", 8], ["MBTI TYPE", 3], ] }
νκ³Όλ³ MBTI μ ν μμ 10κ°λ₯Ό μ‘°νν©λλ€
METHOD
GET
PATH/stats/top/department
QUERYkey=DEPARTMENT_TYPE
ex)/stats/top/department?key=it
200 μ±κ³΅
{ "status" : 200, "top" : [ ["MBTI TYPE", 10], ["MBTI TYPE", 8], ["MBTI TYPE", 3], ] }
400 BAD REQUEST (μ ν¨νμ§ μμ Department Query Key)
{ "status" : 400, "message" : "department μ κ°μ΄ μ ν¨νμ§ μμ΅λλ€" }