Skip to content
Quế Tùng edited this page Sep 7, 2023 · 2 revisions

dutwrapper-apiserver - News

News

GET /news

Parameters:

Key Description Accept values
type Get news type
  • global: Get global news
  • subjects: Get subject news
page Get news page 1 (must be 1 or greater)

Responses:

  • Successful: Return 200 and list of news. For more information, see here.
  • Failed:
    • Parameter(s) error: Return 400.
    • Otherwise: Return 500.

News structure

Example:

{
    "date": 1689435890906,
    "news_type": "Global",
    "news_list": [
        {
            "date": 1689206400000,
            "title": "TB về Đăng ký học học kỳ 1/2023-2024 (TB số 1) ",
            "content": "- Lịch đăng ký học học kỳ 1/2023-2024: Tại đây",
            "links": [
                {
                    "text": "Tại đây",
                    "url": "https://1drv.ms/w/s!AtwKlDZ6Vqbtrn7ke7SIcmzHr4R2?e=LUasCB",
                    "position": 39,
                }
            ],
        },
        ...
    ]
}
  • date: Requested date in UNIX timestamp.
  • news_type: News type you choosed in News.
  • news_list: List of news.
    • date: Date which news is published.
    • title: News title.
    • content: News content in text only.
    • links: Link if contains in news.
      • text: Link text
      • url: Text url of link.
      • position: Position in news content which contains link.

Clone this wiki locally