Profile Stats Retrieve
유저 프로필 페이지 "유저 활동 통계(stats)정보" 가져오기
Client에서 보낸 데이터의 pk에 해당하는 유저의 메인 프로필 정보를 보여줍니다.
유저 활동 통계(stats)정보: 답변 뷰수(현재 생략), 답변 수, 추천 수, 팔로워 수, 팔로잉 수
URL
/user/<pk>/profile/stats/
Method
GET
Header
Key | Value |
---|---|
Authorization | Token(로그인 성공했을 때 받은 Token key값) |
URL Params
Key | Description | Value | Type | Require |
---|---|---|---|---|
pk | 프로필 유저의 pk값 | User pk | Integer | True |
Success Response
HTTP Status Code
200
Content
{
# 답변 수
"answer_count": 2,
# 추천 수
"upvote_count": 4,
# 팔로워 수
"follower_count": 8,
# 팔로잉 수
"following_count": 4
}
Error Response
Not Found Error
HTTP Status Code
404
Content
# 존재하지 않는 유저의 pk를 URI에 담아서 보낸 경우
{
"detail": "찾을 수 없습니다."
}
Unauthorized Error
HTTP Status Code
401
Content
# 유저 Token을 헤더에 담지 않고 요청을 보낸 경우
{
"detail": "자격 인증데이터(authentication credentials)가 제공되지 않았습니다."
}
Unauthorized Error
HTTP Status Code
401
Content
# 존재하지 않는 유저 Token을 헤더에 담아 요청을 보낸 경우
{
"detail": "토큰이 유효하지 않습니다."
}