친구 리스트 조회 - DevCamp2Flame/FlameTalk_Server GitHub Wiki
Friend List get API
Request
Method
GET
URL
(즐겨찾기 포함) 일반 친구 /api/membership/friend?isHidden=false&isBlocked=false
(즐겨찾기 포함) 일반 친구 중 생일인 친구 /api/membership/friend?isBirthday=true
즐겨찾기 친구 /api/membership/friend?isMarked=true
숨김 친구 /api/membership/friend?isHidden=true
차단 친구 /api/membership/friend?isBlocked=true
Header
Method |
Parameter |
Description |
Content-Type |
application/json |
|
ACCESS-TOKEN |
{token} |
access token값 |
Query Parameter
Parameter |
Type |
Description |
Required |
isBirthday |
Boolean |
생일인 친구 조회 여부. 없는 경우 모두 조회 |
N |
isMarked |
Boolean |
즐겨 찾기 친구 조회 여부. 없는 경우 모두 조회 |
N |
isHidden |
Boolean |
숨김 친구 조회 여부. 없는 경우 모두 조회 |
N |
isBlocked |
Boolean |
차단 친구 조회 여부. 없는 경우 모두 조회 |
N |
Response
Header
Method |
Parameter |
Description |
statusCode |
{statusCode} |
http 상태 코드 값 |
Body
Field |
Type |
Description |
code |
Integer |
응답 코드 |
message |
String |
응답 메세지 |
data |
Object List |
data 참고 |
data
Field |
Type |
Description |
friendId |
Long |
친구 id |
assignedProfileId |
Long |
친구에게 할당한 나의 프로필 id |
userId |
String |
친구 유저 id |
nickname |
String |
친구 유저 닉네임 |
preview |
Object |
친구 유저 프로필. preview 참고 |
preview
Field |
Type |
Description |
profileId |
Long |
친구 유저 프로필 id |
imageUrl |
String |
친구 유저 프로필 사진 S3 URL |
description |
String |
친구 유저 프로필 상태 메세지 |
SUCCESS example
{
"status": 200,
"messsage": "친구 리스트 조회 성공",
"data": [
{
"friendId": 12,
"assignedProfileId": 1,
"userId": "1643163512893324414",
"nickname": "플레임 소연",
"preview": {
"profileId": 2,
"imageUrl": "https://flametalk-bucket.s3.ap-northeast-2.amazonaws.com/profile/flametalk_a_20222621172609.JPG",
"description": "끝까지 열심히!!"
}
},
{
"friendId": 15,
"assignedProfileId": 3,
"userId": "1643163512893324415",
"nickname": "플레임 수연",
"preview": {
"profileId": 21,
"imageUrl": "https://flametalk-bucket.s3.ap-northeast-2.amazonaws.com/profile/flametalk_sa_20222621172609.JPG",
"description": "안녕..."
}
}
]
}
Error Code
Code |
Error Messsage |
400 |
Bad Request |
401 |
Unauthorized |
404 |
Not Found |
500 |
Server Error |
FAIL example
{
"status": 404,
"message": "존재하지 않는 유저입니다.",
"error": "NOT_FOUND",
"code": "USER_NOT_FOUND",
"timestamp": "2022-01-18T19:30:16.3072905",
}