# meting **Repository Path**: codeba/meting ## Basic Information - **Project Name**: meting - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-11-06 - **Last Updated**: 2026-11-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Meting API (EdgeOne Pages) 基于 [Meting](https://github.com/metowolf/Meting)(Node.js 版 `@meting/core`)的音乐 API 服务,部署于腾讯云 EdgeOne Pages(Node Functions),响应格式对齐 [meting-api](https://github.com/injahow/meting-api),可直接对接 MetingJS / APlayer。 ## 路由与入参 所有接口均为根路径查询参数: ``` GET /?server={server}&type={type}&id={id} ``` | 参数 | 说明 | 默认 | 适用 type | |---|---|---|---| | `server` | `netease` / `tencent` / `kugou` / `baidu` / `kuwo` | `netease` | 全部 | | `type` | `playlist` / `song` / `name` / `artist` / `url` / `pic` / `lrc` / `search` / `album` / `lyric` | 必填 | — | | `id` | 资源 ID(`search` 时可作关键词) | — | `search` 外必填 | | `keyword` | 搜索关键词(缺省取 `id`) | — | `search` | | `stype` | 搜索分类:1 歌曲 / 10 专辑 / 100 歌手 / 1000 歌单(非 1 返回 `[]`,与 PHP 版一致,仅 netease) | `1` | `search` | | `page` / `limit` | 页码(1)/ 数量(30,`artist` 为 50) | — | `search` / `artist` | | `br` | 比特率 | `320` | `url` | | `size` | 封面尺寸 | `90` | `pic` | | `r` | 随机数(MetingJS 防缓存),忽略 | — | 全部 | ## 响应格式 | type | 响应 | |---|---| | `playlist` / `search` / `album` | `[{"name","artist","url","pic","lrc"}]`,`url`/`pic`/`lrc` 指向本 API 端点 | | `song` | `[[{"name","artist","url","pic","lrc"}]]`(双层,同 meting-api) | | `name` / `artist` | `text/plain` 歌名 / 歌手(`/` 连接) | | `url` | `302` 重定向到音频链接(netease 自动 http→https) | | `pic` | `302` 重定向到封面图片 | | `lrc` | `text/plain` 纯 LRC 文本(自动合并中文翻译,无歌词返回占位文本) | | `lyric` | `{"lyric","tlyric"}`(原始 JSON,额外保留) | 所有响应带 CORS 头(`Access-Control-Allow-Origin: *`)。 ## 环境变量 | 变量 | 说明 | |---|---| | `API_ORIGIN` | API 对外域名(如 `https://meting.cxvh.com`)。EdgeOne 运行时无法从请求获取原始域名,列表接口里的 `url`/`pic`/`lrc` 链接用它生成。**必须配置**,否则链接为相对路径。 | 配置位置:EdgeOne Pages 控制台 → 项目 → 环境变量,配置后需重新部署。 ## 访客统计 每次请求自动统计(存储于 Pages Blob,store `meting-stats`,key `stats`): - `total`:总访问量(北京时间自然日内同一 IP 只计 1) - `visitorCount`:访客数(唯一 IP) - `daily`:每日访问量 - `visitors`:按 IP 的明细(首次/最近访问、访问日期、geo 地理位置) ## 部署 ```bash # EdgeOne Pages 控制台导入 Git 仓库,或使用 CLI npx edgeone pages deploy ``` 函数目录为 `node-functions/`(`index.js` → `/`,`[[default]].js` 兜底),部署时自动构建。 ## 本地开发 ```bash npm install node test/local-server.js # http://localhost:3000 ``` ## 依赖 - `@meting/core` ^1.6.2(npm 开源库,原样使用) - `@edgeone/pages-blob` ^0.0.18(访客统计存储)