프로필 조회 - DevCamp2Flame/FlameTalk_Server GitHub Wiki

Profile get API

Request

Method

GET

URL

/api/membership/profile/{profileId}

Header

Method Parameter Description
Content-Type application/json
ACCESS-TOKEN {token} access token값

Path Variable

Parameter Type Description Required
profileId Long 프로필 id Y

Response

Header

Method Parameter Description
statusCode {statusCode} http 상태 코드 값

Body

Field Type Description
code Integer 응답 코드
message String 응답 메세지
data Object data 참고

data

Field Type Description
profileId Long 프로필 id
nickname String 유저 닉네임
imageUrl String 프로필 사진 url
bgImageUrl String 프로필 배경 사진 url
sticker JSON Array 프로필에 사용된 스티커 리스트. sticker 참고
description String 프로필 상태 메세지
isDefault boolean 기본 프로필 여부
updatedDate LocalDateTime 프로필 수정한 날짜

sticker

Field Type Description
stickerId Integer 스티커 id
positionX Double 스티커 x 좌표
positionY Double 스티커 y 좌표

SUCCESS example

{
    "status": 200,
    "messsage": "프로필 조회 성공",
    "data": {
        "profileId": 1,
        "nickname": "플레임",
        "imageUrl": "https://flametalk-bucket.s3.ap-northeast-2.amazonaws.com/profile/flametalk_a_20222621172609.JPG",
        "bgImageUrl": "https://flametalk-bucket.s3.ap-northeast-2.amazonaws.com/profile/flametalk_a_20222621172609.JPG",
        "sticker": [{
            "stickerId": 1,
            "stickerX": 349.0,
            "stickerY": -124.6,
        }],
        "description": "Dev Camp 화이팅!!!!!",
        "isDefault": true,
        "updatedDate": "2022-01-14T10:52:39"
    }
}

Error Code

Code Error Messsage
400 Bad Request
401 Unauthorized
404 File Not Found
500 Server Error

FAIL example

{
    "status": 404,
    "message": "존재하지 않는 파일입니다.",
    "error": "NOT_FOUND",
    "code": "FILE_NOT_FOUND",
    "timestamp": "2022-01-18T19:30:16.3072905",
}