GET
/news/refresh/:source
Fetch and store data for a single source.
Response
{
"message": "source data fetched and stored successfully.",
"data": { /* NewsSourceDataWrapper */ }
}
GET
/news/refresh-all
Fetch and store data for all supported sources.
Response
{
"message": "All sources data fetched and stored successfully.",
"data": [ /* NewsSourceDataWrapper | null */ ]
}
GET
/news/data
Return cached data for all sources.
Response
[ /* NewsSourceDataWrapper */ ]
GET
/news/data/:source
Return cached data for a single source.
Response
NewsSourceDataWrapper | null
NewsSourceDataWrapper shape
{
"name": "Source name",
"sourceKey": "v2ex",
"iconColor": "#000000",
"lastModifyTime": 0,
"data": [
{
"id": "optional",
"title": "Title",
"extra": "optional",
"link": "https://example.com",
"preview": "optional",
"date_modified": 0,
"date_published": 0
}
]
}