Books

책에 대한 api 입니다.

서재 전체 뷰 조회

'서재 전체 뷰 페이지'에서 사용할, 회원이 등록한 책 전체의 정보를 요청한다.

GET https://SEOLLEM.link/books/library

Content-Type : JSON

Query Parameters

Name
Type
Description

page*

int

Page number

size*

int

Size in a page

bookStatus*

String

YET / ING / DONE

Headers

Name
Type
Description

Authorization*

String

Bearer JWT

Path
Type
Description
Not Null

item : bookId

long

등록된 책 테이블의 식별자 ID

O

item : title

string

책 제목

O

item : cover

string

책 표지 이미지 URL

item : author

string

책 저자

item : createdAt

timestamp

책 등록일자

O

item : star

int

책 별점 (0~5)

O

item : currentPage

int

현재까지 읽은페이지

O

item : itemPage

int

책 전체 쪽수

item : bookStatus

string

yet / ing / done

O

item : memoCount

int

책의 메모 개수

pageInfo

pagination

pagination

Example

{
    "item": [
        {
            "bookId": 30,
            "title": "no8",
            "cover": null,
            "author": null,
            "createdAt": "2022-09-30T09:40:26",
            "star": 0,
            "currentPage": 0,
            "itemPage": 0,
            "bookStatus": "YET",
            "memoCount": 0
        },
        {
            "bookId": 28,
            "title": "no2",
            "cover": null,
            "author": "khs",
            "createdAt": "2022-09-29T23:35:29",
            "star": 0,
            "currentPage": 5,
            "itemPage": 100,
            "bookStatus": "YET",
            "memoCount": 0
        },
        {
            "bookId": 27,
            "title": "no1",
            "cover": null,
            "author": "khs",
            "createdAt": "2022-09-29T23:35:23",
            "star": 0,
            "currentPage": 5,
            "itemPage": 100,
            "bookStatus": "YET",
            "memoCount": 14
        }
    ],
    "pageInfo": {
        "page": 1,
        "size": 10,
        "totalElements": 3,
        "totalPages": 1
    }
}

조회 결과 없을 시 Example

{
    "item": [],
    "pageInfo": {
        "page": 1,
        "size": 10,
        "totalElements": 0,
        "totalPages": 0
    }
}

캘린더 뷰 조회

캘린더 뷰 페이지를 위한 다 읽은 책 정보를 반환한다.

GET https://SEOLLEM.link/books/calender

Content-Type : JSON

Query Parameters

Name
Type
Description

page*

int

Page number

size*

int

Size in a page

Headers

Name
Type
Description

Authorization*

String

Bearer JWT

Path
Type
Description
Not Null

item : bookId

long

책 식별자 ID

O

item : readEndDate

timestamp

다 읽은 날짜

O

item : cover

String

책 표지 이미지 URL

pageInfo

pagination

pagination

Example

{
    "item": [
        {
            "bookId": 29,
            "readEndDate": "2022-09-20T12:12:47",
            "cover": null
        },
        {
            "bookId": 30,
            "readEndDate": "2022-09-20T12:12:47",
            "cover": null
        }
    ],
    "pageInfo": {
        "page": 1,
        "size": 10,
        "totalElements": 2,
        "totalPages": 1
    }
}

조회 결과 없을 시 Example

{
    "item": [],
    "pageInfo": {
        "page": 1,
        "size": 10,
        "totalElements": 0,
        "totalPages": 0
    }
}

오래된 책 조회

읽지 않은 상태로 오래된 책 정보를 반환한다.

GET https://SEOLLEM.link/books/abandon

Content-Type : JSON

Query Parameters

Name
Type
Description

page*

int

Page number

size*

int

Size in a page

Headers

Name
Type
Description

Authorization*

String

Bearer JWT

Path
Type
Description
Not Null

item : bookId

long

책 식별자 ID

O

item : createdAt

timestamp

책 등록일자

O

item : title

String

책 제목

O

item : cover

String

책 표지 이미지 URL

pageInfo

pagination

pagination

Example

{
    "item": [
        {
            "bookId": 30,
            "createdAt": "2022-06-28T14:12:27",
            "title": "no8",
            "cover": null
        },
        {
            "bookId": 29,
            "createdAt": "2022-06-28T14:12:27",
            "title": "no7",
            "cover": null
        }
    ],
    "pageInfo": {
        "page": 1,
        "size": 10,
        "totalElements": 2,
        "totalPages": 1
    }
}

