Skip to content

상대방과주고받은쪽지조회

Ji Yeon Kim edited this page Jan 11, 2019 · 2 revisions

상대방과 주고 받은 쪽지 조회

소연

메소드 경로 설명
GET /message/{상대방user_id} 상대방과 주고 받은 쪽지 조회

요청 헤더

Content-Type: application/json
Authorization: token

응답 바디

쪽지 조회 성공

{
    "status": 200,
    "message": "메시지 리스트 조회 성공",
    "data": [
        {
            "sender_name": "김정환",
            "receiver_name": "모카",
            "message_content": "메시지기능입니다",
            "message_send_date": "2019-01-06T16:34:47.000+0000",
            "sender_profile_img": "https://s3.ap-northeast-2.amazonaws.com/project-sopt/commonDefaultimage%403x.png",
            "receiver_profile_img": "https://s3.ap-northeast-2.amazonaws.com/project-sopt/commonDefaultimage%403x.png"
        },
        {
            "sender_name": "김정환",
            "receiver_name": "모카",
            "message_content": "모카",
            "message_send_date": "2019-01-07T07:31:10.000+0000",
            "sender_profile_img": "https://s3.ap-northeast-2.amazonaws.com/project-sopt/commonDefaultimage%403x.png",
            "receiver_profile_img": "https://s3.ap-northeast-2.amazonaws.com/project-sopt/commonDefaultimage%403x.png"
        },
        {
            "sender_name": "모카",
            "receiver_name": "김정환",
            "message_content": "시리얼맛있다~~",
            "message_send_date": "2019-01-06T16:40:30.000+0000",
            "sender_profile_img": "https://s3.ap-northeast-2.amazonaws.com/project-sopt/commonDefaultimage%403x.png",
            "receiver_profile_img": "https://s3.ap-northeast-2.amazonaws.com/project-sopt/commonDefaultimage%403x.png"
        },
        {
            "sender_name": "모카",
            "receiver_name": "김정환",
            "message_content": "반가워요",
            "message_send_date": "2019-01-06T16:43:20.000+0000",
            "sender_profile_img": "https://s3.ap-northeast-2.amazonaws.com/project-sopt/commonDefaultimage%403x.png",
            "receiver_profile_img": "https://s3.ap-northeast-2.amazonaws.com/project-sopt/commonDefaultimage%403x.png"
        },
        {
            "sender_name": "모카",
            "receiver_name": "김정환",
            "message_content": "커피 마시고싶다",
            "message_send_date": "2019-01-07T07:31:27.000+0000",
            "sender_profile_img": "https://s3.ap-northeast-2.amazonaws.com/project-sopt/commonDefaultimage%403x.png",
            "receiver_profile_img": "https://s3.ap-northeast-2.amazonaws.com/project-sopt/commonDefaultimage%403x.png"
        }
    ]
}

쪽지 실패 : 없는 user_id 조회한 경우

{
    "status": 404,
    "message": "메시지 리스트가 없습니다.",
    "data": null
}

INTERNAL SERVER ERROR

{
    "status": 500,
    "message": "서버 내부 에러",
    "data": null
}
Clone this wiki locally