Function: MobileLegendsNewsInfo()
MobileLegendsNewsInfo():
Promise
<{status
:boolean
;total
:number
;result
:MobileLegendsNewsItem
[]; }>
Defined in: src/games/mobile-legends/ml-news.ts:103
Fetches and aggregates news from all recognized Mobile Legends news sources.
Returns
Promise
<{ status
: boolean
; total
: number
; result
: MobileLegendsNewsItem
[]; }>
The returned Promise resolves to an object containing the following properties:
status
(boolean
): Indicates the success of the fetch operation.total
(number
): Represents the total number of news articles retrieved.result
(MobileLegendsNewsItem[]
): An array of news articles, each conforming to theMobileLegendsNewsItem
interface.
Example
async function fetchNews() {
try {
const response = await MobileLegendsNewsInfo();
console.log(`Fetch Status: ${response.status}`);
console.log(`Total Articles: ${response.total}`);
console.log(`Articles:`, response.result);
} catch (error) {
console.error('Error fetching news:', error);
}
}
Last updated on