조회 결과 없을 시 Example

{
    "item": [],
    "pageInfo": {
        "page": 1,
        "size": 10,
        "totalElements": 0,
        "totalPages": 0
    }
}

나만의 작은 책 전체 조회

등록된 책 중에서 메모가 존재하는 책들만 찾아 응답한다.

GET https://SEOLLEM.link/books/memo-books

Content-Type : JSON

Query Parameters

Name
Type
Description

page*

int

Page number

size*

int

Size of page

Headers

Name
Type
Description

Authorization*

String

Bearer JWT

Path
Type
Description
Not Null

item : bookId

long

책 식별자 ID

O

item : title

String

책 제목

O

item : cover

String

책 표지 URL

item : memoCount

int

책의 전체 메모 개수

O

pageInfo

pagination

pagination

Example

{
    "item": [
        {
            "bookId": 30,
            "title": "no8",
            "cover": null,
            "memoCount": 1
        },
        {
            "bookId": 27,
            "title": "no1",
            "cover": null,
            "memoCount": 14
        }
    ],
    "pageInfo": {
        "page": 1,
        "size": 10,
        "totalElements": 2,
        "totalPages": 1
    }
}

책 상세페이지 조회

책 상세페이지를 위해 책의 상세정보를 조회한다.

GET https://SEOLLEM.link/books/{book-id}

Content-Type : JSON

Path Parameters

Name
Type
Description

{book-id}*

long

책 식별자 ID

Query Parameters

Name
Type
Description

memoAuthority*

String

ALL / PUBLIC / PRIVATE

Headers

Name
Type
Description

Authorization*

String

Bearer JWT

Path
Type
Description
Not Null

bookId

long

책 식별자 ID

O

title

String

책 제목

O

cover

String

책 표지 URL

author

String

책 저자

publisher

String

출판사

createdAt

timestamp

책 등록일자

O

star

int

별점

O

currentPage

int

현재페이지

itemPage

int

책 전체 쪽수

bookStatus

String

yet / ing / done

O

readStartDate

timestamp

읽기 시작 날짜

readEndDate

timestamp

다 읽은 날짜

memosList : memoId

long

메모 식별자 ID

memosList : memoType

String

메모 타입

memosList : memoContent

String

메모 내용

memosList : memoBookPage

int

메모 연관 책페이지

memosList : memoAuthortiy

String

메모 보기 권한

memosList : memoLikesCount

int

메모 좋아요 개수

memoCount

int

책의 메모 개수

Response Example

```json
{
    "bookId": 4,
    "title": "no7",
    "cover": null,
    "author": null,
    "publisher": null,
    "createdAt": "2023-02-13T16:02:52.48711",
    "star": 0,
    "currentPage": 0,
    "itemPage": 0,
    "bookStatus": "ING",
    "readStartDate": "2022-09-29T00:00:02",
    "readEndDate": null,
    "memosList": [
        {
            "memoId": 6,
            "memoType": "QUESTION",
            "memoContent": "메모 내용",
            "memoBookPage": 500,
            "memoAuthority": "PRIVATE",
            "memoLikesCount": 0,
            "createdAt": "2023-02-17T18:10:27.120186",
            "updatedAt": "2023-02-17T18:10:27.120186"
        },
        {
            "memoId": 7,
            "memoType": "QUESTION",
            "memoContent": "메모 내용",
            "memoBookPage": 234,
            "memoAuthority": "PUBLIC",
            "memoLikesCount": 0,
            "createdAt": "2023-02-17T19:46:31.155358",
            "updatedAt": "2023-02-17T19:46:31.155358"
        }
    ],
    "memoCount": 13
}
```

책 메모 조회

책에 달린 메모들 중, 지정된 타입의 메모들을 모두 반환한다.

GET https://SEOLLEM.link/books/{book-id}/memos

Content-Type : JSON

Path Parameters

Name
Type
Description

{book-id}*

long

책 식별자 ID

Query Parameters

Name
Type
Description

page*

int

Page number

size*

int

Size of page

memoType*

String

BOOK_CONTENT SUMMARY THOUGHT QUESTION ALL

Headers

Name
Type
Description

