Files
vtsuru.live/.kiro/steering/api-integration.md
Megghy 96f6169a6c feat: Enhance HistoryView with Guard List and Stats
- Added guard member model and statistics interface.
- Implemented loading functionality for guard list and statistics.
- Introduced a data table to display current guard members with pagination.
- Enhanced error handling and loading states for guard data.
- Updated UI components to include refresh button and statistics display.

feat: Update PointManage and PointGoodsView for Improved User Experience

- Added management flag to PointGoodsItem for better handling in PointManage.
- Enhanced PointGoodsView with improved tooltip logic for purchase status.
- Implemented detailed purchase history alerts and restrictions based on user actions.
- Improved visual feedback for purchased and non-purchasable items.

docs: Add comprehensive API integration documentation

- Documented API modules, data models, and request types.
- Included details on live platform integration and data storage mechanisms.

docs: Establish development workflow guidelines

- Outlined project configuration, environment setup, and code style practices.
- Provided deployment process using Docker.

docs: Create detailed documentation for the live request system

- Described the functionality and data flow of the song request system.
- Included main files and features related to the song request functionality.

docs: Define project structure and UI components

- Documented the overall project structure and key directories.
- Listed main UI components and their usage within the project.

chore: Analyze and document improvements in AnalyzeView

- Detailed enhancements made to the AnalyzeView for better user experience.
- Included visual comparisons and technical highlights of the optimizations.
2025-10-07 14:40:25 +08:00

37 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
inclusion: manual
---
# API集成
该项目使用多个API接口与后端服务和直播平台进行交互。
## 主要API模块
- [src/api/api-models.ts](mdc:src/api/api-models.ts): 定义了系统中使用的数据模型
- [src/api/query.ts](mdc:src/api/query.ts): 提供了API请求的基础函数
- [src/api/account.ts](mdc:src/api/account.ts): 账户管理相关API
## 数据模型
- `SongRequestInfo`: 点歌请求信息
- `DanmakuUserInfo`: 弹幕用户信息
- `EventModel`: 事件数据模型用于处理弹幕、SC等事件
- `Setting_LiveRequest`: 点歌系统设置
## API请求类型
- `QueryGetAPI`: GET请求
- `QueryPostAPI`: POST请求
- `QueryPostAPIWithParams`: 带参数的POST请求
## 直播平台集成
系统集成了直播平台如B站的API通过`useDanmakuClient()`获取直播间的弹幕、SC等数据。主要事件类型
- `danmaku`: 弹幕事件
- `sc`: SuperChat事件
## 数据存储
系统使用`useStorage`进行本地数据存储,`useAccount`获取账户信息。远程数据通过API请求获取和更新。