| 123456789101112131415161718192021222324252627282930 |
- import { YTRequest } from "basic";
- import { HeroDeedItem, HistoryEventDetail, HistoryTimelineItem, NesResponse, Query } from "../model/Index";
- import { ApiUrl } from "./ApiUrl";
- export class HistoryApis {
- // 获取军事新闻
- static getMilitaryNews(query: Query): Promise<NesResponse>{
- return YTRequest.post<NesResponse, Query>(ApiUrl.getMilitaryNews, query)
- }
- // 获取中国近代战争历史时间线
- static getModernWarTimeline(): Promise<HistoryTimelineItem[]>{
- return YTRequest.post<HistoryTimelineItem[]>(ApiUrl.getModernWarTimeline, {})
- }
- // 获取今日的历史军事资讯列表
- static getTodayInHistory(): Promise<HistoryEventDetail[]>{
- return YTRequest.get<HistoryEventDetail[]>(ApiUrl.getTodayInHistory, {})
- }
- // 献花
- static giveFlowers(contentId: number): Promise<HeroDeedItem>{
- return YTRequest.get<HeroDeedItem>(ApiUrl.giveFlowers, { contentId })
- }
- // 获取英雄事迹列表
- static getHeroDeedList(query: Query): Promise<NesResponse>{
- return YTRequest.post<NesResponse, Query>(ApiUrl.getAllHeroicModel, query)
- }
- }
|