mirror of
https://github.com/Moe-Sakura/Wrangler-API.git
synced 2026-03-22 05:29:45 +08:00
- 引入平台标签系统,提供详细的平台特性说明。 - 重构搜索结果初始化,避免平台名称重复定义。 - 修正核心搜索错误日志,确保正确记录平台名称。 - 移除两个Galgame平台:TianYouErCiYuan(收费)和YingZhiGuang(网站转型)。 - 更新部分平台的颜色、魔法属性和标签信息。
36 lines
687 B
TypeScript
36 lines
687 B
TypeScript
// 单个搜索结果
|
|
export interface SearchResultItem {
|
|
name: string;
|
|
url: string;
|
|
tags?: string[];
|
|
}
|
|
|
|
// 平台搜索的返回值
|
|
export interface PlatformSearchResult {
|
|
items: SearchResultItem[];
|
|
count: number;
|
|
error?: string;
|
|
}
|
|
|
|
// 平台对象的接口
|
|
export interface Platform {
|
|
name: string;
|
|
color: string;
|
|
tags: string[];
|
|
magic: boolean;
|
|
search: (game: string, ...args: any[]) => Promise<PlatformSearchResult>;
|
|
}
|
|
|
|
// SSE 事件流中的数据结构
|
|
export interface StreamResult {
|
|
name: string;
|
|
color: string;
|
|
tags: string[];
|
|
items: SearchResultItem[];
|
|
error?: string;
|
|
}
|
|
|
|
export interface StreamProgress {
|
|
completed: number;
|
|
total: number;
|
|
} |