분양글 등록

HTTP request

POST /adopt HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: "access token"
Accept: application/json
Content-Length: 387
Host: localhost:8080

{
  "title" : "드래곤 분양합니다",
  "content" : "드래곤 분양합니다.",
  "address" : "서울 은평구",
  "age" : "1년 반",
  "gender" : "MAN",
  "kind" : "dog",
  "species" : "뫁티즈",
  "name" : "미미",
  "latitude" : 7.1932,
  "longitude" : 8.1234,
  "image" : [ {
    "imgNo" : 2,
    "imgUrl" : "/test"
  }, {
    "imgNo" : 3,
    "imgUrl" : "/test2"
  } ]
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 20

{
  "status" : 200
}

분양글 수정

HTTP request

PATCH /adopt HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: "access token"
Accept: application/json
Content-Length: 366
Host: localhost:8080

{
  "title" : "드래곤 분양해요",
  "content" : "드래곤 분양합니다.",
  "address" : "서울 은평구",
  "age" : "1년 반",
  "gender" : "MAN",
  "species" : "뫁티즈",
  "name" : "미미",
  "latitude" : 7.1932,
  "longitude" : 8.1234,
  "image" : [ {
    "imgNo" : 2,
    "imgUrl" : "/test"
  }, {
    "imgNo" : 3,
    "imgUrl" : "/test2"
  } ]
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 20

{
  "status" : 200
}

Response fields

Path Type Description

status

Number

status

분양글 삭제

HTTP request

DELETE /adopt/1 HTTP/1.1
Authorization: "access token"
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 20

{
  "status" : 200
}

Response fields

Path Type Description

status

Number

status

관심 분양글 등록

HTTP request

POST /adopt/bookmark/1 HTTP/1.1
Authorization: "access token"
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 20

{
  "status" : 200
}

Response fields

Path Type Description

status

Number

status

분양글 리스트 조회

HTTP request

GET /adopt HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 444

[ {
  "id" : 1,
  "title" : "드래곤분양",
  "address" : "서울 은평구",
  "bookmark" : 3,
  "chat" : 4,
  "publishedAt" : 1687162901297,
  "thumbnail" : "/png1",
  "species" : "몰티즈",
  "status" : 2
}, {
  "id" : 2,
  "title" : "허스키 분양",
  "address" : "서울 마포구",
  "bookmark" : 7,
  "chat" : 8,
  "publishedAt" : 1687162901297,
  "thumbnail" : "/png2",
  "species" : "시베리안 허스키",
  "status" : 3
} ]

분양글 상세 조회

HTTP request

GET /adopt/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: "access token"
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 722

{
  "id" : 1,
  "imageList" : [ {
    "imgNo" : 1,
    "imgUrl" : "/img1"
  }, {
    "imgNo" : 2,
    "imgUrl" : "/img2"
  } ],
  "coords" : {
    "latitude" : 75.34,
    "longitude" : 25.26,
    "address" : "서울 양천구"
  },
  "header" : {
    "title" : "강아지 분양해요",
    "status" : 0,
    "publishedAt" : 1687162901204
  },
  "metadata" : {
    "gender" : "MAN",
    "age" : "1년 반",
    "name" : "갸륵이",
    "species" : "시베리안 허스키"
  },
  "context" : {
    "context" : "허숙희 분양해요",
    "bookmark" : 2,
    "chat" : 8
  },
  "author" : {
    "id" : 1,
    "username" : "분양",
    "profile" : "/profile.jpg",
    "address" : "서울 양천구"
  },
  "mine" : true
}