User 객체 조회
한 유저의 정보를 조회합니다.
METHOD & URL
GET /user/[id값]/
Permission
모든 사용자
Success Response
HTTP Response
200
Content
{
"id": 유저 id값,
"email": "이메일",
"nickname": "닉네임",
"profile_img": 프로필 이미지 주소,
"profile_bg": 프로필 배경 이미지 주소,
"instrument": "악기",
"user_type": "유저 타입",
"genre": 선호 장르,
"total_liked": 받은 좋아요 총합,
"liked_posts": {
"post_[id값]": {
"id": 포스트 id,
"profile_img": 프로필 이미지 주소,
"title": "제목",
"genre": "장르",
"instrument": "악기",
"num_liked": 받은 좋아요 수,
"num_comments": 커맨트 트랙 수,
"created_date": "생성 일시"
},
.
.
.
},
"num_followings": 팔로우 중인 유저 수,
"following": [
"유저 닉네임",
],
"num_followers": 해당 유저를 팔로우 중인 유저 수,
"followers": [
"유저 닉네임",
],
"is_active": true,
"last_login": 마지막 로그인 일시,
"post_set": {
"post_[id값]": {
"id": 포스트 id,
"title": "제목",
"genre": "장르",
"instrument": "악기",
"num_liked": 받은 좋아요 수,
"num_comments": 커맨트 트랙 수,
"created_date": "생성 일시"
},
.
.
.
}
}
Error Response
404 Not Found:
잘못된 pk 값을 URL에 전달한 경우 또는 해당 pk를 가지는 유저가 없는 경우.