Skip to content

기사 보기

Hyun Jin K edited this page Feb 25, 2019 · 1 revision

URL

[GET] ~/cms/article

메소드 파라미터명 설명
header token 유저 token
header Content-Type application/json
params article_idx 자세히 볼 기사 인덱스(없으면 전체 기사 보기)

응답예시 - 전체 기사 보기

{
    "status": 3250,
    "success": true,
    "message": "글 읽기 성공",
    "data": [
        {
            "id": 1,
            "title": "title 01",
            "office": "office 01",
            "article_content": "article_content 01",
            "link": "link 01",
            "thumb_img": "thumb_img 01",
            "main_img": "main_img 01",
            "registe_date": "2019-02-24T08:38:02.000Z",
            "update_date": "2019-02-24T08:38:02.000Z",
            "ranking": 1
        },
        {
            "id": 2,
            "title": "title 02",
            "office": "office 02",
            "article_content": "article_content 02",
            "link": "link 02",
            "thumb_img": "thumb_img 02",
            "main_img": "main_img 02",
            "registe_date": "2019-02-24T08:38:02.000Z",
            "update_date": "2019-02-24T08:38:02.000Z",
            "ranking": 2
        },
        {
            "id": 3,
            "title": "title 03",
            "office": "office 03",
            "article_content": "article_content 03",
            "link": "link 03",
            "thumb_img": "thumb_img 03",
            "main_img": "main_img 03",
            "registe_date": "2019-02-24T08:38:02.000Z",
            "update_date": "2019-02-24T08:38:02.000Z",
            "ranking": 3
        },
        {
            "id": 4,
            "title": "title 04",
            "office": "office 04",
            "article_content": "article_content 04",
            "link": "link 04",
            "thumb_img": "thumb_img 04",
            "main_img": "main_img 04",
            "registe_date": "2019-02-24T08:38:02.000Z",
            "update_date": "2019-02-24T08:38:02.000Z",
            "ranking": 4
        },
        {
            "id": 5,
            "title": "title 05",
            "office": "office 05",
            "article_content": "article_content 05",
            "link": "link 05",
            "thumb_img": "thumb_img 05",
            "main_img": "main_img 05",
            "registe_date": "2019-02-24T08:38:02.000Z",
            "update_date": "2019-02-24T08:38:02.000Z",
            "ranking": 5
        },
        {
            "id": 6,
            "title": "title 06",
            "office": "office 06",
            "article_content": "article_content 06",
            "link": "link 06",
            "thumb_img": "thumb_img 06",
            "main_img": "main_img 06",
            "registe_date": "2019-02-24T08:38:02.000Z",
            "update_date": "2019-02-24T08:38:02.000Z",
            "ranking": 6
        },
        {
            "id": 7,
            "title": "title 07",
            "office": "office 07",
            "article_content": "article_content 07",
            "link": "link 07",
            "thumb_img": "thumb_img 07",
            "main_img": "main_img 07",
            "registe_date": "2019-02-24T08:38:02.000Z",
            "update_date": "2019-02-24T08:38:02.000Z",
            "ranking": 7
        },
        {
            "id": 8,
            "title": "title 08",
            "office": "office 08",
            "article_content": "article_content 08",
            "link": "link 08",
            "thumb_img": "thumb_img 08",
            "main_img": "main_img 08",
            "registe_date": "2019-02-24T08:38:02.000Z",
            "update_date": "2019-02-24T08:38:02.000Z",
            "ranking": 8
        },
        {
            "id": 9,
            "title": "title 09",
            "office": "office 09",
            "article_content": "article_content 09",
            "link": "link 09",
            "thumb_img": "thumb_img 09",
            "main_img": "main_img 09",
            "registe_date": "2019-02-24T08:38:02.000Z",
            "update_date": "2019-02-24T08:38:02.000Z",
            "ranking": 9
        },
        {
            "id": 10,
            "title": "title 10",
            "office": "office 10",
            "article_content": "article_content 10",
            "link": "link 10",
            "thumb_img": "thumb_img 10",
            "main_img": "main_img 10",
            "registe_date": "2019-02-24T08:38:02.000Z",
            "update_date": "2019-02-24T08:38:02.000Z",
            "ranking": 10
        }
    ]
}

응답예시 - 특정 기사 자세히 보기

{
    "status": 3200,
    "success": true,
    "message": "댓글 읽기 성공",
    "data": {
        "article": [
            {
                "idx": 1,
                "article_id": 1,
                "writer": 1,
                "content": "안녕하세",
                "writetime": "2019-02-24T18:06:34.000Z",
                "parent": 0,
                "depth": 0
            },
            {
                "idx": 2,
                "article_id": 1,
                "writer": 1,
                "content": "잘부탁드립니",
                "writetime": "2019-02-24T18:11:25.000Z",
                "parent": 0,
                "depth": 0
            }
        ],
        "reply": [
            {
                "idx": 1,
                "article_id": 1,
                "writer": 1,
                "content": "안녕하세",
                "writetime": "2019-02-24T18:06:34.000Z",
                "parent": 0,
                "depth": 0
            },
            {
                "idx": 2,
                "article_id": 1,
                "writer": 1,
                "content": "잘부탁드립니",
                "writetime": "2019-02-24T18:11:25.000Z",
                "parent": 0,
                "depth": 0
            }
        ]
    }
}

댓글 읽기 에러

{
    "status": 3600,
    "success": false,
    "message": "댓글 읽기 에러"
}