Skip to content

[GET] 검색

Gyunny edited this page Jun 12, 2021 · 8 revisions
메소드 경로 설명
GET /api/v2/search 검색

스크린샷 2021-05-31 오후 4 01 04

Request Header

{
    "Content-Type": "application/json",
    "accessToken": "access Token"
}

QueryString 설명

Parameter 설명
type my(마이북), user(유저), mark(북마크)
keyword 검색 키워드
Default 요청 예시
http://{{base_url}}/api/v2/search?type=my&keyword=여행

Response


유저 검색

< Success >

{
    "status": 200,
    "message": "검색 성공입니다.",
    "data": [
        {
            "userId": 4,
            "email": null,
            "nickName": "",
            "intro": "규니",
            "profileUrl": "urll~~",
            "friendStatus": 2
        },
        {
            "userId": 3,
            "email": null,
            "nickName": "규니",
            "intro": null,
            "profileUrl": "urll~~",
            "friendStatus": 1
        }
    ]
}
  • friendStatus: 1(친구), 2(요청 중), 3(친구 아님)

나의 버킷 검색

{
    "status": 200,
    "message": "검색 성공입니다.",
    "data": [
        {
            "id": 39,
            "bucketName": "패러글라이딩 도전",
            "startDate": "2021-03-21 00:00:00",
            "endDate": "2021-05-02 00:00:00",
            "bucketState": "1"
        },
        {
            "id": 93,
            "bucketName": "버킷리스트 제목 여행",
            "startDate": "2021-03-21 00:00:00",
            "endDate": "2021-05-05 00:00:00",
            "bucketState": "3"
        }
    ]
}

북마크 검색

{
    "status": 200,
    "message": "검색 성공입니다.",
    "data": [
        {
            "id": 102,
            "userId": 135,
            "bucketName": "건강 완료",
            "content": "건강 완료",
            "createdDate": "2021-06-06 06:40:49",
            "endDate": "2021-06-06 00:00:00",
            "bucketState": 4,
            "categoryId": 6,
            "userProfileUrl": "profileUrl~~",
            "fin": false,
            "bookmark": true
        }
    ]
}

< Fail >

  • 데이터 누락
{
    "status": 400,
    "message": "필요한 값이 없습니다."
}
  • 서버 에러
{
    "status": 500,
    "message": "서버 내부 에러입니다"
}