-
Notifications
You must be signed in to change notification settings - Fork 0
NewsType API
atsanan edited this page Oct 18, 2018
·
8 revisions
GET /api/v1/newsType?page=0&limit=0
| Field | Description | Optional | Default |
|---|---|---|---|
| page | Current index of page | Yes | 0 |
| limit | Maximum of page | Yes | 10 |
{
"data": {
"newsTypes": [
{
"_id": "5b8dd237aaea3c3fa4560211",
"created_at": "2018-09-04T00:30:47.736Z",
"newsTypeDetail": {
"chi1": "newsTypeDetailChi1",
"chi2": "newsTypeDetailChi2",
"eng": "newsTypeDetailEng",
"thai": "newsTypeDetailThai"
},
"newsTypeName": {
"chi1": "newsTypeName",
"chi12": "newsTypeName",
"eng": "newsTypeName",
"thai": "newsTypeName"
},
"order": 1,
"updated_at": "2018-09-05T03:27:59.528Z"
},
{
"_id": "5bc04bdd5ae5873eb0007649",
"created_at": "2018-10-12T07:23:09Z",
"newsTypeDetail": {
"chi1": "chi1",
"chi2": "chi2",
"eng": "eng",
"thai": "tha"
},
"newsTypeName": {
"chi1": "chi1",
"chi2": "chi2",
"eng": "eng",
"thai": "thai"
},
"order": 1000,
"updated_at": "2018-10-12T07:23:09Z"
}
],
"pageIndex": 0,
"pageLimit": 10,
"pages": 1,
"paging": {
"next": "",
"previous": ""
}
},
"isSuccess": true
}
POST /api/v1/newsType
| Field | Description | Optional | Default |
|---|---|---|---|
| newsTypeName | Name of NewsType | No | |
| newsTypeDetails | Details of NewsType | No | |
| order | order | No |
{
"data": {
"_id": "5b8e88ed784d600001faf924",
"created_at": "2018-09-04T13:30:21.041Z",
"updated_at": "2018-09-04T13:30:21.041Z",
"newsTypeDetail": {
"chi1": "newsTypeDetailChi1",
"chi2": "newsTypeDetailChi2",
"eng": "newsTypeDetailEng",
"thai": "newsTypeDetailThai"
},
"newsTypeName": {
"chi1": "newsTypeName",
"chi12": "newsTypeName",
"eng": "newsTypeName",
"thai": "newsTypeName"
},
"order":1
},
"isSuccess": true
}
POST /api/v1/newsType/{id:srting}
| Field | Description | Optional | Default |
|---|---|---|---|
| newsTypeName | Name of NewsType | No | |
| newsTypeDetails | Details of NewsType | No | |
| order | order | No |
{
"data": {
"_id": "5b8e88ed784d600001faf924",
"created_at": "2018-09-04T13:30:21.041Z",
"updated_at": "2018-09-04T13:30:21.041Z",
"newsTypeDetail": {
"chi1": "newsTypeDetailChi1",
"chi2": "newsTypeDetailChi2",
"eng": "newsTypeDetailEng",
"thai": "newsTypeDetailThai"
},
"newsTypeName": {
"chi1": "newsTypeName",
"chi12": "newsTypeName",
"eng": "newsTypeName",
"thai": "newsTypeName"
},
"order":1
},
"isSuccess": true
}