친구 관계 수정 - DevCamp2Flame/FlameTalk_Server GitHub Wiki
Profile update API
Request
Method
PUT
URL
/api/membership/friend/{friendId}
Header
| Method |
Parameter |
Description |
| Content-Type |
application/json |
|
| ACCESS-TOKEN |
{token} |
access token값 |
Path Variable
| Parameter |
Type |
Description |
Required |
| friendId |
Long |
수정할 친구 관계 id |
Y |
Body
| Field |
Type |
Description |
Required |
| assignedProfileId |
Long |
친구에게 보여줄 나의 프로필 id |
Y |
| isMarked |
Boolean |
관심 친구 설정 여부 |
Y |
| isHidden |
Boolean |
숨김 친구 설정 여부 |
Y |
| isBlocked |
Boolean |
차단 친구 설정 여부 |
Y |
Response
Header
| Method |
Parameter |
Description |
| statusCode |
{statusCode} |
http 상태 코드 값 |
Body
| Field |
Type |
Description |
| code |
Integer |
응답 코드 |
| message |
String |
응답 메세지 |
| data |
Object |
응답 메세지. data 참고 |
data
| Field |
Type |
Description |
| friendId |
Long |
친구 관계 id |
| userId |
String |
친구의 유저 id |
| nickname |
String |
친구의 유저 닉네임 |
| assignedProfileId |
Long |
친구에게 보여줄 나의 프로필 id |
| type |
String |
친구 관계 타입. DEFAULT, MARKED, HIDDEN, BLOCKED 중 하나 |
| preview |
Object |
친구 유저 프로필. preview 참고 |
preview
| Field |
Type |
Description |
| profileId |
Long |
친구 유저 프로필 id |
| imageUrl |
String |
친구 유저 프로필 사진 S3 URL |
| description |
String |
친구 유저 프로필 상태 메세지 |
SUCCESS example
{
"status": 200,
"messsage": "친구 관계 수정 성공",
"data": {
"friendId": 2,
"userId": "1643163512893324414",
"nickname": "박팀장",
"assignedProfileId": 1,
"type": "DEFAULT",
"preview": {
"profileId": 2,
"imageUrl": "https://flametalk-bucket.s3.ap-northeast-2.amazonaws.com/profile/flametalk_a_20222621172609.JPG",
"description": "끝까지 열심히!!"
}
}
}
Error Code
| Code |
Error Messsage |
| 400 |
Bad Request |
| 401 |
Unauthorized |
| 404 |
File Not Found |
| 500 |
Server Error |
FAIL example
{
"status": 400,
"message": "잘못된 요청입니다.",
"error": "BAD_REQUEST",
"code": "BAD_REQUEST",
"timestamp": "2022-01-18T19:30:16.3072905",
}