Skip to content

API 명세

Hyeon9mak edited this page Nov 1, 2021 · 9 revisions

회원 관리

사용자 정보 불러오기

Request

GET /members/me HTTP/1.1
Content-Type: application/json; charset=UTF-8
Authorization : Bearer {accessToken} 

Response

{
    member: {
    id: "int" ,
    nickname: "String",
    imageUrl: "String",
    role: "String"
    }
}

로그인 요청

Request

POST /login/token HTTP/1.1
Content-Type: application/json; charset=UTF-8

{
    code: "String"
}

Response

{
    accessToken: "String"
}

로그인 실패

Response

HTTP/1.1 401 
Content-Type: application/json
Transfer-Encoding: chunked
Date: Sun, 27 Dec 2020 04:32:26 GMT
Keep-Alive: timeout=60
Connection: keep-alive

{
    "message": "로그인에 실패했습니다."
}

전체보기

전체 글 불러오기

GET response

[
    {
        id: '',
        author: {
            id: '',
            nickname: '',
            image: ''
        }
        category: 'string'
        title: 'string',
        tags: ['string', 'string'],
    },
    ...
]

글 작성

카테고리 목록 불러오기

GET request

[ 'string', 'string' ]

글 작성

POST request

Header : {
    token : 'addjfkl123addfda',
}
Body : [
    {
        id: '',
        category: 'string'
        title: 'string',
        tags: ['string', 'string'],
        content: 'string',
    },
    ...
]

개별 글을 불러오기

GET

request (ex. page/{:id})

response

{
    id: '',
    author: {
        id: '',
        nickname: 'string',
        image: 'string'
    }
    issuedDate: 'Date'
    category: 'string'
    title: 'string',
    tags: ['string', 'string'],
    content: 'string',
}
Clone this wiki locally