회원가입
POST /user/join/
// header
{
"Content-type": "application/json"
}
// body
{
"data": {
"email": String,
"password": String
}
}
Response
{
"message": "회원가입 성공",
"data": {
"email": String,
"profileImage": null,
"nickname": String,
"about": String,
"id": Int,
"login_method": String
}
}
{
"detail": "메소드(Method) \\"GET\\"는 허용되지 않습니다."
}
{
"password": [
"이 필드의 글자 수가 적어도 8 이상인지 확인하십시오."
]
}
로그인
POST /user/login/email/
// header
{
"Content-type": "application/json"
}
// body
{
"data": {
"email": String,
"password": String
}
}
Response
{
"message": "로그인 성공",
"token": {
"access": "xxxx.yyyy.zzzz",
"refresh": "xxxx.yyyy.zzzz"
},
"user_info": {
"email": String,
"profileImage": null,
"nickname": String,
"about": String,
"id": Int,
"login_method": String
},
"follower": [],
"notify": []
}
{
"message": "이메일과 비밀번호를 다시 확인해 주세요."
}
프로필
POST /user/profile/
// header
{
"Content-type": "application/json",
"Authorization": "Bearer ${access}",
}
Response
{
"serializer": {
"nickname": String,
"about": String
},
"my_posts": [],
"follower": [],
"following": []
}
{
"detail": "자격 인증데이터(authentication credentials)가 제공되지 않았습니다."
}
프로필 수정
POST /user/profile/update/
// header
{
"Content-type": "application/json",
"Authorization": "Bearer ${access}",
}
// body
{
"data": {
"nickname": String,
"profileImage": File,
"about": String
}
}
Response
{
"email": String,
"profileImage": null,
"nickname": String,
"about": String,
"id": Int,
"login_method": String
}
비밀번호 변경
POST /user/profile/change-password/
// header
{
"Content-type": "application/json",
"Authorization": "Bearer ${access}",
}
// body
{
"data": {
"current_password": String,
"new_password": String
}
}
Response
{
"message": "비밀번호 변경이 완료되었습니다."
}
{
"message": "현재 비밀번호가 일치하지 않습니다."
}
회원탈퇴
POST /user/profile/delete/
// header
{
"Content-type": "application/json",
"Authorization": "Bearer ${access}",
}
Response
{
"message": "회원탈퇴 완료"
}
{
"detail": "찾을 수 없는 사용자",
"code": "user_not_found"
}
팔로잉
API: /user/follow/
USER /user/follow/
Request
// header
{
"Content-type": "application/json",
"Authorization": "Bearer ${access}",
}
// body
{
"data":
{
"follower_id": string,
"target_id": string,
}
}
Response
{
"message": "팔로우 추가 하셨습니다.",
}
언팔로잉
API: /user/follow/
USER /user/follow/
Request
// header
{
"Content-type": "application/json",
"Authorization": "Bearer ${access}",
}
// body
{
"data":
{
"follower_id": string,
"target_id": string,
}
}
Response
{
"message": "팔로우를 해제 하셨습니다.",
}
글 목록
API: /post/
POST /post/
Request
// header
{
"Content-type": "application/json"
}
// body
{
}
Response
Success
{
"posts": [Object]
}
최신 글 목록
글 작성
글 수정
글 삭제
뷰
검색