게시글 상세 조회

HTTP request

GET /community/article/1 HTTP/1.1
Authorization: "access token"
Accept: application/json
Host: localhost:8080

HTTP response

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

{
  "id" : 1,
  "mine" : true,
  "header" : {
    "title" : "제목",
    "authorId" : 123,
    "username" : "닉네임",
    "profile" : "profile.jpg",
    "view" : 10,
    "like" : 5,
    "comment" : 3,
    "publishedAt" : "2023-06-19T17:21:42.730851"
  },
  "context" : {
    "context" : "내용",
    "imageList" : [ {
      "imageNo" : 51,
      "imageUrl" : "image.jpg"
    } ]
  }
}

Response fields

Path Type Description

id

Number

게시글 고유번호

mine

Boolean

요청 회원 검증 속성

header

Object

정보 파트

header.title

String

제목

header.authorId

Number

작성자 고유번호

header.username

String

작성자 닉네임

header.profile

String

작성자 프로필

header.view

Number

조회수

header.like

Number

좋아요수

header.comment

Number

댓글수

header.publishedAt

String

작성일

context

Object

내용 파트

context.context

String

내용

context.imageList[].imageNo

Number

이미지 고유번호

context.imageList[].imageUrl

String

이미지 주소

게시글 목록 조회

HTTP request

GET /community/list/recent 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: 509

{
  "hot" : {
    "id" : 1,
    "title" : "제목",
    "context" : "내용",
    "author" : "닉네임",
    "view" : 0,
    "comment" : 1,
    "like" : 1,
    "publishedAt" : "2023-06-19T17:21:42.750796",
    "thumbnail" : "thumb@url.com"
  },
  "weekly" : {
    "id" : 2,
    "title" : "제목",
    "context" : "내용",
    "author" : "닉네임",
    "view" : 0,
    "comment" : 1,
    "like" : 1,
    "publishedAt" : "2023-06-19T17:21:42.750818",
    "thumbnail" : "thumb@url.com"
  },
  "list" : [ ]
}

Response fields

Path Type Description

hot

Object

HOT 게시글 정보

hot.id

Number

게시글 고유번호

hot.title

String

게시글 제목

hot.context

String

게시글 내용

hot.author

String

게시글 작성자 닉네임

hot.view

Number

조회수

hot.comment

Number

댓글수

hot.like

Number

좋아요수

hot.publishedAt

String

게시글 등록일

hot.thumbnail

String

썸네일 이미지 URL

weekly

Object

WEEKLY 게시글 정보

weekly.id

Number

게시글 고유번호

weekly.title

String

게시글 제목

weekly.context

String

게시글 내용

weekly.author

String

게시글 작성자 닉네임

weekly.view

Number

조회수

weekly.comment

Number

댓글수

weekly.like

Number

좋아요수

weekly.publishedAt

String

게시글 등록일

weekly.thumbnail

String

썸네일 이미지 URL

list[]

Array

게시글 정보 리스트

list[].id

Number

게시글 고유번호

list[].title

String

게시글 제목

list[].context

String

게시글 내용

list[].author

String

게시글 작성자 닉네임

list[].view

Number

조회수

list[].comment

Number

댓글수

list[].like

Number

좋아요수

list[].publishedAt

String

게시글 등록일

list[].thumbnail

String

썸네일 이미지 URL

게시글 등록

HTTP request

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

{
  "categoryId" : 1,
  "title" : "제목",
  "context" : "내용",
  "imageList" : [ {
    "id" : 100,
    "url" : "test@url.com"
  } ],
  "thumbnail" : "testThumb@url.com"
}

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

상태코드

게시글 수정

HTTP request

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

{
  "categoryId" : 1,
  "title" : "수정 제목",
  "context" : "수정 내용",
  "imageList" : [ {
    "id" : 1,
    "url" : "test@url.com"
  } ]
}

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

응답 상태코드

게시글 삭제

HTTP request

DELETE /community/article/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: "access token"
Accept: application/json
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

응답 상태코드

북마크 추가

HTTP request

POST /community/bookmark/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: "access token"
Accept: application/json
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

응답 상태코드

북마크 제거

HTTP request

DELETE /community/bookmark/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: "access token"
Accept: application/json
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

응답 상태코드

댓글 목록 조회

HTTP request

GET /community/comment/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: 535

[ {
  "type" : 0,
  "mine" : true,
  "id" : 1,
  "author" : "닉네임",
  "authorId" : 1,
  "context" : "내용",
  "profile" : "url.com",
  "publishedAt" : "2023-06-19T17:21:42.782782",
  "like" : 0,
  "deleteStatus" : 0,
  "blindStatus" : 0,
  "comments" : [ {
    "type" : 0,
    "mine" : true,
    "id" : 1,
    "like" : 0,
    "author" : "닉네임",
    "authorId" : 1,
    "context" : "내용",
    "profile" : "url.com",
    "publishedAt" : "2023-06-19T17:21:42.782117",
    "deleteStatus" : 0,
    "blindStatus" : 0
  } ]
} ]

Response fields

Path Type Description

[].type

Number

댓글 분류

[].mine

Boolean

작성자 확인

[].id

Number

댓글 고유번호

[].author

String

작성자 닉네임

[].authorId

Number

작성자 고유번호

[].context

String

댓글 내용

[].profile

String

작성자 프로필 이미지 URL

[].publishedAt

String

게시글 등록일

[].like

Number

좋아요수

[].deleteStatus

Number

댓글 삭제 상태

[].blindStatus

Number

댓글 노출 상태

[].comments[]

Array

대댓글 목록

[].comments[].type

Number

댓글 분류

[].comments[].mine

Boolean

작성자 확인

[].comments[].id

Number

댓글 고유번호

[].comments[].author

String

작성자 닉네임

[].comments[].authorId

Number

작성자 고유번호

[].comments[].context

String

댓글 내용

[].comments[].profile

String

작성자 프로필 이미지 URL

[].comments[].publishedAt

String

게시글 등록일

[].comments[].like

Number

좋아요수

[].comments[].deleteStatus

Number

댓글 삭제 상태

[].comments[].blindStatus

Number

댓글 노출 상태

댓글 등록

HTTP request

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

{
  "boardId" : 1,
  "parentId" : 2,
  "context" : "댓글 내용"
}

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

응답 상태코드

댓글 수정

HTTP request

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

{
  "id" : 1,
  "context" : "수정 내용"
}

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

응답 상태코드

댓글 삭제

HTTP request

DELETE /community/comment/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: "access token"
Accept: application/json
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

응답 상태코드

좋아요 추가

HTTP request

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

{
  "target" : "article",
  "id" : 1
}

HTTP response

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

{
  "status" : 200,
  "data" : 0
}

Response fields

Path Type Description

status

Number

응답 상태코드

data

Number

갱신된 좋아요 수

좋아요 제거

HTTP request

DELETE /community/heart/article/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: "access token"
Accept: application/json
Host: localhost:8080

HTTP response

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

{
  "status" : 200,
  "data" : 0
}

Response fields

Path Type Description

status

Number

응답 상태코드

data

Number

갱신된 좋아요 수