Add short video configuration and related API endpoints
- Updated .env.example to include SHORT_VIDEO_API_KEY, SHORT_VIDEO_FREE_QUOTA, and SHORT_VIDEO_TIMEOUT_SECONDS. - Enhanced main.go to auto-migrate new VideoParseLog and VideoParseUnlock models. - Introduced VideoService and VideoHandler for handling video-related operations. - Added protected API routes for removing watermarks and unlocking video features. - Updated config.go to support short video configuration settings. - Expanded documentation to reflect new features and configuration options.
This commit is contained in:
@@ -90,3 +90,11 @@ Authorization: Bearer <token>
|
||||
4. **其他注意事项**:
|
||||
- 可在日志中存储第三方返回摘要(如视频标题、作者),便于后续分析。
|
||||
- 可配置单独的付费/会员策略,覆盖默认 20 次逻辑。
|
||||
|
||||
## 实现概览
|
||||
|
||||
- 项目已将 `SHORT_VIDEO_API_KEY`、`SHORT_VIDEO_FREE_QUOTA`、`SHORT_VIDEO_TIMEOUT_SECONDS` 等变量加入配置,可通过 `.env` 控制。
|
||||
- 新增 `video_parse_logs` / `video_parse_unlocks` 表(DDL 见 `docs/sql/remove_watermark.sql`):分别记录每次解析详情和“观看广告解锁”状态。
|
||||
- 用户在登录后可使用登录接口返回的 `session_key` 作为 `Authorization: Bearer <session_key>` 调用受保护的接口。
|
||||
- 成功解析后会将第三方原始响应以 JSON 形式直接写入 `video_parse_logs.third_party_payload` 字段,方便统一检索。
|
||||
- API 列表和请求/响应示例详见 `docs/remove_watermark/API.md`。
|
||||
|
||||
Reference in New Issue
Block a user