GET api/News/gethome?api={api}&iddic={iddic}&limit={limit}

Lấy về tất cả các dòng dữ liệu bởi điều kiện truyền vào

Request Information

URI Parameters

NameDescriptionTypeAdditional information
api

Mã API do hệ thống cung cấp

string

Required

iddic

ID Loại Tin tức

integer

Default value is 0

limit

Giới hạn dữ liệu lấy được trong 1 trang

integer

Default value is 0

Body Parameters

None.

Response Information

Resource Description

objNewsHome
NameDescriptionTypeAdditional information
data

Collection of NewsHome

None.

time

Thời gian hiện tại trên server

integer

None.

status

Trạng thái trả về dữ liệu: success, error

string

None.

message

Nội dung thông báo

string

None.

codemessage

Mã code trả về

string

None.

data

Danh sách dữ liệu

Collection of Object

None.

Response Formats

application/json, text/json

Sample:
{
  "data": [
    {
      "idnews": 1,
      "iddic": 1,
      "title": "sample string 2",
      "summary": "sample string 3",
      "image": "sample string 4",
      "shorttitle": "sample string 5",
      "dateup": 1
    },
    {
      "idnews": 1,
      "iddic": 1,
      "title": "sample string 2",
      "summary": "sample string 3",
      "image": "sample string 4",
      "shorttitle": "sample string 5",
      "dateup": 1
    }
  ],
  "time": 1,
  "status": "sample string 2",
  "message": "sample string 3",
  "codemessage": "samplestring3"
}

text/javascript, application/javascript, application/json-p

Sample:
/**/ typeof  === 'function' && ({"data":[{"idnews":1,"iddic":1,"title":"sample string 2","summary":"sample string 3","image":"sample string 4","shorttitle":"sample string 5","dateup":1},{"idnews":1,"iddic":1,"title":"sample string 2","summary":"sample string 3","image":"sample string 4","shorttitle":"sample string 5","dateup":1}],"time":1,"status":"sample string 2","message":"sample string 3","codemessage":"samplestring3"});

application/xml, text/xml

Sample:
<objNewsHome xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CMS.Obj">
  <codemessage xmlns="http://schemas.datacontract.org/2004/07/CMS.Models">samplestring3</codemessage>
  <data xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/CMS.Models">
    <d2p1:anyType />
    <d2p1:anyType />
  </data>
  <message xmlns="http://schemas.datacontract.org/2004/07/CMS.Models">sample string 3</message>
  <status xmlns="http://schemas.datacontract.org/2004/07/CMS.Models">sample string 2</status>
  <time xmlns="http://schemas.datacontract.org/2004/07/CMS.Models">1</time>
  <data>
    <NewsHome>
      <dateup>1</dateup>
      <iddic>1</iddic>
      <idnews>1</idnews>
      <image>sample string 4</image>
      <shorttitle>sample string 5</shorttitle>
      <summary>sample string 3</summary>
      <title>sample string 2</title>
    </NewsHome>
    <NewsHome>
      <dateup>1</dateup>
      <iddic>1</iddic>
      <idnews>1</idnews>
      <image>sample string 4</image>
      <shorttitle>sample string 5</shorttitle>
      <summary>sample string 3</summary>
      <title>sample string 2</title>
    </NewsHome>
  </data>
</objNewsHome>