Authorization*

String

Bearer JWT

Response Example

```json
{
    "item": [
        {
            "memoId": 17,
            "memoType": "BOOK_CONTENT",
            "memoContent": "메모 내용",
            "memoBookPage": 234,
            "memoAuthority": "PRIVATE",
            "memoLikesCount": 0,
            "createdAt": "2023-02-26T12:24:40.923768",
            "updatedAt": "2023-02-26T12:24:40.923768"
        },
        {
            "memoId": 8,
            "memoType": "QUESTION",
            "memoContent": "메모 내용",
            "memoBookPage": 352,
            "memoAuthority": "PUBLIC",
            "memoLikesCount": 0,
            "createdAt": "2023-02-17T19:46:34.258864",
            "updatedAt": "2023-02-17T19:46:34.258864"
        }
    ],
    "pageInfo": {
        "page": 1,
        "size": 10,
        "totalElements": 12,
        "totalPages": 2
    }
}
```

조회 결과 없을 시 Example

{
    "item": [],
    "pageInfo": {
        "page": 1,
        "size": 10,
        "totalElements": 0,
        "totalPages": 0
    }
}

책 등록

회원의 책으로 등록한다.

POST https://SEOLLEM.link/books

Content-Type : JSON

Headers

Name
Type
Description

Authorization*

String

Bearer JWT

Request Body

Name
Type
Description

title*

String

책 제목

author

String

책 작가

cover

String

책 표지 URL

itemPage

int

책 전체 쪽수

currentPage

int

책 현재페이지

publisher

String

출판사

bookStatus

String

YET(0) / ING(1) / DONE(2)

readStartDate

timestamp

yyyy-MM-ddTHH:mm:ss or NULL

readEndDate

timestamp

yyyy-MM-ddTHH:mm:ss or NULL

Path
Type
Description
Not Null

bookId

long

책 식별자 ID

O

title

String

책 제목

O

author

String

책 저자

cover

String

책 표지 URL

bookStatus

String

yet / ing /done

O

Example

{
    "bookId": 31,
    "title": "미움 받을 용기",
    "author": "아들러",
    "cover": null,
    "bookStatus": "YET"
}

책 수정

등록된 책을 수정한다.

PATCH https://SEOLLEM.link/books/{book-id}

Content-Type : JSON

Path Parameters

Name
Type
Description

{book-id}*

long

책 식별자 ID

Headers

Name
Type
Description

Authorization*

String

Bearer JWT

Request Body

Name
Type
Description

readStratDate

timestamp

yyyy-MM-ddTHH:mm:ss or NULL

readEndDate

timestamp

yyyy-MM-ddTHH:mm:ss or NULL

bookStatus

String

YET(0) / ING(1) / DONE(2)

star

int

별점

currentPage

int

현재 페이지

itemPage

int

책 전체 쪽수

publisher

String

출판사

author

String

책 저자

Path
Type
Description
Not Null

author

String

업데이트 된 책 저자

publisher

String

업데이트 된 출판사

itemPage

int

업데이트 된 책 전체 쪽수

readStartDate

timestamp

업데이트 된 날짜

readEndDate

timestamp

업데이트 된 날짜

bookStatus

String

yet / ing /done

O

star

int

업데이트 된 별점

currentPage

int

업데이트 된 현재 페이지

Example

{
    "author": "khs",
    "publisher": "khs",
    "itemPage": 100,
    "readStartDate": "2022-09-20T12:12:46",
    "readEndDate": "2022-09-20T12:12:47",
    "bookStatus": "YET",
    "star": 0,
    "currentPage": 5
}

책 삭제

등록된 책을 삭제한다.

DELETE https://SEOLLEM.link/books/{book-id}

Content-Type : JSON

Path Parameters

Name
Type
Description

{book-id}*

long

책 식별자 ID

Headers

Name
Type
Description

Authorization*

String

Bearer JWT

책 등록일자 수정

등록된 책의 등록일자를 수정한다.

PATCH https://SEOLLEM.link/books/created-date/{book-id}

Content-Type : String

Path Parameters

Name
Type
Description

{book-id}*

long

책 식별자 ID

Headers

Name
Type
Description

Authorization*

String

Bearer JWT

Request Body

Name
Type
Description

*

String

[예시] 2022-04-01T12:13:14

Last updated